3.0.0 • Published 6 months ago

@wycreative/atlas v3.0.0

Weekly downloads
-
License
ISC
Repository
github
Last release
6 months ago

WYcreative's Atlas

The WYcreative Engineering Team project documentation app.\ It is intended to be used with Genesis.

Requirements

Installation

npm install @wycreative/atlas

Usage

Generate an Atlas instance

import generateAtlas from '@wycreative/atlas';

import pkg from './package.json' assert {type: 'json'};
import atlas from './config/atlas.js';
import config from './config/index.js';

generateAtlas({
  package: pkg,
  atlas,
  paths: {
    destination: getDirectory(config.build.atlas),
    buildBase: config.build.base,
    symbols: config.src.symbols,
    symbolsRoot: getDirectory(config.build.images),
    examples: config.examples.base,
    views: config.examples.views,
  },
});

API

generateAtlas(options)

Generates an Atlas instance.

options.package

Type: Object

The package.json contents.

options.atlas

Type Object

The Genesis's config/atlas/*.js(on) export objects with Atlas configurations in a single object.

options.paths

Type Object

The list of path configurations.

options.paths.destination

Type String

The Atlas build destination path.

options.paths.buildBase

Type String

The build base path.

options.paths.symbols

Type String | Array

The path/glob or list of paths/globs of the source SVG symbols.

options.paths.symbolsRoot

Type String

The path where the built SVG symbols are.

options.paths.examples

Type String

The examples source base path.

options.paths.views

Type String[]

The list of paths/globs of the examples source view files.\ The first one will be extracted, its glob parent taken, and each object type appended to it with a glob for nested Pug files.

Development

Installation

With the repository cloned locally, open the terminal pointed to the repository's root and run:

npm install

Then, to start the project, run:

npm start

Commands

CommandDescription
npm startBuilds the project, starts the local server, and watches for changes.
npm run serveStarts the local server and watches for changes.
npm testChecks for code-style issues.
npm run distPrepares de built code for distribution.
npm run cleanDeletes the compiled code in build and dist directories.
npm run prepublishOnlyRuns the whole build and distribution process. This is intended to be used internally by npm when releasing a new package version.
npm run releaseRuns the release workflow, including validating the codebase, running a clean build and distribution process, and releasing a new package version.
3.0.0

6 months ago

2.0.1

6 months ago

2.0.0

10 months ago

1.0.0

11 months ago