Skip to content

Generate README files from templates #23

@romainmenke

Description

@romainmenke

Docs are often out of date :

  • incorrect imports
  • incorrect urls
  • incorrect examples

They also always follow the same patterns.

Could we generate these?


Examples could be pulled from test dir :

  • example is known to be correct, otherwise CI would fail
/* test/example.css */
.foo {
  color: red;
}
/* test/example.expect.css */
.foo {
  color: blue;
}

Package name, urls, ...
This can be pulled from package.json and the directory of the package.


package.json can include extra fields with links to spec, caniuse, mdn, ...
This would also make it possible for others to extract this kind of meta data.

for example :

{
  "plugin_meta": {
    "mdn_url": "...",
    "spec_url": "...",
  }
}

CLI usage can be generated by running the CLI without any args.
This will cause it to output the help text on stderr.


What would then still need to be provided manually :

  • why the plugin exists and what it does
  • what the plugin options are

[PostCSS Environment Variables] lets you use env() variables in CSS, following the [CSS Environment Variables] specification.

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions