1.0.4 • Published 3 years ago

yalc-helper v1.0.4

Weekly downloads
-
License
ISC
Repository
-
Last release
3 years ago

This helper is useful for switching quickly between npm or yarn packages used in production with the yalc packages you publish locally.

Head to whitecolor/yalc to install yalc.

Install

Install yalc-helper using: npm install --save-dev yalc-helper

Create a file called yalc-helper.config.js and add:

module.exports = {
  packages: [
    {
      yalc: { name: "<YALC PACKAGE>", args: ["--dev"] },
      npm: {
        name: "<NPM PACKAGE>",
        args: ["--save-dev"]
      },
      yarn: {
        name: "<YARN PACKAGE>",
        args: ["-d"]
      }
    }
  ]
};

You can add as many packages as you need. Enter any installation args in the args array (optional)

Usage

  • Yalc: node node_modules/yalc-helper yalc installs all the yalc packages you have in the config
  • Npm: node node_modules/yalc-helper npm installs all the npm packages in your config
  • Yarn: node node_modules/yalc-helper yarn installs all the yarn packages in your config

I use yalc-helper to install yalc packages during my npm run dev script then revert back to npm/yarn during my prebuild or prepublish scripts. It also works great as a CLI.