-
Notifications
You must be signed in to change notification settings - Fork 20.6k
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
Build: Rearrange grunt/npm tasks into a build/dist/test pattern #1980
Conversation
@@ -55,6 +55,6 @@ | |||
"scripts": { | |||
"build": "npm install && grunt", | |||
"start": "grunt watch", | |||
"test": "grunt test" | |||
"test": "grunt && grunt test" |
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've just noticed this will most likely not work on Windows unless run via Bash. This also affects current build script definition.
cc @dmethvin
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.
This will work fine. You might want to read http://blog.keithcirkel.co.uk/how-to-use-npm-as-a-build-tool/#thewindowsproblem
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.
Ah, OK then. I must have remembered sth incorrectly.
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 use msysgit and bash on Windows, can't imagine getting work done without it. Even if our own stuff works I'd be concerned that something would be amiss in the 27-bazillion levels of npm dependencies below us. However, we pulled out the README instructions for installing msysgit a while back and nobody has come in to say they can't get things up and running on Windows. Not sure what that means, maybe I'm the last Windows user.
👍 |
LGTM, too. If we ever want to make Node smoke testing optional, we can tweak the setup further. @markelog didn't want to have this smoke testing run on every |
So at This: grunt.registerTask( "test_fast", [ "node_smoke_test" ] );
...
grunt.registerTask( "test", [ "test_fast" ] ); Is look like very weird, Whereas this I feel we redoing a lot and make arguably confusing changes for very small benefit. I'd create an npm command, that runs this jsdom require and execute it with ci-run or even without npm command and only with grunt task just like |
Right; testing and linting are separate processes.
The fast ones, yes. Or we could introduce a currently-empty |
// Short list as a high frequency watch task | ||
grunt.registerTask( "dev", [ "build:*:*", "lint" ] ); | ||
|
||
grunt.registerTask( "lint", [ "jsonlint", "jshint", "jscs" ] ); |
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.
Probably better to register it above the "dev" task
I think it would fine if have something to structure, now we only have this require and couple tasks that do this require, that do the same thing, "test_fast" name doesn't make sense, at least now. |
Ref 76df9e4
Ref #1949 (comment)