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

Debug mode support for assets #484

Closed

Conversation

actual-saurabh
Copy link
Contributor

Summary of Changes:

  1. Extend support for SCRIPT_DEBUG to all enqueued assets, whenever available, including for
    1. bundled third-party assets
    2. assets loaded by CDN
  2. Optimise enqueuing mechanism by replacing multiple function calls and variables with single global constants.

@actual-saurabh actual-saurabh deleted the feature-debug-enqueue branch April 17, 2018 10:33
@thomasplevy
Copy link
Contributor

@actual-saurabh Why'd you close this?

@actual-saurabh actual-saurabh restored the feature-debug-enqueue branch April 17, 2018 15:34
@actual-saurabh
Copy link
Contributor Author

Oh, sorry. I was cleaning up branches on my fork and deleted this one too. Restored the branch. Should I pull from master, merge and update the pull request?

@thomasplevy
Copy link
Contributor

please! I hadn't merged it in yet but it looks solid and I'd like to get it into core

@thomasplevy
Copy link
Contributor

@actual-saurabh there's an issue with this... most of the JS files are only added to the assets directory as minified versions. The gulp tasks that concat & minify JS need to create a concatenated only non minified version in order for this to fully function, otherwise with script debug enabled most of the scripts will 404

@actual-saurabh
Copy link
Contributor Author

actual-saurabh commented Apr 25, 2018

I have added a new task to minify vendor scripts to maintain consistency. See: https://github.com/actual-saurabh/lifterlms/tree/feature-debug-enqueue/assets/js/vendor

I then added this as a dependency in the original task. I also modified the original process-scripts task to also copy over unminified assets: https://github.com/actual-saurabh/lifterlms/tree/feature-debug-enqueue/assets/js

@actual-saurabh
Copy link
Contributor Author

@thomasplevy #504, #505 describe what look like legacy remnants in assets that don't seem to be used anymore. Can I go ahead and delete them?

Apart from these two, #503 describes two other scripts that have minified version in the distribution but no unminified sources to build from.

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.

None yet

2 participants