New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

azk-parser

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

azk-parser

azk-parser

  • 0.1.9
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

azk-parser

  • azk-parser can read a json and generate an Azkfile.js
  • azk-parser can parse an Azkfile.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
import Generator from '../../../src/generator';
import Systems   from 'azk-parser/systems-list';
import System    from 'azk-parser/system';

var systems   = new Systems();
var system001 = new System({ name: 'system001' });
var system002 = new System({ name: 'system002' });

systems.add(system001);
systems.add(system002);

var generator = new Generator();
var code = generator.generate(systems.syntax);
  • generates this code:
/**
 * Documentation: http://docs.azk.io/Azkfile.js
 */

// Adds the systems that shape your system
systems({
 system001: {},
 system002: {}
});
system dependencies
system001.addDependency('system002');

var generator = new Generator();
var code = generator.generate(system001.syntax);
  • 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

Keywords

FAQs

Package last updated on 25 Mar 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc