From 2b10844a3050451c636ab537b9f6c84741c15509 Mon Sep 17 00:00:00 2001 From: foooomio Date: Mon, 15 Jul 2019 11:49:20 +0900 Subject: [PATCH] Update environment --- .editorconfig | 3 +++ .eslintrc.json | 1 + build.sh | 8 +++++++- package.json | 4 ++++ 4 files changed, 15 insertions(+), 1 deletion(-) diff --git a/.editorconfig b/.editorconfig index 04fffee..8da78de 100644 --- a/.editorconfig +++ b/.editorconfig @@ -10,3 +10,6 @@ trim_trailing_whitespace = true [*.html] indent_size = 2 + +[LICENSE.txt] +insert_final_newline = false diff --git a/.eslintrc.json b/.eslintrc.json index 35ceae6..3130ac1 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -1,4 +1,5 @@ { + "root": true, "env": { "browser": true, "es6": true, diff --git a/build.sh b/build.sh index f8e0f64..027b4ab 100755 --- a/build.sh +++ b/build.sh @@ -1,5 +1,7 @@ #!/bin/bash +set -eux + NAME="view-background-image" VERSION=$(jq -r .version src/manifest.json) @@ -7,4 +9,8 @@ mkdir -p dist rm dist/*.zip # for Chrome -zip -r "dist/${NAME}-${VERSION}.zip" src -x "*.DS_Store" +zip -r "dist/${NAME}-${VERSION}-chrome.zip" src -x "*.DS_Store" + +# for Firefox +cd src +zip -r "../dist/${NAME}-${VERSION}-firefox.zip" * -x "*.DS_Store" diff --git a/package.json b/package.json index 9124a08..0b5601c 100644 --- a/package.json +++ b/package.json @@ -2,12 +2,16 @@ "name": "view-background-image", "version": "0.0.0", "scripts": { + "build": "./build.sh", + "lint": "eslint . && editorconfig-checker", "test": "mocha" }, "private": true, "license": "MIT", "devDependencies": { "@types/chrome": "*", + "editorconfig-checker": "*", + "eslint": "*", "mocha": "*", "puppeteer-core": "*" }