Skip to content

Commit

Permalink
Remove COMPONENT flags for webpack
Browse files Browse the repository at this point in the history
  • Loading branch information
rbngzlv committed May 8, 2018
1 parent d9d7af3 commit 5bf4284
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 33 deletions.
2 changes: 1 addition & 1 deletion decidim-admin/spec/bundles_spec.rb
Expand Up @@ -18,7 +18,7 @@
end
end

let(:command) { "COMPONENT=admin npm run build:prod" }
let(:command) { "npm run build:prod" }

describe "javascript bundle" do
let(:bundle_path) { "app/assets/javascripts/decidim/admin/bundle.js" }
Expand Down
48 changes: 24 additions & 24 deletions decidim-comments/app/assets/javascripts/decidim/comments/bundle.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion decidim-comments/spec/bundle_spec.rb
Expand Up @@ -3,7 +3,7 @@
require "spec_helper"

describe "Bundle sanity" do
let(:command) { "COMPONENT=comments npm run build:prod" }
let(:command) { "npm run build:prod" }

it "is up to date" do
previous_hash = bundle_hash
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

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

4 changes: 2 additions & 2 deletions package.json
Expand Up @@ -12,8 +12,8 @@
"node": "^9.2.0"
},
"scripts": {
"build": "COMPONENT=${COMPONENT:-all} webpack --env.dev",
"build:prod": "NODE_ENV=production COMPONENT=${COMPONENT:-all} webpack -p --env.prod",
"build": "webpack --env.dev",
"build:prod": "NODE_ENV=production webpack -p --env.prod",
"start": "webpack --env.dev --watch --progress --color --display-error-details",
"prelint": "tslint decidim-*/**/*.ts decidim-*/**/*.tsx",
"lint": "eslint -c .eslintrc.json --ext .js,.js.es6,.jsx .",
Expand Down
6 changes: 2 additions & 4 deletions webpack.config.js
Expand Up @@ -12,12 +12,10 @@ module.exports = env => {
const ifTest = envUtils.ifTest;

const config = {
entry: Object.entries({
entry: {
admin: "./decidim-admin/app/frontend/entry.ts",
comments: "./decidim-comments/app/frontend/entry.ts",
})
.filter(([name, entry]) => process.env.COMPONENT === "all" || process.env.COMPONENT === name)
.reduce((a, [name, entry]) => Object.assign(a, {[name]: entry}), {}),
},
output: {
path: __dirname,
filename:
Expand Down

0 comments on commit 5bf4284

Please sign in to comment.