Giter Club home page Giter Club logo

azk-manifest's Introduction

azk-parser

  • azk-parser can read a json an generate an Azkfile.js
  • azk-parser can parse an Azkfile.js and generate a json

TODO:

var Promise = require('bluebird');
var fs = require('fs');
var AzkParser = require('azk-parser');
var azkParser = new AzkParser();

// promisify fs
Promise.promisifyAll(fs);

// parse json object and generate an Azkfile.js content
fs.readFileAsync('./content.json').then(JSON.parse).then(function(json_data) {
  var azkfile_content = azkParser.generateAzkfile(json_data);
  console.log(azkfile_content);
})
.catch(SyntaxError, function(e) {
  console.error('invalid json in file');
})
.catch(function(e){
  console.error('unable to read file')
});

// validate an `Azkfile.js`
fs.readFileAsync('./Azkfile.js').then(function(azkfile_content) {
  console.log(azkParser.validateAzkFile(azkfile_content));
})
.catch...

// // --- on future ---
// parse an `Azkfile.js`:
// - recast parse + print
// - esprima parse + escodegen generate
// - acorn parse + esotope generate
// - acorn parse + escodegen generate
fs.readFileAsync('./Azkfile.js').then(function(azkfile_content) {
  var json_data = azkParser.parseAzkfileToJSON('Azkfile.js');
  console.log(json_data);
})
.catch...

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

azk-manifest's People

Contributors

julio-saito-linx avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.