Merge branch 'boilerplate' into develop
This commit is contained in:
commit
84b0ed9d88
@ -88,6 +88,7 @@
|
|||||||
},
|
},
|
||||||
"ignorePatterns": [
|
"ignorePatterns": [
|
||||||
"jest.config.js",
|
"jest.config.js",
|
||||||
|
"scripts/**/*",
|
||||||
"webpack.config.js",
|
"webpack.config.js",
|
||||||
"dist/**/*",
|
"dist/**/*",
|
||||||
"public/**/*",
|
"public/**/*",
|
||||||
|
10
package.json
10
package.json
@ -8,13 +8,13 @@
|
|||||||
"main": "dist/main.js",
|
"main": "dist/main.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "jest --verbose --runInBand",
|
"test": "jest --verbose --runInBand",
|
||||||
"clean": "(test ! -d dist || rm -r dist)",
|
"clean": "node scripts/clean.js",
|
||||||
"prepareSources": "cp package.json src/",
|
"prepare-sources": "node scripts/prepare-sources.js",
|
||||||
"compile": "yarn clean && tsc",
|
"compile": "yarn clean && tsc",
|
||||||
"build": "yarn prepareSources && yarn compile && webpack --mode production",
|
"build": "yarn prepare-sources && yarn compile && webpack --mode production",
|
||||||
"dev": "yarn prepareSources && concurrently -k -n \"Typescript,Node,Webpack,Maildev\" -p \"[{name}]\" -c \"blue,green,red,yellow\" \"tsc --watch\" \"nodemon\" \"webpack --watch --mode development\" \"maildev\"",
|
"dev": "yarn prepare-sources && concurrently -k -n \"Typescript,Node,Webpack,Maildev\" -p \"[{name}]\" -c \"blue,green,red,yellow\" \"tsc --watch\" \"nodemon\" \"webpack --watch --mode development\" \"maildev\"",
|
||||||
"start": "yarn build && node",
|
"start": "yarn build && node",
|
||||||
"lint": "eslint . --ext .js,.jsx,.ts,.tsx"
|
"lint": "eslint ."
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/core": "^7.9.0",
|
"@babel/core": "^7.9.0",
|
||||||
|
10
scripts/clean.js
Normal file
10
scripts/clean.js
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
const fs = require('fs');
|
||||||
|
|
||||||
|
[
|
||||||
|
'dist',
|
||||||
|
].forEach(file => {
|
||||||
|
if (fs.existsSync(file)) {
|
||||||
|
console.log('Cleaning', file, '...');
|
||||||
|
fs.rmSync(file, {recursive: true});
|
||||||
|
}
|
||||||
|
});
|
4
scripts/prepare-sources.js
Normal file
4
scripts/prepare-sources.js
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
const fs = require('fs');
|
||||||
|
const path = require('path');
|
||||||
|
|
||||||
|
fs.copyFileSync('package.json', path.join('src', 'package.json'));
|
Loading…
Reference in New Issue
Block a user