cli-juggle

watch files and execute command on change

juggle

juggle is a command line utility that sits and watches files and takes action on changes.

describe what you want watched and what you want to do in the manifest.json

npm install -g juggle
{
  "watch":[
    {
      "who":{
        "path":"./less",
        "regex":"\\.less$"
      },
      "action":{
        "cmds":[
          {
            "name":"LESS => CSS",
            "cmd": "lessc",
            "args":[
              "{{fullfile}}", 
              "css/{{filename}}.css"
            ]
          }
        ]
      }
    },
    ...
  ]
}
aclark >> juggle manifest.json
{{fullfile}} # full file name 'less/style.less'
{{fileext}}  # file extension '.less'
{{path}}     # path of file   'less'
{{filename}} # name of file   'style'
  • As of 0.1.0 this will not work on Windows due to limitations in the syncExec package.
  • On OSX you will need Xcode installed.
  • tie in growl/notification support
  • more tests
  • better example