Giter VIP home page Giter VIP logo

gulp_offline_setting's Introduction

yarn install offline


1. 사용하는 패키지 설치 (yarn add)

$ yarn add gulp --dev
$ yarn add gulp-autoprefixer --dev
...

2. 프로젝트 홈 경로에 .yarnrc 파일 생성

// .yarnrc
yarn-offline-mirror "./npm_packages"
yarn-offline-mirror-pruning true
  • yarn-offline-mirror: 압축된 .tgz 파일들이 들어갈 폴더
  • yarn-offline-mirror-pruning: 업데이트 된 패키지 추가 시 yarn cache를 먼저 확인하고 여기에 없는 dependency를 가져옴

3. node_modules와 yarn.lock 파일 삭제

4. 캐시 삭제

$ yarn cache clean

5. 패키지 받아오기

$ yarn install

yarn install을 실행하면 /npm_packages 폴더가 생성되면서 *.tgz파일들이 저장되고새로운 yarn.lock 파일이 생성된다.

완료 되었으면 node_modules 를 제외하고, npm_packages, .yarnrc, yarn.lock, package.json, 작성한 파일들을 가져가면 된다.

내부망에 yarn과 node.js가 설치되어 있지 않다면 설치파일을 가지고 가서 따로 설치해줘야 한다.

6. 오프라인 환경 설치

$  yarn install --offline

만약 패키지가 추가된다면 node_modules, npm_packages, yarn.lock 파일 삭제하고

$ yarn install

패키지를 yarn install 로 다시 패킹한 다음에 새로 만든 파일들을 담은 후

$ yarn install --offline

다시 설치하여 사용하면 된다.

gulp_offline_setting's People

Contributors

wealth99 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.