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

How to define environment for compiled files #4

Open
Evgenus opened this issue Sep 5, 2014 · 4 comments
Open

How to define environment for compiled files #4

Evgenus opened this issue Sep 5, 2014 · 4 comments

Comments

@Evgenus
Copy link

Evgenus commented Sep 5, 2014

I'm trying to use this in node. There is a lot of external stuff in generated files which as obviously undefined.

module, __filename, __dirname) { MultiplicativeInterpreter = subclass(OMeta, {
                                                                      ^
ReferenceError: OMeta is not defined
    at Object.<anonymous> (o:\glob-rules\grammar.js:1:100)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Function.Module.runMain (module.js:497:10)
    at startup (node.js:119:16)
    at node.js:906:3
@Evgenus
Copy link
Author

Evgenus commented Sep 7, 2014

@Evgenus Evgenus closed this as completed Sep 7, 2014
@xixixao
Copy link
Owner

xixixao commented Nov 4, 2014

In Node, you can do {runtime: {subclass, OMeta}} = require 'metacoffee'. The reason for the weird API was that I was using the compiler in both the browser and in Node. I didn't want to inline the runtime, which is pretty big. This still needs fixing.

@xixixao xixixao reopened this Nov 4, 2014
@KamilSzot
Copy link

Could you add this line to the examples in Readme.md?
It could help people trying out your lib.

@xixixao
Copy link
Owner

xixixao commented Feb 22, 2015

@KamilSzot Done. I welcome anyone to take a stab at better fixing this.

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

No branches or pull requests

3 participants