Git Product home page Git Product logo

yarn-offline-pkg's Introduction

Offline 작업환경을 위한 node package 배포

yarn offline mirror

1. 패키지 레지스트리 서버에 있는 .tgz 파일을 로컬에 저장

온라인상태

  • .yarnrc 파일 생성

    yarn-offline-mirror "./yarn-offline-mirror"
    yarn-offline-mirror-pruning true
    
  • ./yarn-offline-mirror 폴더 생성

  • node_modules, yarn.lock 제거

  • yarn 캐시삭제 및 패키지 인스톨

    yarn cache clean
    yarn install
    
  • yarn-offline-mirror에 tgz파일이 생성되고, 프로젝트 루트에 yarn.lock파일이 생성됨

  • 해당 파일들을 가져가야 함

2. ./yarn-offline-mirror에 있는 .tgz로 패키지 설치

오프라인상태

  • 인터넷연결을 끊고 아래 명령어로 패키지 인스톨
yarn install --offline

3. 패키지업데이트 할 때

  • 패키지 추가 혹은 버전 업하기 전에 yarn 캐시부터 지운다.

정리

npmjs 패키지 레지스트리서버에서 .tgz 파일을 로컬에 다운받는 과정이 필요하고, 해당 과정에서 yarn-offline-mirror 기능을 사용 한다.

node_modules와 yarn.lock 파일을 삭제하고 yarn cache cleand으로 캐시도 말끔하게 지운 후, yarn install로 .tgz파일을 yarn-offline-mirror에 저장시키고, node_modules 폴더만 지운후, 나머지 생성된 파일을 업로드 한다.

[추가] yarn 단독실행js파일을 받을 수 있음

Yarn Github Release Page

아래 두 코드는 같음

yarn install 
node ./yarn-1.22.4.js install

yarn-offline-pkg's People

Contributors

sihyungkim avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.