content-as-code

0.0.4 • Public • Published

Content As Code

Install content as code

Do this in your project.

npm install --save content-as-code

Use content as code

content-as-code comes with a binary that is your primary interaction tool.

$(npm bin)/cac --help

Enable debug output

Set the DEBUG environment variable to the appropriate debug target. The list of all valid debug targets can be listed in the content-as-code git repository:

find lib -type f -print0 \
  | xargs -0 grep -oP "debug(\(.*\))" \
  | awk -F ':' '{print $2;}' \
  | uniq

* stands for all debug targets.

DEBUG=* $(npm bin)/cac validate
DEBUG=tasks $(npm bin)/cac build
DEBUG=cli $(npm bin)/cac build
DEBUG=cli,tasks $(npm bin)/cac validate

Run the tests

Run all unit tests found in test.

npm run test

Lint content as code

This runs the flow type checks and the eslint syntax validation.

npm run lint

Build content as code

npm run build

Readme

Keywords

none

Package Sidebar

Install

npm i content-as-code

Weekly Downloads

1

Version

0.0.4

License

GPL-3.0

Last publish

Collaborators

  • crito