Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/tasks/gitlab/assets.rake12
1 files changed, 11 insertions, 1 deletions
diff --git a/lib/tasks/gitlab/assets.rake b/lib/tasks/gitlab/assets.rake
index a42f02a84fd..36bdb70b7a5 100644
--- a/lib/tasks/gitlab/assets.rake
+++ b/lib/tasks/gitlab/assets.rake
@@ -5,7 +5,7 @@ namespace :gitlab do
'yarn:check',
'gettext:po_to_json',
'rake:assets:precompile',
- 'webpack:compile',
+ 'webpack',
'fix_urls'
]
@@ -18,6 +18,16 @@ namespace :gitlab do
desc 'GitLab | Assets | Uninstall frontend dependencies'
task purge_modules: ['yarn:clobber']
+ desc 'GitLab | Assets | Compile webpack assets'
+ task :webpack do
+ # temporarily force legacy support when building for production
+ ENV["BABEL_ENV"] ||= 'legacy' if ENV["NODE_ENV"] == 'production'
+
+ sh "yarn run webpack" do |ok, res|
+ abort('rake gitlab:assets:webpack failed') unless ok
+ end
+ end
+
desc 'GitLab | Assets | Fix all absolute url references in CSS'
task :fix_urls do
css_files = Dir['public/assets/*.css']