diff --git a/.gitignore b/.gitignore index 0a76ea0e..79efd765 100644 --- a/.gitignore +++ b/.gitignore @@ -123,7 +123,6 @@ fabric.properties # End of https://www.gitignore.io/api/node,webstorm -package-lock.json yarn.lock osm.tar.xz diff --git a/README.md b/README.md index 77bb095e..14349512 100644 --- a/README.md +++ b/README.md @@ -20,19 +20,18 @@ Click or tab: Place Pixel ## Build ### Requirements - [nodejs environment](https://nodejs.org/en/) -- [yarn](https://yarnpkg.com/lang/en/docs/install/#debian-stable) - (optional) [babel-cli](https://www.npmjs.com/package/babel-cli) (`sudo npm install --global babel-cli`) ### Building Make sure that you have rights to g++ (if not, run as root and then `chown username:username -R .` after build) ``` -yarn install -yarn run build --release +npm install +npm run build ``` All needed files to run it got created in `./build` #### Note: -If yarn install fails with "unable to connect to github.com" set: +If npm install fails with "unable to connect to github.com" set: ``` git config --global url.https://github.com/.insteadOf git://github.com/ ``` @@ -155,6 +154,5 @@ After=network.target mysql.service redis.service ### Development -Install packages that are just required for building with `yarn add --dev` others with `yarn add`. -Run `yarn run lint` to check for code errors and warnings. We have enough warnings already, just don't produce too many additional ones. +Run `npm run lint:src` to check for code errors and warnings or `npm run lint -- ./your/file.js` to check a single file. We have enough warnings already, just don't produce too many additional ones. diff --git a/package.json b/package.json index 85fc41ee..1350cea0 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,9 @@ "scripts": { "build": "babel-node tools/run build", "clean": "babel-node tools/run clean", - "lint": "eslint --ext .jsx --ext .js src", + "babel-node": "cd $INIT_CWD && babel-node", + "lint": "cd $INIT_CWD && eslint --ext .jsx --ext .js", + "lint:src": "eslint --ext .jsx --ext .js src", "lint:css": "stylelint \"src/**/*.{css,less,scss,sss}\"", "lint:staged": "lint-staged" }, @@ -136,7 +138,6 @@ "webpack-bundle-analyzer": "^3.6.0", "webpack-dev-middleware": "^3.7.1", "webpack-hot-middleware": "^2.18.0", - "write-file-webpack-plugin": "^4.0.2", - "yarn": "^1.17.3" + "write-file-webpack-plugin": "^4.0.2" } } diff --git a/tools/webpack.config.js b/tools/webpack.config.js index bab03a7f..7697dddd 100644 --- a/tools/webpack.config.js +++ b/tools/webpack.config.js @@ -7,7 +7,7 @@ import AssetsPlugin from 'assets-webpack-plugin'; import { BundleAnalyzerPlugin } from 'webpack-bundle-analyzer'; import pkg from '../package.json'; -const isDebug = !process.argv.includes('--release'); +const isDebug = process.argv.includes('--debug'); const isVerbose = process.argv.includes('--verbose'); const isAnalyze = process.argv.includes('--analyze') || process.argv.includes('--analyse');