css
css copied to clipboard
📄 Guide for authoring a plugin/package
What is the improvement or update you wish to see?
I would like to see more examples of authoring Master CSS plugins/packages.
Is there any context that might help us understand?
Authoring your config package
Suppose you want to create a reusable configuration and publish it to NPM.
./package.json
{
"name": "aron.css",
"main": "master.css.js",
"peerDependencies": {
"@master/css": "*"
}
}
./master.css.js
/** @type {import('@master/css').Config} */
module.exports = {
variables: {},
...
}
That's it. Now publish your package.
Extend your remote config
- https://github.com/master-co/css/issues/180
Install the package just released:
npm i aron.css
Extend it in your current project's configuration file master.css.js:
/** @type {import('@master/css').Config} */
module.exports = {
extends: [
require('aron.css')
],
...
}
Does the docs page already exist? Please link to it.
http://beta.css.master.co/docs/configuration/authoring