Merge pull request #358 from ueokande/improve-build

Improve build
jh-changes
Shin'ya Ueoka 7 years ago committed by GitHub
commit 0e34095924
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      e2e/ambassador/src/background/index.js
  2. 13
      e2e/ambassador/webpack.config.js
  3. 7
      e2e/karma.conf.js
  4. 6142
      package-lock.json
  5. 25
      package.json
  6. 8
      webpack.config.js

@ -1,6 +1,6 @@
import {
WINDOWS_CREATE, WINDOWS_REMOVE, WINDOWS_GET,
TABS_CREATE, TABS_REMOVE, TABS_SELECT_AT, TABS_GET_ZOOM, TABS_SET_ZOOM,
TABS_CREATE, TABS_SELECT_AT, TABS_GET_ZOOM, TABS_SET_ZOOM,
EVENT_KEYPRESS, EVENT_KEYDOWN, EVENT_KEYUP,
SCROLL_GET, SCROLL_SET,
} from '../shared/messages';
@ -20,8 +20,6 @@ receiveContentMessage((message) => {
url: message.url,
windowId: message.windowId,
});
case TABS_REMOVE:
return browser.tabs.remove(message.tabId);
case TABS_SELECT_AT:
return tabs.selectAt({
windowId: message.windowId,

@ -14,19 +14,6 @@ config = {
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']

@ -34,7 +34,6 @@ module.exports = function (config) {
},
reporters: ['mocha'],
browserDisconnectTimeout: 5000,
plugins: [
require('./karma-webext-launcher'),
@ -42,5 +41,11 @@ module.exports = function (config) {
'karma-webpack',
'karma-mocha-reporter',
],
client: {
mocha: {
timeout: 5000
}
}
})
}

6142
package-lock.json generated

File diff suppressed because it is too large Load Diff

@ -2,14 +2,14 @@
"name": "vim-vixen",
"description": "Vim vixen",
"scripts": {
"start": "webpack -w --debug --devtool inline-source-map",
"build": "NODE_ENV=production webpack --progress --display-error-details",
"start": "webpack --mode development -w --debug --devtool inline-source-map",
"build": "NODE_ENV=production webpack --mode production --progress --display-error-details",
"package": "npm run build && script/package.sh",
"lint": "eslint --ext .jsx,.js src e2e/ambassador/src",
"test": "karma start",
"test:e2e": "karma start e2e/karma.conf.js",
"ambassador:start": "webpack -w --debug --context e2e/ambassador --config e2e/ambassador/webpack.config.js --devtool inline-source-map",
"ambassador:build": "webpack --context e2e/ambassador --config e2e/ambassador/webpack.config.js"
"ambassador:start": "webpack --mode production -w --debug --context e2e/ambassador --config e2e/ambassador/webpack.config.js --devtool inline-source-map",
"ambassador:build": "webpack --mode production --context e2e/ambassador --config e2e/ambassador/webpack.config.js"
},
"repository": {
"type": "git",
@ -26,27 +26,26 @@
"babel-cli": "^6.24.1",
"babel-eslint": "^8.0.2",
"babel-loader": "^7.1.1",
"babel-minify-webpack-plugin": "^0.2.0",
"babel-preset-es2015": "^6.24.1",
"babel-preset-preact": "^1.1.0",
"chai": "^4.1.1",
"css-loader": "^0.28.4",
"css-loader": "^0.28.10",
"eslint": "^4.7.0",
"eslint-plugin-react": "^7.4.0",
"html-webpack-plugin": "^2.30.1",
"html-webpack-plugin": "^3.0.6",
"karma": "^2.0.0",
"karma-firefox-launcher": "^1.0.1",
"karma-html2js-preprocessor": "^1.1.0",
"karma-mocha": "^1.3.0",
"karma-mocha-reporter": "^2.2.3",
"karma-sourcemap-loader": "^0.3.7",
"karma-webpack": "^2.0.4",
"karma-webpack": "^2.0.13",
"mocha": "^5.0.0",
"node-sass": "^4.5.3",
"preact": "^8.2.6",
"sass-loader": "^6.0.6",
"style-loader": "^0.19.0",
"web-ext": "github:ueokande/web-ext#patched-2.3.2",
"webpack": "^3.5.3"
"sass-loader": "^6.0.7",
"style-loader": "^0.20.3",
"web-ext": "github:ueokande/web-ext#patched-2.4.0",
"webpack": "^4.1.1",
"webpack-cli": "^2.0.11"
}
}

@ -1,4 +1,3 @@
const MinifyPlugin = require("babel-minify-webpack-plugin");
const HtmlWebpackPlugin = require('html-webpack-plugin');
const path = require('path');
@ -19,13 +18,13 @@ config = {
},
module: {
loaders: [
rules: [
{
test: [ /\.js$/, /\.jsx$/ ],
exclude: /node_modules/,
loader: 'babel-loader',
query: {
presets: ['es2015', 'preact']
presets: ['preact']
}
},
{
@ -57,8 +56,5 @@ config = {
})
]
};
if (process.env.NODE_ENV === 'production') {
config.plugins.push(new MinifyPlugin());
}
module.exports = config