0.20.3 • Published 8 months ago

@utilitycss/atomic v0.20.3

Weekly downloads
131
License
MIT
Repository
github
Last release
8 months ago

Node.js CI

Atomic

A Framework to build atomic design CSS libraries in a functional manner.

Installation

$ yarn install -g @utilitycss/atomic

Usage

Atomic is meant to be used on monorepos, using yarn workspaces and lerna to handle internal dependencies. Your project should also live under a single npm scope (e.g. @my-design-sytem/package-name).

If you installed atomic globally you can bootstrap a new atomic project using

$ mkdir my-project && cd my-project
$ atomic init

Alternatively you can use npx

$ mkdir my-project && cd my-project
$ npx @utilitycss/atomic init

To build the CSS bundle use

$ yarn build

To start the watch mode use

$ yarn start

If you already built the project once and you only want to watch for changes you can use the --no-rebuild (-n) flag

$ yarn start -- -n

You can create your own visitor in order to execute some actions on each atom respecting the dependency order.

// ./visitor.js

const Visitor = require("@utilitycss/atomic").Visitor;

module.exports = class ListVisitor extends Visitor {
  async visit(node) {
    console.log('ATOM NAME:', node.name);
  }

  async finalize() {
    console.log('END');
  }
};

and then run

$ yarn atomic visit ./visitor.js

the visit function will be executed in batches of concurrent task whenever possible: all the atoms in the current batch do not have interdependencies and they only depend on atoms already visited on some previous batch.

0.20.3

8 months ago

0.20.2

8 months ago

0.20.1

2 years ago

0.20.0

2 years ago

0.19.1

3 years ago

0.19.0

3 years ago

0.18.0

3 years ago

0.17.1

3 years ago

0.17.0

3 years ago

0.16.2

3 years ago

0.16.1

3 years ago

0.16.0

3 years ago

0.15.1

3 years ago

0.15.0

3 years ago

0.14.1

3 years ago

0.14.0

3 years ago

0.13.0

3 years ago

0.12.0

4 years ago

0.11.1

4 years ago

0.11.0

4 years ago

0.10.3

4 years ago

0.10.4

4 years ago

0.10.5

4 years ago

0.10.2

4 years ago

0.10.1

4 years ago

0.10.0

4 years ago

0.9.0

4 years ago

0.8.0

4 years ago

0.7.2

4 years ago

0.6.0

4 years ago

0.5.0

5 years ago

0.4.0

5 years ago

0.3.1

5 years ago

0.3.0

5 years ago

0.2.13

5 years ago

0.2.12

5 years ago

0.2.11

5 years ago

0.2.10

5 years ago

0.2.9

5 years ago

0.2.8

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

0.0.1

5 years ago