Sign Up
Log In
Sign Up
Username:
*
Email:
*
Password:
*
Password confirmation:
*
or
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
Web
element
create-yarn-mirror.rb
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File create-yarn-mirror.rb of Package element
#!/usr/bin/env ruby require "fileutils" class Generate def initialize @npm_packages_cache_path = "./npm-packages-offline-cache" end def perform FileUtils.rm_rf "#{__dir__}/temp_repo" `git clone https://github.com/vector-im/element-web.git temp_repo` Dir.chdir "temp_repo" do `git checkout master` yarnconfig = "#{Dir.pwd}/.yarnrc" File.open yarnconfig, "w" do |f| f.write generate_yarnrc end #FileUtils.rm "yarn.lock" #`yarn install --production=true` `yarn install` `tar cf npm-packages-offline-cache.tar npm-packages-offline-cache/` FileUtils.mv "npm-packages-offline-cache.tar", ".." FileUtils.cp ".yarnrc", "../yarnrc" end end private def generate_yarnrc <<~EOF # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. # yarn lockfile v1 lastUpdateCheck 1606548196912 yarn-offline-mirror #{@npm_packages_cache_path} yarn-offline-mirror-pruning true EOF end end generate = Generate.new generate.perform
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Contact
Support
@OBShq
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor