0.0.3 • Published 6 years ago

preamp v0.0.3

Weekly downloads
4
License
MIT
Repository
github
Last release
6 years ago

PreAmp

PreAmp works cohesively to create an experience where the user can jump between planning, buying or measuring.

Available Scripts

Generate Barrels

Generate files that rollup exports from modules and allows for bundling of imports.

Import all components through /components and types through /types.

# Navigate to documentation and generate barrels

cd packages/documentation
yarn gen:barrels

# Navigate to core and generate barrels
cd ../core
yarn gen:barrels

Compile Script Files

Compile ts script files used for generating documentation information.

# Navigate to documentation if in root

cd packages/documentation
yarn compile

Generate data for documentation pages

Read and parse all component and documentation data in core and documentation.

Parsed component and documentation information are outputted into config/componentData and config/documentationData.

The parsed data is used to auto generate PreAmps documentation pages.

# Navigate to documentation if in root

cd packages/documentation
yarn gen:docs

Start localhost

Start documentation pages at localhost:4001.

gen:barrels for core and documentation, compile and gen:docs commands are automatically run before starting server.

# run from root

yarn start

Packages

Mixer

PreAmp Mixer is VideoAmp's CSS framework.

Core

PreAmp Core in VideoAmp's component library.

How to run a release

$ yarn release

Run lint and tests on all preamp packages, runs lerna publish for a new release of PreAmp, and publishes a changelog of the release on Github using lerna-changelog.

Routing

The Table of contents defines the navigation and routing structure.

The url is based of this paradigm /header/primaryGroup/secondaryGroup/tertiaryGroup/anchors

Adding documentation

Documentation is automatically generated on start.

In order for the documentation to render, the file structure in packages/documentation must match the hierarchy of the table of contents.

Add either a markdown file or a React component under a directory matching the section name.

Linking packages

For development, Mixer must be linked to the root directory in order for styles to be imported into documentation pages.

# Navigate to mixer and yarn link it

$ cd packages/mixer
$ yarn link

# Navigate back to documentation and link mixer

$ cd ../documentation
$ yarn link "@preamp/mixer"

# Navigate to core and yarn link it

$ cd ../core
$ yarn link

# Navigate back to documentation and link core

$ cd ../documentation
$ yarn link "@preamp/core"

lerna-changelog

$ yarn run lerna-changelog <FLAGS>

Runs lerna-changelog commands. This pulls Github PRs and outputs a markdown changelog to be copied into a Github release.

lerna-changelog is a utility that outputs changelogs from Lerna monorepos. Documentation on lerna-changelog's CLI can be found here.

lerna

$ yarn run lerna <COMMAND>

Runs Lerna commands.

Lerna is used to manage the multiple packages we have in this repository. Documentation on Lerna's commands and configuration can be found here.