Skip to content

Commit

Permalink
set up prepublish script to build dist/math-traverse.js
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinbarabash committed Apr 29, 2017
1 parent cd5d75b commit a745c1c
Show file tree
Hide file tree
Showing 5 changed files with 2,343 additions and 6 deletions.
3 changes: 3 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"presets": ["es2015"]
}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
dist
16 changes: 10 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,22 @@
"name": "math-traverse",
"version": "0.0.1",
"description": "Library for traversing and replacing nodes in a math-ast AST",
"main": "index.js",
"main": "dist/math-traverse.js",
"scripts": {
"prepublish": "webpack",
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "git+https://github.com/semantic-math/math-traverse.git"
},
"repository": "git+https://github.com/semantic-math/math-traverse.git",
"author": "Kevin Barabash <[email protected]>",
"license": "MIT",
"bugs": {
"url": "https://github.com/semantic-math/math-traverse/issues"
},
"homepage": "https://github.com/semantic-math/math-traverse#readme"
"homepage": "https://github.com/semantic-math/math-traverse#readme",
"devDependencies": {
"babel-core": "^6.24.1",
"babel-loader": "^7.0.0",
"babel-preset-es2015": "^6.24.1",
"webpack": "^2.4.1"
}
}
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: "./index.js",
output: {
path: path.join(__dirname, "dist"),
filename: "math-traverse.js",
libraryTarget: "commonjs2"
},
module: {
loaders: [
{
test: /\.js$/,
exclude: /node_modules/,
loader: 'babel-loader',
}
]
}
}
Loading

0 comments on commit a745c1c

Please sign in to comment.