0.5.0 • Published 3 years ago

particle-emitter v0.5.0

Weekly downloads
67
License
MIT
Repository
-
Last release
3 years ago

Particle Emitter

An Atomic-CSS Library Generator

Usage

npm install --save particle-emitter

or

yarn add particle-emitter
import ParticleEmitter from 'particle-emitter';

// see examples for config structure
const styleConfig = {
  defaultClassTemplate: ...,
  defaultRuleTemplate: ...,
  mediaQueries: ...,
  lists: ...,
  rules: ...,
};

const emitter = new ParticleEmitter(styleConfig));

console.log(emitter.getCss()); // css

Examples

To run the examples, clone the repo from github, then install the dependencies:

npm install

You can then run the 4 examples provided using npm run [name].

Simple 1

This is the simplest example, and shows the basic syntax. You can see the code in examples/simple1/.

To run it:

npm run simple1

Simple 2

This is a slightly more complex example, introducing more syntax such as share-able lists. You can see the code in examples/simple2/.

To run it:

npm run simple2

Tachyons Spacing

A small example that generates the css rules for spacing (padding and margin) from the Tachyons library's CSS is available in examples/tachyons-spacing-only/.

To run it:

npm run tachyons-spacing-only

Tachyons

An example that generates the complete Tachyons library's CSS (with very minor differences) is available in examples/tachyons/.

To run it:

npm run tachyons
0.5.0

3 years ago

0.4.7

5 years ago

0.4.6

5 years ago

0.4.5

5 years ago

0.4.4

5 years ago

0.4.3

5 years ago

0.4.2

5 years ago

0.4.1

5 years ago

0.4.0

5 years ago

0.3.2

5 years ago

0.3.1

5 years ago

0.3.0

5 years ago

0.2.0

5 years ago

0.1.3

5 years ago

0.1.2

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago