Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
JaeYeopHan committed Mar 1, 2019
2 parents d0dddef + 77ef9c2 commit 654a80c
Show file tree
Hide file tree
Showing 46 changed files with 720 additions and 603 deletions.
4 changes: 2 additions & 2 deletions .prettierrc
Expand Up @@ -2,6 +2,6 @@
"printWidth": 80,
"useTabs": false,
"singleQuote": true,
"trailingComma": "all"

"trailingComma": "all",
"semi": false
}
4 changes: 3 additions & 1 deletion .travis.yml
Expand Up @@ -3,6 +3,8 @@ node_js:
- '8'
install:
- npm install
script: npm run test
script:
- npm run lint
- npm run test
after_success:
- npm run coveralls
44 changes: 22 additions & 22 deletions config-overrides.js
@@ -1,23 +1,23 @@
'use strict';
'use strict'

const webpack = require('webpack');
const UglifyJsPlugin = require('uglifyjs-webpack-plugin');
const webpack = require('webpack')
const UglifyJsPlugin = require('uglifyjs-webpack-plugin')
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer')
.BundleAnalyzerPlugin;
const manifestJson = require('./public/manifest.json');
const StringReplacePlugin = require('string-replace-webpack-plugin');
const signale = require('signale');
.BundleAnalyzerPlugin
const manifestJson = require('./public/manifest.json')
const StringReplacePlugin = require('string-replace-webpack-plugin')
const signale = require('signale')

module.exports = (config, env) => {
if (env === 'production') {
config = rewireUglifyJS(config, env);
config = rewireUglifyJS(config, env)
} else {
config = rewireBundleAnalyzer(config, env);
config = rewireBundleAnalyzer(config, env)
}
config = rewireStringReplace(config, env);
config = rewireStringReplace(config, env)

return config;
};
return config
}

function rewireUglifyJS(config, env) {
config.plugins.unshift(
Expand All @@ -31,20 +31,20 @@ function rewireUglifyJS(config, env) {
},
},
}),
);
)

return config;
return config
}

function rewireBundleAnalyzer(config, env) {
config.plugins.push(new BundleAnalyzerPlugin());
return config;
config.plugins.push(new BundleAnalyzerPlugin())
return config
}

function rewireStringReplace(config, env) {
const version = env === 'production' ? manifestJson.version : '0.0.0';
const version = env === 'production' ? manifestJson.version : '0.0.0'

signale.info(`[INFO] octodirect version : ${version}`);
signale.info(`[INFO] octodirect version : ${version}`)

config.module.rules.push({
test: /(\.tsx)$/,
Expand All @@ -53,13 +53,13 @@ function rewireStringReplace(config, env) {
{
pattern: /#__VERSION__#/gi,
replacement: function(match, p1, offset, string) {
return version;
return version
},
},
],
}),
});
config.plugins.push(new StringReplacePlugin());
})
config.plugins.push(new StringReplacePlugin())

return config;
return config
}
87 changes: 87 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 13 additions & 1 deletion package.json
Expand Up @@ -26,6 +26,7 @@
"coveralls": "react-scripts test --coverage && cat ./coverage/lcov.info | coveralls",
"start": "react-app-rewired start",
"build": "react-app-rewired build",
"lint": "tslint --project ./tsconfig.json 'src/**/*.{ts,tsx}' --exclude \"**/tests/**\"",
"test": "CI=true react-scripts test",
"test:watch": "react-scripts test",
"_clean:zip": "rm -rf octodirect.zip",
Expand Down Expand Up @@ -60,13 +61,18 @@
"string-replace-webpack-plugin": "^0.1.3",
"styled-components": "^3.4.2",
"ts-jest": "^23.10.5",
"tslint": "^5.13.1",
"tslint-clean-code": "^0.2.9",
"tslint-config-prettier": "^1.17.0",
"tslint-react": "^3.6.0",
"tslint-sonarts": "^1.9.0",
"typescript": "^3.2.2",
"typescript-styled-plugin": "^0.13.0",
"webpack-bundle-analyzer": "^3.0.3"
},
"husky": {
"hooks": {
"pre-commit": "npm run lint",
"pre-push": "npm run test"
}
},
Expand All @@ -75,5 +81,11 @@
"not dead",
"not ie <= 11",
"not op_mini all"
]
],
"greenkeeper": {
"ignore": [
"evergreen-ui",
"jest"
]
}
}
5 changes: 3 additions & 2 deletions public/manifest.json
@@ -1,7 +1,7 @@
{
"manifest_version": 2,
"name": "octodirect",
"version": "0.5.3",
"version": "0.6.0",
"description": "Move to GitHub repository directly",
"browser_action": {
"default_icon": "octodirect_48.png",
Expand All @@ -27,5 +27,6 @@
"description": "open_popup"
}
},
"content_security_policy": "script-src 'self' 'sha256-GgRxrVOKNdB4LrRsVPDSbzvfdV4UqglmviH9GoBJ5jk='; object-src 'self'"
"content_security_policy":
"script-src 'self' 'sha256-GgRxrVOKNdB4LrRsVPDSbzvfdV4UqglmviH9GoBJ5jk='; object-src 'self'"
}

0 comments on commit 654a80c

Please sign in to comment.