-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from tamakiii-sandbox/init
- Loading branch information
Showing
13 changed files
with
7,836 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"presets": [ | ||
"@babel/preset-env" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
/node_modules/ | ||
/dist/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
{ | ||
"ajv-sandbox": { | ||
"configuration": { | ||
"config": { | ||
"topScope": [ | ||
"const webpack = require('webpack')", | ||
"const path = require('path')", | ||
"\n", | ||
"/*\n * SplitChunksPlugin is enabled by default and replaced\n * deprecated CommonsChunkPlugin. It automatically identifies modules which\n * should be splitted of chunk by heuristics using module duplication count and\n * module category (i. e. node_modules). And splits the chunks…\n *\n * It is safe to remove \"splitChunks\" from the generated configuration\n * and was added as an educational example.\n *\n * https://webpack.js.org/plugins/split-chunks-plugin/\n *\n */", | ||
"/*\n * We've enabled UglifyJSPlugin for you! This minifies your app\n * in order to load faster and run less javascript.\n *\n * https://github.com/webpack-contrib/uglifyjs-webpack-plugin\n *\n */", | ||
"const UglifyJSPlugin = require('uglifyjs-webpack-plugin');", | ||
"\n" | ||
], | ||
"webpackOptions": { | ||
"module": { | ||
"rules": [ | ||
{ | ||
"include": [ | ||
"path.resolve(__dirname, 'src')" | ||
], | ||
"loader": "'babel-loader'", | ||
"options": { | ||
"plugins": [ | ||
"'syntax-dynamic-import'" | ||
], | ||
"presets": [ | ||
[ | ||
"'@babel/preset-env'", | ||
{ | ||
"'modules'": false | ||
} | ||
] | ||
] | ||
}, | ||
"test": "/\\.js$/" | ||
} | ||
] | ||
}, | ||
"entry": { | ||
"app": "'./src/app.js'", | ||
"cli": "'./src/cli.js'", | ||
"api": "'./src/api'" | ||
}, | ||
"output": { | ||
"filename": "'[name].[chunkhash].js'" | ||
}, | ||
"mode": "'development'", | ||
"plugins": [ | ||
"new UglifyJSPlugin()" | ||
], | ||
"optimization": { | ||
"splitChunks": { | ||
"cacheGroups": { | ||
"vendors": { | ||
"priority": -10, | ||
"test": "/[\\\\/]node_modules[\\\\/]/" | ||
} | ||
}, | ||
"chunks": "'async'", | ||
"minChunks": 1, | ||
"minSize": 30000, | ||
"name": true | ||
} | ||
} | ||
}, | ||
"configName": "config" | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
|
||
lint: tsconfig.json | ||
npx tslint -p $^ "src/**/*.{ts,tsx}" | ||
|
||
lint-fix: tsconfig.json | ||
npx tslint -p $^ --fix "src/**/*.{ts,tsx}" | ||
|
||
webpack: webpack.config.js package.json tsconfig.json tslint.json | ||
npx nodemon $(foreach f,$^,--watch $f) --exec "npx webpack --mode development --watch --progress" | ||
|
||
webpack-dev-server: webpack.config.js package.json tsconfig.json tslint.json | ||
npx nodemon $(foreach f,$^,--watch $f) --exec "npx webpack-dev-server --host 0.0.0.0 --port 8888" | ||
|
||
http-server: | ||
npx http-server -p 8888 dist |
Oops, something went wrong.