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

Disable the js auto-rewrite #1978

Merged
merged 2 commits into from
Jan 1, 2020
Merged

Disable the js auto-rewrite #1978

merged 2 commits into from
Jan 1, 2020

Conversation

farmdawgnation
Copy link
Member

Mailing List thread:
https://groups.google.com/d/msg/liftweb/urqpaxe-0U8/204X5JzqDQAJ

This PR removes the auto-rewriting we do for minified JS files.

In previous versions of Lift we would minify the JS files in advance using YUI compressor. This fell by the wayside with the recent sbt upgrades due to compatibility issues. Newer solutions, e.g. sbt-web, seem to favor doing the minification on the build of the final web artifact and combining everything into a single file so I've had some difficulty getting it to play nice with our existing JS files.

In an effort to get a working Lift build again, I've favored disabling the automatic rewrite until we can revisit the issue in more depth.

@Shadowfiend
Copy link
Member

I think we have tests that make sure the rewrites are in place, so you'll need to .pendingUntilFixed those or something.

I wish there was a quick, straightforward way to fix this, but I think it would involve gluing the sbt-web minification stuff with the resourceManaged magic that the YUI compressor plugin does… Pretty yakky, and probably time-consuming. I'm okay with sticking to this solution until someone has time to do a proper pass.

@eltimn
Copy link
Member

eltimn commented Dec 29, 2019

Since this is super easy to do with Node, I wrote a quick npm script to minify the js files. Your call whether we want to use it or not, but I figured this was better than removing the minified files, if only until someone wants to continue fighting sbt.

#1979

@farmdawgnation
Copy link
Member Author

Commented on the other PR as well, but I think once we have the npmsh bits wired into the package task for the webkit build then we're good to go. I don't want to introduce a change that requires me to remember extra steps during the release process because... I'm very likely to forget them.

@farmdawgnation farmdawgnation merged commit 828df79 into master Jan 1, 2020
@farmdawgnation farmdawgnation deleted the disable-js-rewrite branch January 1, 2020 17:22
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

Successfully merging this pull request may close these issues.

3 participants