diff --git a/.eslintrc b/.eslintrc index ae5f55396..31e09235f 100644 --- a/.eslintrc +++ b/.eslintrc @@ -46,6 +46,7 @@ ] } ], + "linebreak-style": 0, "no-param-reassign": "off" } } diff --git a/Jenkinsfile b/Jenkinsfile index 459e91c34..cbda8cd0b 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -62,7 +62,7 @@ node('lisk-nano') { stage ('Run Eslint') { try { ansiColor('xterm') { - sh 'npm run --silent clean && npm run --silent copy-files && npm run --silent eslint' + sh 'npm run --silent clean-build && npm run --silent copy-files && npm run --silent eslint' } } catch (err) { echo "Error: ${err}" diff --git a/README.md b/README.md index 32ec7647d..48006f1c6 100644 --- a/README.md +++ b/README.md @@ -58,26 +58,26 @@ npm run start ### Windows -Build package for Windows. +Build package for Windows (on Windows in [Git BASH](https://git-for-windows.github.io/)). ``` -npm run dist:win +npm run pack:win ``` ### macOS -Build package for macOS. +Build package for macOS (on macOs) ``` -npm run dist:mac +npm run pack ``` ### Linux -Build package for Linux. +Build package for Linux (on Linux). ``` -npm run dist:linux +npm run pack ``` ## Run unit tests diff --git a/features/.eslintrc.json b/features/.eslintrc.json index 91809cf85..a075509cf 100644 --- a/features/.eslintrc.json +++ b/features/.eslintrc.json @@ -1,12 +1,6 @@ { - "extends": "airbnb-base", - "plugins": [ - "import" - ], + "extends": "../.eslintrc", "env": { "protractor": true - }, - "rules": { - "no-underscore-dangle": "off" } } diff --git a/package.json b/package.json index ad6b99283..f7219d62d 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "bugs": "https://github.com/LiskHQ/lisk-nano/issues", "main": "main.js", "scripts": { - "build": "npm run clean && npm run copy-files && npm run build-prod && npm run build-electron", + "build": "npm run clean-build && npm run copy-files && npm run build-prod && npm run build-electron", "dev": "webpack-dev-server --config ./config/webpack.config.dev --env.dev --hot", "build-prod": "webpack --config ./config/webpack.config.prod --env.prod", "build-electron": "webpack --config ./config/webpack.config.electron", @@ -14,12 +14,16 @@ "test": "karma start", "test-live": "npm test -- --auto-watch --no-single-run", "start": "electron ./app/", + "dist": "build --ia32 --x64 --armv7l", "dist:win": "build --win --ia32 --x64", "dist:mac": "build --mac", "dist:linux": "build --linux --ia32 --x64 --armv7l", - "copy-files": "mkdir app/build && cp -r ./src/index.html ./src/assets ./src/locales ./app/build", - "clean": "del app/build -f", + "copy-files": "cpx \"./src/{index.html,assets/**/*,locales/**/*}\" ./app/build/", + "clean-build": "rm -rf app/build", + "clean-dist": "rm -rf dist", "eslint": "eslint ./src/ ./app/src/ ./app/config/ ./features/", + "pack": "npm install && npm run build && npm run clean-dist && npm run dist", + "pack:win": "cmd /c npm install && npm run clean-build && npm run copy-files && npm run build-prod && npm run build-electron && npm run clean-dist && npm run dist:win", "storybook": "start-storybook -p 6006 -s ./src/", "i18n-scanner": "node ./src/i18n-scanner.js", "build-storybook": "build-storybook" @@ -75,6 +79,7 @@ "chai": "4.1.2", "chai-as-promised": "7.1.1", "chai-enzyme": "0.8.0", + "cpx": "=1.5.0", "css-hot-loader": "=1.3.1", "css-loader": "0.28.7", "cucumber": "2.2.0",