Skip to content

rahulsom/node-tool-wrapper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Node Tool Wrapper

Some OSS projects have a README that says what version of Node to download and what version of npm/yarn/pnpm/etc. to use.

Some projects have no information and leave you to guess.

This project is inspired by Gradle’s Wrapper.

Example

  1. Download .ntw.sh to your project’s root directory.

  2. Create a yarnw script that looks like this:

    #!/bin/bash
    
    . .ntw.sh
    
    selectNode v16.13.1
    selectTool yarn 1.22.17
    
    exec yarn "$@"

    This will download the chosen node for your platform. Then it will download yarn the version of yarn you choose. ./yarnw will function exactly like yarn.

    Optionally, you can add this before sourcing .ntw.sh if you have a corporate proxy.

    export NTW_NODE_DIST_URL=https://artifactory.mycompany.comp/nodejs-dist

    You can check in yarnw and .ntw.sh to your VCS.

    curl -sL https://raw.githubusercontent.com/rahulsom/node-tool-wrapper/main/.ntw.sh -o .ntw.sh
    curl -sL https://raw.githubusercontent.com/rahulsom/node-tool-wrapper/main/yarnw -o yarnw
    chmod +x .ntw.sh yarnw

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages