-
Notifications
You must be signed in to change notification settings - Fork 117
Issue #432: Grunt JS Implementation #437
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
Conversation
@@ -158,6 +158,7 @@ public static function admin_enqueue_scripts( $hook ) { | |||
|
|||
$locale = substr( get_locale(), 0, 2 ); | |||
$file_tmpl = 'ui/timeago/locale/jquery.timeago.%s.js'; | |||
$debug = apply_filters( 'wp_stream_debug', SCRIPT_DEBUG ) ? '' : '.min'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would be a good idea to use the SCRIPT_DEBUG constant if it's defined in wp-config instead of using a filter. See https://codex.wordpress.org/Debugging_in_WordPress#SCRIPT_DEBUG
What do you think @fjarrett ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jonathanbardo Yeah, that makes sense to me. Something like this?
$debug = ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '' : '.min';
@cfoellmann Any particular reason why overriding the wp-config.php
constant with a filter would be desired?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can be used to deviate from the current debug state. Not really a necessity.
See change below.
There is a lot of jshint error on travis ci. Maybe we can tell jshint not to link at minified files? |
@jonathanbardo Yes, that's right. We'll need to do just that. |
@cfoellmann Can you add this line to .jshintignore : This should do the trick 😉 |
Have we come up on a decision on this @lukecarbis and @fjarrett ? |
👍 From me. Question though: Is it possible to run grunt with a commit hook, instead of having to remember to |
Add it to the bin/pre-commit hook. |
But maybe it would be better to wait until a release to run grunt. |
I am with weston on that one. We should only run it on a release. Now we should have a script that automates the creation of a release (connects to the vagrant machine, run grunt, commit everything...) |
This script should also then part of, or at least invoked by, |
I'm closing this PR as it's been stale for a while. We can reopen once it's modified to run on |
Implements #432
I suggest adding
node_modules
to .gitignore (and maybe a few more things) to prevent node files from being committed