build: remove unnecessary files

This commit is contained in:
redhoodsu
2020-01-29 14:54:02 +08:00
parent e83590dc89
commit fdc13c2c61
5 changed files with 16 additions and 29 deletions

13
script/build.js Normal file
View 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'
)

View File

@@ -36,7 +36,7 @@ module.exports = {
port: 3000
},
output: {
path: path.resolve(__dirname, '../'),
path: path.resolve(__dirname, '../dist'),
publicPath: '/assets/',
library: 'eruda',
libraryTarget: 'umd'