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

Nodemon refactor & JSON config #200

Merged
merged 121 commits into from Dec 29, 2013

Conversation

@remy
Copy link
Owner

commented Aug 1, 2013

  • Ready to be merged

To start experimenting with this build: npm install -g nodemon@dev and please leave feedback & file issues

This is the start of a complete restructuring of nodemon's source code, since currently it's a massive one script which can be difficult to test (and frankly the tests are limited right now) and difficult to contribute to.

So I'm breaking all the functionality down to small modules.

Key features of the new work:

  • All modules are testable and have tests
  • JSON support looking for nodemon.json with overriding defaults kept in ~/nodemon.json. The JSON file will allow for all command line options to be stored in JSON
  • Better, safer, parsing of command line args
  • Supports old style nodemon ignore files
  • Update readme with new config
  • Test, test, test!
  • Mac tested
  • Linux tested (ubuntu)
  • Windows tested

The whole code base is getting gutted, but I'm wary of making sure that the actual code gets carried across (because I know there's been a lot of fixes for Windows and edge cases).

Right now, the code is not in a good state, I'm still the file up, but I'm up for contributions, particularly to test modules.

I'm using @mwbrooks' and @filmaj's slides from their experience building the Cordova & PhoneGap CLI as inspiration: http://michaelbrooks.ca/deck/2013-node-brigade/

Addition feature checklist

  • execmap ref: #195
  • debug flag (to show what nodemon is doing)
  • only eats nodemon arguments, and ignores all after user script ref: #181
  • ignore files via the command line (in addition to config), ref #172
  • nodemon module require'able
  • user script extension takes priority as to what program is used as exec, ref #202
  • when using --exec don't try to detect the script, ref #216
  • ignores .git and node_modules/**/node_modules by default, ref #230
@mwbrooks

This comment has been minimized.

Copy link

commented Aug 1, 2013

Yay! I'm glad to see that the talk was useful to others.

@remy

This comment has been minimized.

Copy link
Owner Author

commented Aug 1, 2013

@mwbrooks I actually missed the talk, and am eagerly awaiting the video to be released, but I got quite a bit from your slides and from various projects have quite a bit of familiarity already. Still, definitely useful stuff.

remy added 2 commits Aug 4, 2013
Argument parsing, and executable support and tests
Includes simple passing tests, the exec.js has not been tested in detail yet.
Testing the exec rules and the parser
Still lots to do, but taking a very code, test, code, test, test, test, code, test cycle.
remy added 3 commits Aug 7, 2013
Trying to simplify the chain of nodemon process
Making it so lib/cli/ can just spew out options, and make it easier to test against too.
@ludoza

This comment has been minimized.

Copy link

commented Aug 20, 2013

A hack that works for me at the moment is:

nodemon -e js,json,html,css  -x "echo `kanso install` `kanso push`"

That is now if you don't mind the double output in the terminal.

This should work on any unix based system.

Basic running and restarting working
Also config static module is used by the parts of nodemon to run the thing.

Ignore rules, on the command line also work - a nice new feature.
remy added 2 commits Oct 29, 2013
Loading .json files, parsing cli & detailed output
- Loads $HOME/nodemon.json
- Then ./nodemon.json
- Then overwrites with cli (or module) settings
- -V gives detail of what's going on inside nodemon
- -q shuts nodemon up entirely
- Cleaner config loading breakup
remy added 10 commits Dec 12, 2013
@remy

This comment has been minimized.

Copy link
Owner Author

commented Dec 14, 2013

Require tests failing in linux, but passing on Mac. Yay :( will fix this w/e.

@remy remy referenced this pull request Dec 21, 2013

@remy remy merged commit 80379a7 into master Dec 29, 2013

@remy remy deleted the feature/json-config branch Jan 5, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.