add ambassador extension
This commit is contained in:
parent
c57ba56546
commit
8ff200755f
5 changed files with 41 additions and 1 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1,3 +1,4 @@
|
|||
/node_modules/
|
||||
/build/
|
||||
/e2e/ambassador/build/
|
||||
*.zip
|
||||
|
|
0
e2e/ambassador/src/background/index.js
Normal file
0
e2e/ambassador/src/background/index.js
Normal file
0
e2e/ambassador/src/content/index.js
Normal file
0
e2e/ambassador/src/content/index.js
Normal file
37
e2e/ambassador/webpack.config.js
Normal file
37
e2e/ambassador/webpack.config.js
Normal file
|
@ -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",
|
||||
"package": "npm run build && script/package.sh",
|
||||
"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": {
|
||||
"type": "git",
|
||||
|
|
Reference in a new issue