0.0.7 • Published 5 years ago

xargv v0.0.7

Weekly downloads
3
License
MIT
Repository
github
Last release
5 years ago

Xargv

Node package runner with ability to pass foreign args.

Code quality Coverage Greenkeeper badge CricleCi badge

npm version Open issues Types: TypeScript License: MIT

Main features

  • run any node cli tool with additional args
  • passes unknown args as env variable to the e.g. underlying config scripts
  • Typescript types included
  • exposes esm/cjs modules
  • always 100% test coverage

Guide

Installation

or

or

Basic usage

Imagine a situation: you want to dynamically generate webpack config (webpack.config.js) based on provided args but webpack cli blocks you from passing any foreign values.

Below you will find way to deal with it.

Set argv config in the config file

In the root of the project provide .xargvrc file:

Keep in mind you can define same config in the package.json file:

As soon as you have config defined use it in one of the npm script's:

Or via cli if you have installed package globally:

For working examples please take a look at the repos example dir.

Documentation

Full API documentation for this package can be found here

0.0.7

5 years ago

0.0.6

5 years ago

0.0.5

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago