Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Usegulp-sourcemaps for source maps#18

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged

Conversation

DRSDavidSoft
Copy link
Contributor

@DRSDavidSoftDRSDavidSoft commentedMar 30, 2019
edited
Loading

Description

This PR addresses a couple of issues with source maps:

Because ofjavascript-obfuscator/javascript-obfuscator#276, we can now usegulp-sourcemaps instead of throwing the source map to the stream! 😄

Backwards compatibility

As before, ifgulp-sourcemaps is not used and obfuscator'ssourceMap option is set totrue, a.map file will be thrown to Gulp stream.

gulp.src('file.js').pipe(javascriptObfuscator({compact:true,sourceMap:true})).pipe(gulp.dest('dist'));

NOTE: The old method is not recommended for new projects, for the following reasons:

  1. Any gulp plugin that is chained after gulp-javascript-obfuscator (e.g.gulp-header to prepend a banner to the output file) will be applied onboth the obfuscated.js file and its.map file.

  2. You will not be able to chain any other plugins to the task without loosing its own sourcemap file.

@Wain-PCWain-PC merged commit4c1acb4 intojavascript-obfuscator:masterApr 19, 2019
@Wain-PC
Copy link
Contributor

Thank you, looks good to me!

DRSDavidSoft reacted with laugh emojiDRSDavidSoft reacted with heart emoji

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Specify inputFileName for javascript-obfuscator 0.17.0
2 participants
@DRSDavidSoft@Wain-PC

[8]ページ先頭

©2009-2025 Movatter.jp