Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:darix:apps
discourse
yarn-use-no-production.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File yarn-use-no-production.patch of Package discourse
Index: discourse/bin/ember-cli =================================================================== --- discourse.orig/bin/ember-cli +++ discourse/bin/ember-cli @@ -68,7 +68,7 @@ system( ) # Running yarn install in the root directory will also run it for YARN_DIR via a post-install hook -exit 1 if !system "yarn", "-s", "install", "--cwd", RAILS_ROOT +exit 1 if !system "yarn", "-s", "install", "--cache-folder", "../../../../vendor/cache/yarn/", "--cwd", RAILS_ROOT yarn_env = {} if ARGV.include?("--forward-host") Index: discourse/config/environments/production.rb =================================================================== --- discourse.orig/config/environments/production.rb +++ discourse/config/environments/production.rb @@ -14,7 +14,8 @@ Discourse::Application.configure do # Disable Rails's static asset server (Apache or nginx will already do this) config.public_file_server.enabled = GlobalSetting.serve_static_assets || false - config.assets.js_compressor = :uglifier + # turn off because it fails with the current code + config.assets.js_compressor = nil # stuff should be pre-compiled config.assets.compile = false Index: discourse/lib/tasks/javascript.rake =================================================================== --- discourse.orig/lib/tasks/javascript.rake +++ discourse/lib/tasks/javascript.rake @@ -203,7 +203,7 @@ end task "javascript:update" => "clean_up" do require "uglifier" - yarn = system("yarn install") + yarn = system("yarn install --cache-folder vendor/cache/yarn/") abort('Unable to run "yarn install"') unless yarn versions = {} Index: discourse/lib/tasks/svg_icons.rake =================================================================== --- discourse.orig/lib/tasks/svg_icons.rake +++ discourse/lib/tasks/svg_icons.rake @@ -9,7 +9,7 @@ def library_src end task "svgicons:update" do - yarn = system("yarn install") + yarn = system("yarn install --cache-folder vendor/cache/yarn/") abort('Unable to run "yarn install"') unless yarn dependencies = [{ source: "@fortawesome/fontawesome-free/sprites", destination: "fontawesome" }] Index: discourse/package.json =================================================================== --- discourse.orig/package.json +++ discourse/package.json @@ -52,7 +52,7 @@ "lttf:ignore": "lint-to-the-future ignore", "lttf:output": "lint-to-the-future output -o ./lint-progress/", "lint-progress": "yarn lttf:output && npx html-pages ./lint-progress --no-cache", - "postinstall": "yarn --cwd app/assets/javascripts $(node -e 'const argv = JSON.parse(process.env.npm_config_argv).original; const passthrough = [`--frozen-lockfile`, `-s`].filter(arg => argv.includes(arg)); console.log(passthrough.join(` `));')" + "postinstall": "yarn --cwd app/assets/javascripts --cache-folder ../../../../vendor/cache/yarn/ $(node -e 'const argv = JSON.parse(process.env.npm_config_argv).original; const passthrough = [`--frozen-lockfile`, `-s`].filter(arg => argv.includes(arg)); console.log(passthrough.join(` `));')" }, "engines": { "node": "16.* || >= 18",
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor