diff --git a/package.json b/package.json index b8095f5..fdb0d5c 100644 --- a/package.json +++ b/package.json @@ -2,10 +2,12 @@ "name": "pixi-live2d", "version": "1.2.0", "description": "Display live2D model as a sprite in pixi.js.", - "main": "dist/index.js", + "main": "dist/pixi-live2d.js", "scripts": { "prepublish": "npm run build", "build": "webpack --progress --colors --devtool source-map", + "build-min": "webpack --progress --colors --devtool source-map --optimize-minimize", + "build-watch": "webpack --progress --colors --devtool source-map --watch", "dev": "webpack-dev-server --config ./webpack.config.example.js --progress --colors --devtool source-map --hot --host 0.0.0.0 --compress", "test": "echo \"Error: no test specified\" && exit 1" }, @@ -16,6 +18,10 @@ "anime" ], "author": "Icemic Jia ", + "homepage": "https://github.com/avgjs/pixi-live2d", + "bugs": { + "url": "https://github.com/avgjs/pixi-live2d/issues" + }, "repository": { "type": "git", "url": "https://github.com/avgjs/pixi-live2d.git" diff --git a/webpack.config.js b/webpack.config.js index 2cdcb60..4566058 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -6,7 +6,7 @@ module.exports = { entry: "./src/index.js", output: { path: path.resolve(__dirname, './dist'), - filename: "index.js", + filename: "pixi-live2d.js", libraryTarget: 'umd' }, resolve: { @@ -17,6 +17,9 @@ module.exports = { { test: /\.js$/, exclude: /node_modules/, loader: "babel-loader"}, ] }, + externals: { + "pixi.js": "PIXI" + }, plugins: [ new webpack.BannerPlugin(fs.readFileSync('./LICENSE.txt', 'utf8')), ],