1.2.0 • Published 3 years ago

arui-cssvars v1.2.0

Weekly downloads
268
License
ISC
Repository
github
Last release
3 years ago

arui-cssvars

Humble utility to suggest CSS variables from 'alfa-laboratory/arui-feather' for Project's CSS files, if Project uses one.

Installation

npm install -D arui-cssvars

or

yarn add --dev arui-cssvars

How to use it?

arui-feather should be in project dependencies!

node node_modules/arui-cssvars/index.js [dir]

or add script to package.json and run as npm script:

  // Add to package.json
  "scripts": {
    "cssvars": "cssvars"
  }

  // Run script
  $ npm run cssvars

This command scans './src/' (or provided by dir argument) directory for .css files and try to suggest variables from installed version of arui-feather to use instead of according hard-coded numbers.

PlugIn for Stylelint

Now we have own Stylelint rule (stylelint is required as project dependency)!

Just add to your .stylelintrc or stylelint.config.js

    rules: {
        'arui-cssvars/use-variables': true
    },
    plugins: [
        './node_modules/arui-cssvars/lint/stylelint.js'
    ]

And your IDE will suggest you appropriate variables instead of plain values!

1.2.0

3 years ago

1.1.7

4 years ago

1.1.6

4 years ago

1.1.5

4 years ago

1.1.4

4 years ago

1.1.2

5 years ago

1.1.1

5 years ago

1.1.0

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago