Skip to content

Commit

Permalink
Merge pull request #47 from tsuwatch/feature/optimize
Browse files Browse the repository at this point in the history
Optimize file size
  • Loading branch information
tsuwatch committed May 27, 2017
2 parents c2bff3b + f9208d8 commit 85be149
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 14 deletions.
13 changes: 7 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,17 @@
"name": "nicomentron",
"version": "0.4.0",
"description": "comments viewer for live.nicovideo.jp",
"main": "app/main.js",
"main": "main.js",
"scripts": {
"lint": "./node_modules/.bin/eslint ./src",
"package": "NODE_ENV=production ./node_modules/.bin/electron-packager . nicomentron --platform=darwin --arch=x64 --out=packages --overwrite",
"package": "NODE_ENV=production ./node_modules/.bin/electron-packager ./app nicomentron --platform=darwin --arch=x64 --out=packages --overwrite --asar",
"prepackage": "cp package.json ./app && cp -r plugins ./app && cd ./app && rm -rf node_modules && npm install --production && ../node_modules/.bin/electron-rebuild -m . sqlite3 keytar",
"zip": "cd packages && zip -r nicomentron-darwin-x64.zip nicomentron-darwin-x64",
"electron-rebuild": "./node_modules/.bin/electron-rebuild sqlite3 keytar",
"build": "npm run build:main && npm run build:renderer",
"build:main": "cross-env NODE_ENV=production node -r babel-register ./node_modules/.bin/webpack --config webpack.config.electron.js --progress --profile --colors",
"build:renderer": "cross-env NODE_ENV=production node -r babel-register ./node_modules/.bin/webpack --config webpack.config.production.js --progress --profile --colors --display-error-details",
"start": "cross-env NODE_ENV=production electron .",
"build": "rm -rf ./app/* && npm run build:main && npm run build:renderer && cp package.json ./app && cp -r plugins ./app",
"build:main": "cross-env NODE_ENV=production node -r babel-register ./node_modules/.bin/webpack --config webpack.config.electron.js --optimize-minimize --progress --profile --colors",
"build:renderer": "cross-env NODE_ENV=production node -r babel-register ./node_modules/.bin/webpack --config webpack.config.production.js --optimize-minimize --progress --profile --colors --display-error-details",
"start": "cross-env NODE_ENV=production electron ./app",
"start:dev": "cross-env NODE_ENV=development electron -r babel-register ./src/main.js",
"watch": "cross-env NODE_ENV=development node -r babel-register ./node_modules/.bin/webpack-dev-server --config webpack.config.development.js",
"dev": "./node_modules/.bin/npm-run-all -p watch start:dev"
Expand Down
5 changes: 0 additions & 5 deletions plugins/.travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class Main {
break;
}

app.commandLine.appendSwitch('ppapi-flash-path', `${path.join(__dirname)}/../plugins/${pluginName}`);
app.commandLine.appendSwitch('ppapi-flash-path', `${path.join(__dirname)}/${process.env.NODE_ENV === 'development' ? '../' : ''}plugins/${pluginName}`);
app.commandLine.appendSwitch('ppapi-flash-version', '25.0.0.127');
}

Expand Down
1 change: 0 additions & 1 deletion webpack.config.electron.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import merge from 'webpack-merge';
import baseConfig from './webpack.config.base';

export default merge(baseConfig, {
devtool: 'source-map',
entry: ['./src/main'],
node: {
__dirname: false
Expand Down
1 change: 0 additions & 1 deletion webpack.config.production.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import HtmlWebpackPlugin from 'html-webpack-plugin';
import baseConfig from './webpack.config.base';

export default merge(baseConfig, {
devtool: 'cheap-module-eval-source-map',
entry: {
index: './src/renderer/index.js',
'login/index': './src/renderer/login/index.js'
Expand Down

0 comments on commit 85be149

Please sign in to comment.