Skip to content

Commit

Permalink
WIP: distro scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
joshfrench committed Sep 13, 2016
1 parent 804e11e commit 374aa85
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
npm-debug.log
node_modules/
.DS_Store
dist/
19 changes: 16 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
{
"name": "react-mobiledoc-editor",
"version": "0.0.1",
"description": ":)",
"main": "index.js",
"description": "A Mobiledoc editor for React apps",
"main": "dist/index.js",
"scripts": {
"start": "webpack-dev-server --progress",
"lint": "eslint src",
"test": "karma start --single-run",
"test:watch": "karma start",
"posttest": "npm run lint"
"posttest": "npm run lint",
"build": "rm -rf ./dist && webpack --config webpack.config.js -p"
},
"dependencies": {
"babel-plugin-transform-object-rest-spread": "^6.6.5",
Expand Down Expand Up @@ -59,6 +60,18 @@
"webpack-hot-middleware": "^2.10.0",
"webpack-merge": "^0.14.0"
},
"contributors": [
"Josh French <josh@upworthy.com>"
],
"repository": "upworthy/react-mobiledoc-editor",
"homepage": "https://github.com/upworthy/react-mobiledoc-editor",
"bugs": "https://github.com/upworthy/react-mobiledoc-editor/issues",
"license": "BSD-3-Clause",
"keywords": [
"mobiledoc",
"mobiledoc-editor",
"react-component",
"react"
],
"private": "true"
}
5 changes: 5 additions & 0 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,11 @@ if (/^test/.test(TARGET)) {
// production build
if (TARGET === 'build') {
module.exports = merge(config, {
externals: {
"react": "commonjs react",
"react-dom": "commonjs reactdom",
"mobiledoc-kit": "commonjs mobiledoc-kit"
},
plugins: [
new webpack.DefinePlugin({
'process.env.NODE_ENV': '"production"'
Expand Down

0 comments on commit 374aa85

Please sign in to comment.