add ambassador extension

jh-changes
Shin'ya Ueoka 7 years ago
parent c57ba56546
commit 8ff200755f
  1. 1
      .gitignore
  2. 0
      e2e/ambassador/src/background/index.js
  3. 0
      e2e/ambassador/src/content/index.js
  4. 37
      e2e/ambassador/webpack.config.js
  5. 4
      package.json

1
.gitignore vendored

@ -1,3 +1,4 @@
/node_modules/ /node_modules/
/build/ /build/
/e2e/ambassador/build/
*.zip *.zip

@ -0,0 +1,37 @@
const path = require('path');
const src = path.resolve(__dirname, 'src');
const dist = path.resolve(__dirname, 'build');
config = {
entry: {
content: path.join(src, 'content'),
background: path.join(src, 'background')
},
output: {
path: dist,
filename: '[name].js'
},
module: {
loaders: [
{
test: [ /\.js$/ ],
exclude: /node_modules/,
loader: 'babel-loader',
query: {
presets: ['es2015']
}
}
]
},
resolve: {
extensions: [ '.js' ],
modules: [path.join(__dirname, 'src'), 'node_modules']
}
};
module.exports = config

@ -6,7 +6,9 @@
"build": "NODE_ENV=production webpack --progress --display-error-details", "build": "NODE_ENV=production webpack --progress --display-error-details",
"package": "npm run build && script/package.sh", "package": "npm run build && script/package.sh",
"lint": "eslint --ext .jsx,.js src", "lint": "eslint --ext .jsx,.js src",
"test": "karma start" "test": "karma start",
"ambassador:start": "webpack -w --debug --context --devtool inline-source-map",
"ambassador:build": "webpack --context e2e/ambassador"
}, },
"repository": { "repository": {
"type": "git", "type": "git",