sharec
The secret weapon against bloat configuration
Last updated 5 days ago by lamartire .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install sharec 
SYNC missed versions from official npm registry.

Sharec

.github/workflows/main.yml npm MIT License

Sharec allows you install configuration via CLI with short and friendly commands. Use it in your configuration packages.

Supported configs

At this moment, sharec supports:

  • npmignore
  • eslint
  • eslintignore
  • babel
  • yaspeller
  • browserslist
  • postcss
  • gitignore
  • husky
  • jest
  • lint-staged
  • stylelint
  • commitlint

Other .json or .yaml files will be merged by keys.

Files with different extension will be just copied.

Potential use-cases

  • Versionable configuration packages (try out demo config)
  • Create boilerplates, like create-react-app (see dead simple example here)

.gitignore and .npmignore

If you want to include these files, you should name them without dot - gitignore, npmignore. It needs, because originally named files would not be readed during installation.

Options

--silent, -s - hides all outputs from sharec in CLI.

Example:

{
  "scripts": {
    "postinstall": "sharec --silent"
  }
}

--overwrite, -o - force sharec to replace all configs without merging and caching.

Example:

{
  "scripts": {
    "postinstall": "sharec --overwrite"
  }
}

--disappear, -d - installs configuration without meta injecting and caching, like you do that by yourself.

Example:

{
  "scripts": {
    "postinstall": "sharec --disappear"
  }
}

--include-cache, -c - saves configuration cache in target project directory. It is very usefull, if you want always have ability to change configuration version in project without any problems.

With this option, cache would be saved in <project_path>/.sharec/.cache, instead node_modules.

Especially this feature can be usefull if you are using package manager which do not make node_modules.

Be sure, if you use this option, that .sharec directory is not ignored by git!

Example:

{
  "scripts": {
    "postinstall": "sharec --include-cache"
  }
}

Ignoring configuration

If you want to force upcoming sharec configs – just add ignore flat to your projects's sharec field:

{
  "sharec": {
    "ignore": true
  }
}

Debugging

If you see some unexpected behavior and want to help with solution - you can provide some debug information about with DEBUG environment variable. It allows to see everything what happens inside of sharec flow.

{
  "scripts": {
    "postinstall": "DEBUG=true sharec"
  }
}

Current Tags

  • 2.2.1                                ...           latest (5 days ago)

44 Versions

  • 2.2.1                                ...           5 days ago
  • 2.2.0                                ...           9 days ago
  • 2.1.2                                ...           a month ago
  • 2.1.1                                ...           a month ago
  • 2.1.0                                ...           a month ago
  • 2.0.3                                ...           a month ago
  • 2.0.2                                ...           a month ago
  • 2.0.1                                ...           a month ago
  • 2.0.0                                ...           a month ago
  • 2.0.0-rc.0                                ...           2 months ago
  • 2.14.0-beta                                ...           5 months ago
  • 2.13.0-beta                                ...           7 months ago
  • 2.12.1-beta                                ...           8 months ago
  • 2.11.0-beta                                ...           8 months ago
  • 2.10.0-beta                                ...           9 months ago
  • 2.9.0-beta                                ...           10 months ago
  • 2.8.0-beta                                ...           10 months ago
  • 2.7.0-beta                                ...           10 months ago
  • 2.6.0-beta                                ...           10 months ago
  • 2.5.0-beta                                ...           a year ago
  • 2.4.0-beta                                ...           a year ago
  • 2.3.0-beta                                ...           a year ago
  • 2.2.1-beta                                ...           a year ago
  • 2.2.0-beta                                ...           a year ago
  • 2.1.0-beta                                ...           a year ago
  • 2.0.3-beta                                ...           a year ago
  • 2.0.2-beta                                ...           a year ago
  • 2.0.1-beta                                ...           a year ago
  • 2.0.0-beta                                ...           a year ago
  • 2.3.0-alpha                                ...           a year ago
  • 2.0.4-alpha                                ...           a year ago
  • 2.0.3-alpha                                ...           a year ago
  • 2.0.2-alpha                                ...           a year ago
  • 2.0.1-alpha                                ...           a year ago
  • 2.0.0-alpha                                ...           a year ago
  • 1.3.3                                ...           a year ago
  • 1.3.2                                ...           a year ago
  • 1.3.1                                ...           a year ago
  • 1.3.0                                ...           a year ago
  • 1.2.1                                ...           a year ago
  • 1.2.0                                ...           a year ago
  • 1.1.0                                ...           a year ago
  • 1.0.0                                ...           a year ago
  • 0.0.0                                ...           a year ago
Maintainers (1)
Downloads
Today 0
This Week 2
This Month 2
Last Day 0
Last Week 44
Last Month 254
Dependencies (9)
Dev Dependencies (5)

Copyright 2014 - 2016 © taobao.org |