mirror of
https://github.com/elyby/accounts-frontend.git
synced 2024-12-29 00:10:54 +05:30
#242: reduce npm verbosity in containers and in CI
This commit is contained in:
parent
70db8d05e5
commit
df11c85caf
@ -8,12 +8,15 @@
|
|||||||
"license": "UNLICENSED",
|
"license": "UNLICENSED",
|
||||||
"repository": "git@gitlab.ely.by:elyby/accounts.git",
|
"repository": "git@gitlab.ely.by:elyby/accounts.git",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "rm -rf dist/ && npm run build:dll && webpack-dev-server --progress --colors",
|
"start": "npm run clean && npm run build:dll && webpack-dev-server --progress --colors",
|
||||||
|
"clean": "rm -rf dist/",
|
||||||
"up": "npm update",
|
"up": "npm update",
|
||||||
"test": "npm run build:dll && karma start ./karma.conf.js",
|
"test": "npm run build:dll && karma start ./karma.conf.js",
|
||||||
"lint": "eslint ./src",
|
"lint": "eslint ./src",
|
||||||
"i18n": "babel-node ./scripts/i18n-collect.js",
|
"i18n": "babel-node ./scripts/i18n-collect.js",
|
||||||
"build": "rm -rf dist/ && webpack --progress --colors -p",
|
"build": "npm run clean && npm run build:webpack -- --progress",
|
||||||
|
"build:webpack": "webpack --colors -p",
|
||||||
|
"build:quite": "npm run clean && npm run build:webpack -- --quite",
|
||||||
"build:dll": "node ./scripts/build-dll.js"
|
"build:dll": "node ./scripts/build-dll.js"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
@ -38,6 +38,8 @@ const isProduction = process.argv.some((arg) => arg === '-p');
|
|||||||
const isTest = process.argv.some((arg) => arg.indexOf('karma') !== -1);
|
const isTest = process.argv.some((arg) => arg.indexOf('karma') !== -1);
|
||||||
|
|
||||||
const isDockerized = !!process.env.DOCKERIZED;
|
const isDockerized = !!process.env.DOCKERIZED;
|
||||||
|
const isCI = !!process.env.CI;
|
||||||
|
const isSilent = isCI || process.argv.some((arg) => /quite/.test(arg));
|
||||||
|
|
||||||
process.env.NODE_ENV = isProduction ? 'production' : 'development';
|
process.env.NODE_ENV = isProduction ? 'production' : 'development';
|
||||||
if (isTest) {
|
if (isTest) {
|
||||||
@ -288,4 +290,22 @@ if (isDockerized) {
|
|||||||
webpackConfig.devServer.host = '0.0.0.0';
|
webpackConfig.devServer.host = '0.0.0.0';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (isSilent) {
|
||||||
|
webpackConfig.stats = {
|
||||||
|
hash: false,
|
||||||
|
version: false,
|
||||||
|
timings: true,
|
||||||
|
assets: false,
|
||||||
|
chunks: false,
|
||||||
|
modules: false,
|
||||||
|
reasons: false,
|
||||||
|
children: false,
|
||||||
|
source: false,
|
||||||
|
errors: true,
|
||||||
|
errorDetails: true,
|
||||||
|
warnings: false,
|
||||||
|
publicPath: false
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
module.exports = webpackConfig;
|
module.exports = webpackConfig;
|
||||||
|
Loading…
Reference in New Issue
Block a user