build: remove unnecessary files
This commit is contained in:
6
.gitignore
vendored
6
.gitignore
vendored
@@ -1,13 +1,9 @@
|
||||
.idea/
|
||||
dist/
|
||||
node_modules/
|
||||
test/lib/
|
||||
coverage/
|
||||
eustia/cache/
|
||||
test/playground.html
|
||||
eruda.js
|
||||
!/test/eruda.js
|
||||
!/src/eruda.js
|
||||
eruda.js.map
|
||||
/script/icomoon/
|
||||
npm-debug.log
|
||||
package-lock.json
|
||||
22
.npmignore
22
.npmignore
@@ -1,22 +0,0 @@
|
||||
.github/
|
||||
.vscode/
|
||||
eustia/
|
||||
.idea/
|
||||
src/
|
||||
coverage/
|
||||
test/
|
||||
doc/
|
||||
/script/
|
||||
.editorconfig
|
||||
.eslintignore
|
||||
.eslintrc.js
|
||||
.gitignore
|
||||
.gitattributes
|
||||
.npmignore
|
||||
.prettierignore
|
||||
.eustia.js
|
||||
.travis.yml
|
||||
CHANGELOG.md
|
||||
prettier.config.js
|
||||
karma.conf.js
|
||||
npm-debug.log
|
||||
@@ -5,7 +5,7 @@
|
||||
"main": "eruda.js",
|
||||
"scripts": {
|
||||
"ci": "npm run lint && npm run test && npm run build",
|
||||
"build": "webpack --config script/webpack.release.js",
|
||||
"build": "webpack --config script/webpack.release.js && node script/build",
|
||||
"build:analyser": "webpack --config script/webpack.analyser.js",
|
||||
"dev": "webpack-dev-server --config script/webpack.dev.js --host 0.0.0.0",
|
||||
"test": "karma start && remap-istanbul -i coverage/coverage-final.json -o coverage/coverage-remapped.json -t json && node script/coverage && shx rm src/index.js.map",
|
||||
|
||||
13
script/build.js
Normal file
13
script/build.js
Normal file
@@ -0,0 +1,13 @@
|
||||
const path = require('path')
|
||||
const fs = require('licia/fs')
|
||||
|
||||
const pkg = require('../package.json')
|
||||
|
||||
delete pkg.scripts
|
||||
delete pkg.devDependencies
|
||||
|
||||
fs.writeFile(
|
||||
path.resolve(__dirname, '../dist/package.json'),
|
||||
JSON.stringify(pkg, null, 2),
|
||||
'utf8'
|
||||
)
|
||||
@@ -36,7 +36,7 @@ module.exports = {
|
||||
port: 3000
|
||||
},
|
||||
output: {
|
||||
path: path.resolve(__dirname, '../'),
|
||||
path: path.resolve(__dirname, '../dist'),
|
||||
publicPath: '/assets/',
|
||||
library: 'eruda',
|
||||
libraryTarget: 'umd'
|
||||
|
||||
Reference in New Issue
Block a user