Skip to content
This repository has been archived by the owner on Feb 24, 2022. It is now read-only.

Commit

Permalink
Merge pull request #68 from sleroux/sleroux/WebPackForIOS
Browse files Browse the repository at this point in the history
Adds webpack script for bundling page-metadata-parser + fathom.js for mobile clients
  • Loading branch information
jaredlockhart committed Sep 26, 2016
2 parents 93496b0 + 7baf237 commit 3ec81b4
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"presets": ["es2015"]
}
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
coverage
client/*
9 changes: 7 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@
"fathom-web": "^1.1.2"
},
"devDependencies": {
"babel": "^6.5.2",
"babel-loader": "^6.2.5",
"babel-polyfill": "^6.13.0",
"babel-preset-es2015": "^6.14.0",
"chai": "^3.5.0",
"coveralls": "^2.11.9",
"domino": "^1.0.25",
Expand All @@ -26,7 +30,7 @@
"karma-webpack": "^1.7.0",
"mocha": "^2.5.3",
"npm-run-all": "^2.2.0",
"webpack": "^1.13.1"
"webpack": "^1.13.2"
},
"homepage": "https://github.com/mozilla/page-metadata-parser#readme",
"keywords": [
Expand All @@ -46,6 +50,7 @@
"test": "npm-run-all test:*",
"test:karma": "karma start",
"test:lint": "eslint .",
"test:mocha": "istanbul cover _mocha --report lcovonly -- tests/*.test.js -R spec"
"test:mocha": "istanbul cover _mocha --report lcovonly -- tests/*.test.js -R spec",
"clientize": "webpack"
}
}
19 changes: 19 additions & 0 deletions webpack.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
module.exports = {
entry: ['babel-polyfill', './parser.js'],
output: {
path: './client',
filename: 'page-metadata-parser.bundle.js',
libraryTarget: 'var',
library: 'metadataparser'
},
module: {
loaders: [{
test: /\.js$/,
loader: 'babel-loader',
query: {
presets: ['es2015']
}
}]
}
};

0 comments on commit 3ec81b4

Please sign in to comment.