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

"Enable/Disable source map"? #2146

Closed
JunichiIto opened this issue Dec 14, 2020 · 5 comments
Closed

"Enable/Disable source map"? #2146

JunichiIto opened this issue Dec 14, 2020 · 5 comments

Comments

@JunichiIto
Copy link

opal --help describes about -P / --map option like this:

-P, --map FILE                   Enable/Disable source map

However, as long as I tried, it is used to specify the output path of source map. Are there any options to disable to create source map?

@elia
Copy link
Member

elia commented Dec 16, 2020

The option takes a path to the map-file, like this:

Last login: Wed Dec 16 20:09:25 on ttys004
⤑ cd /tmp                                                                      ~
⤑ echo "require 'opal'" > app.rb                                            /tmp
⤑ mkdir dist                                                                /tmp
⤑ opal -P dist/app.map --compile app.rb > dist/app.js                       /tmp
Failed to load WithCLexer, using pure Ruby lexer
⤑ ll dist/                                                                  /tmp
total 5184
-rw-r--r--  1 elia  wheel   1.8M Dec 16 20:11 app.js
-rw-r--r--  1 elia  wheel   792K Dec 16 20:11 app.map
⤑ opal -v                                                                   /tmp
Opal v1.0.4
⤑                                                                           /tmp

Can you confirm that it work when provided a file?

@JunichiIto
Copy link
Author

JunichiIto commented Dec 21, 2020

Can you confirm that it work when provided a file?

Yes, the map-file was created. However, my question is the description in opal -- help. It says "Enable/Disable source map." Is it correct? I guess it should be "Output path to map-file" or anything.

@elia
Copy link
Member

elia commented Dec 23, 2020

Thanks, that's a good suggestion, I'll change that 👍

@elia
Copy link
Member

elia commented Dec 24, 2020

Updated in v1.0.5

@elia elia closed this as completed Dec 24, 2020
@JunichiIto
Copy link
Author

Thank you for the change!

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

2 participants