Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistent compile / transpile API #214

Open
jakub-g opened this issue Jun 23, 2014 · 0 comments
Open

Inconsistent compile / transpile API #214

jakub-g opened this issue Jun 23, 2014 · 0 comments

Comments

@jakub-g
Copy link
Collaborator

jakub-g commented Jun 23, 2014

In #213 I wrote some very basic compile/transpile guide with pure Node (and just added a link at the end to a sample repo where this is done with Gulp).

There's some inconsistency in the code though, because hashspace exports just the compiler but not transpiler, so the code in the docs I wrote goes like this:

var compiledHS = require('hashspace').compiler.compile(inputHSCode, inputHSFileName).code;

var transpiledJS = require('hashspace/hsp/transpiler/transpile')(inputJSCode, inputJSFileName);

The second difference is that compile returns an object with code and some other props while transpile returns a string. IMO it would be good to have them consistent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant