Git Product home page Git Product logo

vaceline's Introduction

Vaceline โ€” VCL Transpiler

Vaceline is a tool for trasforming VCL with JS plugins via AST.

NOTE: this project is still in development.

You can try it on the Web now (also still beta)

Install

yarn add -D vaceline

Usage

yarn vaceline src -d dist
$ yarn vaceline --help

vaceline [source]

Transpile VCL

Positionals:
  source  Source file/dir to transpile                                  [string]

Options:
  --ast          Output as AST                                         [boolean]
  --out-dir, -d  Output dir                                             [string]
  --silent, -s   Disable any logging                  [boolean] [default: false]
  --debug        Enable debug logging                 [boolean] [default: false]
  --minify                                             [boolean] [default: true]
  --no-comments                                        [boolean] [default: true]
  --printWidth                                            [number] [default: 80]
  --tabWidth                                               [number] [default: 2]
  --useTabs                                           [boolean] [default: false]
  -h, --help     Show help                                             [boolean]
  -v, --version  Show version number                                   [boolean]

Examples:
  - vaceline path/to/file.vcl
  - vaceline path/to/dir
  - cat file | vaceline
  - vaceline file -d dist

vaceline's People

Contributors

beatak avatar dependabot[bot] avatar dora1998 avatar shqld avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

vaceline's Issues

Upgrade prettier@latest

Summary

Prettier published recently has many changes in the doc builder module, which we can utilize in the generator.

Parse specific expressions with specific parse functions in parseStatement

Summary

Currently, parseStmt function takes wasted parsing time due to using parseExpr everywhere even for specifically-expected nodes.

export const parseStmt = (p: Parser, token: Token = p.read()): Statement => {

Example

For example, the code below

const left = p.validateNode(
parseExpr(p),
'Identifier',
'Member',
'ValuePair'
)

should be like this:

    const left = parseIdentifier(p)

This would improve performance largely.

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.