@utilitycss/atomic v0.20.3
Atomic
A Framework to build atomic design CSS libraries in a functional manner.
Installation
$ yarn install -g @utilitycss/atomicUsage
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 initAlternatively you can use npx
$ mkdir my-project && cd my-project
$ npx @utilitycss/atomic initTo build the CSS bundle use
$ yarn buildTo start the watch mode use
$ yarn startIf you already built the project once and you only want to watch for changes you can use the --no-rebuild (-n) flag
$ yarn start -- -nYou 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.jsthe 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.
2 years ago
2 years ago
3 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago