-
Notifications
You must be signed in to change notification settings - Fork 12
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
Adding a JSHint task, and associated live reloading tasks. #7
base: master
Are you sure you want to change the base?
Conversation
Added a JSHint task to grunt, and updated watch tasks to cause JSHint to be re-run every time a js file is saved in the directory. And, added that "open" flag to the server command, so the site auto-loads in your default web browser. Finally, this updates the the default version of dojo to the latest patch release (1.9.2).
Any chance you could take a look at this - I'm in the middle of doing dojo training for a team moving to it, and they would love to use this w/o tapping my branch. |
Sorry for the delay. I have a few questions/comments:
|
Awesome - thanks a ton for getting back to me - sorry if I came off as impatient.
Let me know what you think - thanks again for looking into this. |
most source control management tools give you hooks to trigger processes when code is being integrated into your central repository. a lot of people use these hooks to enforce linting and reject commits that don't pass. this way, the code in the central repository always conforms to your standards. whatever a developer uses to help them comply before they integrate their code with the central repo is up to them (IDE, cli, etc) but the hook becomes a gatekeeper that doesn't let code into your central repo without it conforming to your standards. this is usually a more desirable approach than running linting as part of testing or building since it catches it sooner and doesn't require you to do anything more than just use version control - i.e. you don't have to also run tests or builds to determine if code passes linting. |
Thanks for that suggestion, I was aware using hooks for various things but had never heard of linking to the lint/commit rejection process. And now I would like to someday work that into our process. But that isn't what we are currently using internally, and I don't have control over that at the moment to change. But in my opinion the workflow that lints prior to debug or release build is no less valid or more complicated anyway. Anecdotally my limited experience so far with yeoman suggests that I'm not the only one who uses this workflow (this is the first generator I've used that doesn't lint by default). So I'm more than open to making it an option with a prompt, so ppl can have a simpler setup if they want. |
Prompts during install/yeoman running the generator, asking if you want live reloading and JSHint to run regularly.
OK, so I made the JSHint and Live Reloading tasks optional, and created prompts to ask if you want them or not. Let me know if I missed anything or if there is an issue with this? |
Added a JSHint task to grunt, and updated watch tasks to cause JSHint to
be re-run every time a js file is saved in the directory. And, added
that "open" flag to the server command, so the site auto-loads in your
default web browser.
Finally, this updates the the default version of dojo to the latest
patch release (1.9.2).