Skip to content

Commit

Permalink
feat: Add simple build setup - closes d4rkr00t#13
Browse files Browse the repository at this point in the history
  • Loading branch information
torifat committed Apr 26, 2017
1 parent 4503342 commit 2058f2e
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 3 deletions.
6 changes: 6 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"presets": [
["env", { "modules": false }],
"react"
]
}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/node_modules/
/dist/
13 changes: 10 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,22 @@
"name": "prosemirror-dev-tools",
"version": "0.0.0",
"description": "",
"main": "index.js",
"main": "dist/bundle.js",
"module": "src/index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"start": "aik example/index.js -r"
"start": "aik example/index.js -r",
"build": "webpack --optimize-minimize"
},
"keywords": [],
"author": "Stanislav Sysoev <@d4rkr00t>",
"license": "MIT",
"devDependencies": {
"aik": "^0.15.0",
"babel-core": "^6.24.1",
"babel-loader": "^7.0.0",
"babel-preset-env": "^1.4.0",
"babel-preset-react": "^6.24.1",
"cerebral": "2.0.0-b-alpha.44b98c71",
"components": "^0.1.0",
"date-fns": "^1.28.2",
Expand All @@ -29,7 +35,8 @@
"react-dom": "^15.4.2",
"react-json-tree": "^0.10.7",
"react-tabs": "^0.8.2",
"styled-components": "^1.4.4"
"styled-components": "^1.4.4",
"webpack": "^2.4.1"
},
"eslintConfig": {
"extends": "./node_modules/aik/lib/eslint-config.js"
Expand Down
19 changes: 19 additions & 0 deletions webpack.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
const path = require('path');

module.exports = {
entry: './src',
output: {
filename: 'bundle.js',
path: path.resolve(__dirname, 'dist'),
libraryTarget: 'commonjs-module'
},
module: {
rules: [
{
test: /\.js$/,
exclude: /node_modules/,
loader: 'babel-loader'
}
]
}
};

0 comments on commit 2058f2e

Please sign in to comment.