Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

📄 Guide for authoring a plugin/package #233

Open
1aron opened this issue Jun 13, 2023 · 0 comments
Open

📄 Guide for authoring a plugin/package #233

1aron opened this issue Jun 13, 2023 · 0 comments
Assignees
Labels
undocumented Not yet written into official documentation

Comments

@1aron
Copy link
Member

1aron commented Jun 13, 2023

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 = {
    colors: {},
    ...
}

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

@1aron 1aron added css undocumented Not yet written into official documentation labels Jun 13, 2023
@1aron 1aron self-assigned this Jun 13, 2023
@1aron 1aron changed the title 📄 Guide for authoring plugins/packages 📄 Guide for authoring a plugin/package Jun 13, 2023
@1aron 1aron removed the css label Jan 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
undocumented Not yet written into official documentation
Projects
None yet
Development

No branches or pull requests

1 participant