postcss-iconsauce
TypeScript icon, indicating that this package has built-in type declarations

1.4.1 • Public • Published

postcss-iconsauce

For more infos go to iconsauce docs.

Installation

To install iconsauce you'll need to run this command

npm i --save-dev @iconsauce/core postcss-iconsauce autoprefixer

PostCSS config

Place a postcss.config.js into the root of your project:

module.exports = {
  plugins: [
    require('postcss-iconsauce'),
    require('autoprefixer'),
  ],
}

CSS entry point

To let iconsauce builds, it needs a css entrypoint with a special at-rule inside:

@iconsauce;

/* You can also add more code for icons here */

At this point, how PostCSS is integrated in yout build system depends on the framework you are using, we will add more reproducible example as soon as possibile:

  • create-react-app
  • Next
  • Angular

PostCSS CLI

If you want to use iconsauce from CLI with PostCSS, install an additional dependency:

npm i --save-dev postcss-cli

Now you can add a script to build in your package.json file.

"scripts": {
  "build:iconsauce": "postcss src/styles/iconsauce.css -o public/styles/iconsauce.css"
}

Package Sidebar

Install

npm i postcss-iconsauce

Weekly Downloads

46

Version

1.4.1

License

MIT

Unpacked Size

5.94 kB

Total Files

6

Last publish

Collaborators

  • vitto