Skip to content

📄 Guide for authoring a plugin/package #233

@1aron

Description

@1aron

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

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

Metadata

Metadata

Assignees

Labels

undocumentedNot yet written into official documentation

Type

No fields configured for Docs.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions