sharec-demo-config

Sharec example config for core functionality demonstration

Usage no npm install needed!

<script type="module">
  import sharecDemoConfig from 'https://cdn.skypack.dev/sharec-demo-config';
</script>

README

Sharec demo config

.github/workflows/main.yml npm MIT License

Manual

You should complete a few steps for configuration package creation:

1. Create empty npm package and initialize npm in the last one:

mkdir my-awesome-configs
cd my-awesome-configs
npm init -y

2. Install sharec as dependency:

npm i --save sharec

Install sharec as dependency, not as devDependecy, it is very important!

3. Add sharec commands to npm scripts in initialized package, scripts section in your package.json should looks like:

{
  "scripts": {
    "postinstall": "sharec install"
  }
}

4. Create configs directory and store your files in:

mkdir configs

Your configuration package should looks like:

└── my-awesome-configs/
    ├── configs/
    │   ├── .eslintrc
    │   ├── .babelrc
    │   ├── .editorconfig
    │   └── package.json
    └── package.json

my-awesome-configs/configs/package.json – should include dependencies and devDependencies which is used by your configuration. For example, if you're using eslint – it should contain eslint as a dependency. It would be injected in package.json of target project.

5. Publish it and install.

You have created your own configuration and ready to use it. Publish it or keep on github and then install in target project.

Have a nice day and use sharec! 😉