azk-parser
azk-parser
can read a json and generate anAzkfile.js
azk-parser
can parse anAzkfile.js
and generate json
Parser and Generator
It uses recast
for parsing and generation of javascript.
AST toolbox
Because parsing javascript returns an AST (not an CST), is not always easy to generate the right syntax tree. We can use the project bellow to test new ast compositions.
- https://github.com/azukiapp/azkfile-ast-history-compare/commits/master
- https://github.com/benjamn/ast-types
Azkfile.js
systems with 2 system
;;; var systems = ;var system001 = name: 'system001' ;var system002 = name: 'system002' ; systems;systems; var generator = ;var code = generator;
- generates this code:
/** * Documentation: http://docs.azk.io/Azkfile.js */ // Adds the systems that shape your system;
system dependencies
system001; var generator = ;var code = generator;
- generates this code:
system001: depends: "system002"
before start
$ npm install
test + lint (no watch)
$ gulp
test + lint + watch
$ gulp test
test + watch (no-lint)
$ gulp test-no-lint
publish a patch to npm
$ npm run-script patch