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

Avoid to generate an empty block if the source is empty from the command line #1281

Closed
ggrossetie opened this issue Jan 9, 2016 · 1 comment

Comments

@ggrossetie
Copy link
Member

I'm using the following command to generate JavaScript code:

opal --compile -I lib -I asciidoctor -g asciidoctor -r asciidoctor/converter/docbook5 --dynamic-require ignore --no-opal --no-exit > build/asciidoctor-docbook5.js < /dev/null

It would be nice if I could tell Opal that there's no code to generate (apart from the docbook5 module).
A safe solution is to add an option --no-source to skip the generation.

@ggrossetie
Copy link
Member Author

As suggested by @elia we could instead add a --module option to generate only the code of the module (inside an Opal module: Opal.modules["my_module"] = function(Opal) {)

ggrossetie added a commit to ggrossetie/opal that referenced this issue Jan 10, 2016
@elia elia closed this as completed in 29b2741 Jan 16, 2016
elia added a commit that referenced this issue Jan 16, 2016
Resolves #1281, do not generate source block when module option is specified
elia added a commit that referenced this issue Jan 16, 2016
Was conflicting with --no-method-missing.

cc @Mogztter #1283 #1281
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

1 participant