use npm instead of yarn

This commit is contained in:
HF 2020-01-04 00:34:51 +01:00
parent 5ee01f3cc2
commit 9f8a2aec19
4 changed files with 9 additions and 11 deletions

1
.gitignore vendored
View File

@ -123,7 +123,6 @@ fabric.properties
# End of https://www.gitignore.io/api/node,webstorm
package-lock.json
yarn.lock
osm.tar.xz

View File

@ -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.

View File

@ -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"
}
}

View File

@ -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');