mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2025-07-08 03:54:04 -04:00
Merge pull request #203 from rschamp/build-dist
Build the module to be imported
This commit is contained in:
commit
f9efc2b4bc
3 changed files with 31 additions and 16 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -8,3 +8,4 @@ npm-*
|
||||||
# Testing
|
# Testing
|
||||||
/.nyc_output
|
/.nyc_output
|
||||||
/coverage
|
/coverage
|
||||||
|
/dist.js
|
||||||
|
|
15
package.json
15
package.json
|
@ -9,25 +9,26 @@
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "git+ssh://git@github.com/LLK/scratch-vm.git"
|
"url": "git+ssh://git@github.com/LLK/scratch-vm.git"
|
||||||
},
|
},
|
||||||
"main": "./src/index.js",
|
"main": "./dist.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "make test",
|
"postinstall": "./node_modules/.bin/webpack",
|
||||||
"start": "webpack-dev-server --host 0.0.0.0 --content-base ."
|
"start": "webpack-dev-server --host 0.0.0.0 --content-base .",
|
||||||
|
"test": "make test"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"expose-loader": "0.7.1",
|
||||||
"htmlparser2": "3.9.0",
|
"htmlparser2": "3.9.0",
|
||||||
"promise": "7.1.1"
|
"json-loader": "0.5.4",
|
||||||
|
"promise": "7.1.1",
|
||||||
|
"webpack": "1.13.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"eslint": "2.7.0",
|
"eslint": "2.7.0",
|
||||||
"expose-loader": "0.7.1",
|
|
||||||
"highlightjs": "8.7.0",
|
"highlightjs": "8.7.0",
|
||||||
"json-loader": "0.5.4",
|
|
||||||
"scratch-blocks": "git+https://git@github.com/LLK/scratch-blocks.git#develop",
|
"scratch-blocks": "git+https://git@github.com/LLK/scratch-blocks.git#develop",
|
||||||
"scratch-render": "git+https://git@github.com/LLK/scratch-render.git#develop",
|
"scratch-render": "git+https://git@github.com/LLK/scratch-render.git#develop",
|
||||||
"stats.js": "0.16.0",
|
"stats.js": "0.16.0",
|
||||||
"tap": "5.7.1",
|
"tap": "5.7.1",
|
||||||
"webpack": "1.13.0",
|
|
||||||
"webpack-dev-server": "1.14.1"
|
"webpack-dev-server": "1.14.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,14 +1,6 @@
|
||||||
var webpack = require('webpack');
|
var webpack = require('webpack');
|
||||||
|
|
||||||
module.exports = {
|
var base = {
|
||||||
entry: {
|
|
||||||
'vm': './src/index.js',
|
|
||||||
'vm.min': './src/index.js'
|
|
||||||
},
|
|
||||||
output: {
|
|
||||||
path: __dirname,
|
|
||||||
filename: '[name].js'
|
|
||||||
},
|
|
||||||
module: {
|
module: {
|
||||||
loaders: [
|
loaders: [
|
||||||
{
|
{
|
||||||
|
@ -30,3 +22,24 @@ module.exports = {
|
||||||
})
|
})
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
|
|
||||||
|
module.exports = [Object.assign({}, base, {
|
||||||
|
entry: {
|
||||||
|
'vm': './src/index.js',
|
||||||
|
'vm.min': './src/index.js'
|
||||||
|
},
|
||||||
|
output: {
|
||||||
|
path: __dirname,
|
||||||
|
filename: '[name].js'
|
||||||
|
}
|
||||||
|
}), Object.assign({}, base, {
|
||||||
|
entry: {
|
||||||
|
'dist': './src/index.js'
|
||||||
|
},
|
||||||
|
output: {
|
||||||
|
library: 'VirtualMachine',
|
||||||
|
libraryTarget: 'commonjs2',
|
||||||
|
path: __dirname,
|
||||||
|
filename: '[name].js'
|
||||||
|
}
|
||||||
|
})];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue