mirror of
https://github.com/opf/openproject.git
synced 2026-06-14 03:30:14 +00:00
Add build:ci npm build option
This commit is contained in:
@@ -175,6 +175,7 @@
|
||||
},
|
||||
"scripts": {
|
||||
"analyze": "ng build --configuration production --stats-json && webpack-bundle-analyzer -h 0.0.0.0 -p 9999 ../public/assets/frontend/stats.json",
|
||||
"build:ci": "node --max_old_space_size=4096 ./node_modules/@angular/cli/bin/ng build --configuration production --named-chunks --source-map=false --build-optimizer=false --optimization=false",
|
||||
"build": "node --max_old_space_size=4096 ./node_modules/@angular/cli/bin/ng build --configuration production --named-chunks --source-map",
|
||||
"build:watch": "node --max_old_space_size=4096 ./node_modules/@angular/cli/bin/ng build --watch --named-chunks",
|
||||
"tokens:generate": "theo src/app/spot/styles/tokens/tokens.yml --transform web --format sass,json --dest src/app/spot/styles/tokens/dist",
|
||||
|
||||
@@ -64,7 +64,8 @@ namespace :assets do
|
||||
|
||||
puts "Building angular frontend"
|
||||
Dir.chdir Rails.root.join('frontend') do
|
||||
sh 'npm run build' do |ok, res|
|
||||
cmd = ENV['CI'] ? 'npm run build:ci' : 'npm run build'
|
||||
sh(cmd) do |ok, res|
|
||||
raise "Failed to compile angular frontend: #{res.exitstatus}" if !ok
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user