diff --git a/.babelrc b/.babelrc new file mode 100644 index 0000000..e9a907e --- /dev/null +++ b/.babelrc @@ -0,0 +1,6 @@ +{ + "presets": [ + ["env", { "modules": false }], + "react" + ] +} diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b0a5c34 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/node_modules/ +/dist/ diff --git a/package.json b/package.json index f30e1d3..9c1c56f 100644 --- a/package.json +++ b/package.json @@ -2,16 +2,21 @@ "name": "prosemirror-dev-tools", "version": "0.0.0", "description": "", - "main": "index.js", + "main": "dist/bundle.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", @@ -29,7 +34,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" diff --git a/webpack.config.js b/webpack.config.js new file mode 100644 index 0000000..39b0874 --- /dev/null +++ b/webpack.config.js @@ -0,0 +1,18 @@ +const path = require('path'); + +module.exports = { + entry: './src', + output: { + filename: 'bundle.js', + path: path.resolve(__dirname, 'dist') + }, + module: { + rules: [ + { + test: /\.js$/, + exclude: /node_modules/, + loader: 'babel-loader' + } + ] + } +};