@cat-org/configs

Use to manage the multiple configs

WARNING: This project has been renamed to @mikojs. Install using @mikojs instead.
Last updated 8 months ago by cat-org .
MIT · Repository · Original npm · Tarball · package.json
$ cnpm install @cat-org/configs 
SYNC missed versions from official npm registry.

@cat-org/configs · npm npm-size

Use to manage the multiple configs.

Install

yarn add @cat-org/configs --dev

Run command

Depend on the first argument, @cat-org/configs will run the command, generate the config file and use the default option.

yarn configs babel

In this case, this will generate babel.config.js and run babel src -d lib --verbose. You can also add other option to this command.

yarn configs babel -w

This command is equal to babel src -d lib --verbose -w.

yarn configs exec custom-command argumentA argumentB --configs-files babel

This command will generate a babel config when running your custom-command. You can also use --configs-files babel,jest to generate babel and jest at the same time.

Get the configs lint

yarn configs --info

Get the information about the config

By this option, you can get the detail of this config.

yarn configs babel --info

Download the packages from the config

yarn configs babel --install

In this case, this will run yarn install @babel/cli @babel/core @cat-org/babel-plugin-base --dev.

Get help

yarn configs -h

Write config

This module use cosmiconfig to find the config file. The filename which is supported by cosmiconfig can be used.

module.exports = {
  // configsEnv is special key, this will give to the argument of the each config function
  configsEnv: ['react'],

  // overwrite the existing config by function
  babel: config => { ... },

  // overwrite the existing config by object
  jest: {
    config: config => { ... },
  },

  // add custom config, each field is optional
  custom: {
    aliase: 'babel',             // run config with babel cli
    getCli: () => 'path-to-cli', // cli path which is used to run the command
    install: install => [        // install packages
      ...install,
      '@cat-org/configs',
    ],
    config: config => {          // write the config
      ...config,
      key: 'value',
    },
    ignore: ignore => [          // generate ignore file
      ...ignore,
      'node_modules'
    ],
    ignoreName: '.gitignore'     // ignore filename
    run: argv => [               // command to run
      ...argv,
      'src',
      '-d',
      'lib',
    ],
    env: {                       // run command with environment
      NODE_ENV: 'development',
    },
    configFiles: {               // link the config files. For example, `jest` need to run with `babel`, you need to add `babel: true`
      eslint: true,
    },
  },
};

Current Tags

  • 1.0.0-beta.24                                ...           beta (a year ago)
  • 1.5.8                                ...           latest (8 months ago)

30 Versions

  • 1.5.8 [deprecated]           ...           8 months ago
  • 1.5.6 [deprecated]           ...           8 months ago
  • 1.5.5 [deprecated]           ...           8 months ago
  • 1.5.4 [deprecated]           ...           8 months ago
  • 1.5.3 [deprecated]           ...           9 months ago
  • 1.5.2 [deprecated]           ...           9 months ago
  • 1.5.0 [deprecated]           ...           10 months ago
  • 1.3.2 [deprecated]           ...           a year ago
  • 1.3.1 [deprecated]           ...           a year ago
  • 1.3.0 [deprecated]           ...           a year ago
  • 1.2.1 [deprecated]           ...           a year ago
  • 1.2.0 [deprecated]           ...           a year ago
  • 1.1.3 [deprecated]           ...           a year ago
  • 1.1.1 [deprecated]           ...           a year ago
  • 1.0.0 [deprecated]           ...           a year ago
  • 1.0.0-beta.24                                ...           a year ago
  • 1.0.0-beta.20                                ...           a year ago
  • 1.0.0-beta.19                                ...           a year ago
  • 1.0.0-beta.17                                ...           a year ago
  • 1.0.0-beta.16                                ...           a year ago
  • 1.0.0-beta.14                                ...           a year ago
  • 1.0.0-beta.12                                ...           a year ago
  • 1.0.0-beta.10                                ...           2 years ago
  • 1.0.0-beta.9                                ...           2 years ago
  • 1.0.0-beta.8                                ...           2 years ago
  • 1.0.0-beta.6                                ...           2 years ago
  • 1.0.0-beta.5                                ...           2 years ago
  • 1.0.0-beta.4                                ...           2 years ago
  • 1.0.0-beta.3                                ...           2 years ago
  • 1.0.0-beta.2                                ...           2 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 38
Last Day 0
Last Week 33
Last Month 1
Dependencies (14)
Dev Dependencies (1)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |