Giter Club home page Giter Club logo

mnpm's Introduction

mnpm

mnpm init script

Notes: mnvm, mnpm and myarn are just aliases.

The easy way

WARNING: the install scripts have only been tested on the lastest macOS(10.12), and should be used with cautions.

If you are using other operation systems, you may take the hard way instead.

  1. Install nvm

  2. Install mnvm

    curl -o- https://raw.githubusercontent.com/OpenGG/mnpm/master/install-mnvm.sh | bash
  3. Install Node.js with mnvm

    mnvm install stable
  4. Install mnpm

    curl -o- https://raw.githubusercontent.com/OpenGG/mnpm/master/install.sh | bash
  5. (Optional) Install myarn

    curl -o- https://raw.githubusercontent.com/OpenGG/mnpm/master/install-myarn.sh | bash
  6. Reload .profile if you don't want to init another session.

    source ~/.profile

The hard way

mnpm and myarn are basically aliases for npm and yarn, with some extra args.

Instead of running the install scripts above, you can put the alias code into .profile file manually.

  1. Install nvm.

  2. Create alias mnvm in .profile file

    echo "" >> ~/.profile
    echo 'alias mnvm="NVM_NODEJS_ORG_MIRROR=http://npm.sankuai.com/dist/node NVM_IOJS_ORG_MIRROR=http://npm.sankuai.com/dist/iojs nvm"' >> ~/.profile
  3. Create alias mnpm in .profile file

    echo "" >> ~/.profile
    echo 'alias mnpm="npm --registry=http://r.npm.sankuai.com \
      --cache=$HOME/.cache/mnpm \
      --disturl=http://npm.sankuai.com/dist/node \
      --userconfig=$HOME/.mnpmrc"' >> ~/.profile
  4. (Optional) Create alias myarn in .profile file

    echo "" >> ~/.profile
    echo 'alias myarn="YARN_CACHE_FOLDER=$HOME/.cache/myarn-cache NPM_CONFIG_USERCONFIG=$HOME/.myarnrc yarn"' >> ~/.profile
  5. (Optional) Create .myarnrc file

    echo '
    registry=http://r.npm.sankuai.com
    cache=$HOME/.cache/myarn
    disturl=http://npm.sankuai.com/dist/node
    ' > ~/.myarnrc
  6. Reload .profile if you don't want to init another session.

    source ~/.profile

mnpm's People

Contributors

opengg avatar

Watchers

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