{"_id":"sentinel","_rev":"10-302731e07e0dba6f6590e644c5d52c3e","name":"sentinel","description":"Watch source files for changes and processes them accordingly","dist-tags":{"latest":"1.0.1"},"versions":{"1.0.0":{"name":"sentinel","description":"Watch source files for changes and processes them accordingly","keywords":["build","automation"],"author":{"name":"Oliver Caldwell","email":"olliec87@gmail.com","url":"http://olivercaldwell.co.uk/"},"main":"./sentinel.js","contributors":[],"version":"1.0.0","bin":{"sentinel":"./sentinel-binary.js"},"engines":{"node":">=0.4.0"},"dependencies":{},"devDependencies":{},"homepage":"https://github.com/Wolfy87/sentinel","repository":{"type":"git","url":"git://github.com/Wolfy87/sentinel.git"},"_npmUser":{"name":"olivercaldwell","email":"olliec87@gmail.com"},"_id":"sentinel@1.0.0","_engineSupported":true,"_npmVersion":"1.0.105","_nodeVersion":"v0.6.1","_defaultsLoaded":true,"dist":{"shasum":"7e6abc17c8a5930133cf32a46e8a905839435e33","tarball":"https://registry.npmjs.org/sentinel/-/sentinel-1.0.0.tgz","integrity":"sha512-U551aCoDCjLH7Q/LbXlkwmIwtRaAXL3PHZS95HiPfhMa2az+iuUGUA8XiKPrcNGcw2mE/oQKK9ZN7kqfm3FOZA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICNBpN0gjdVe8RV4UcB6cn4x/ZClcJM7ol4/UIwHOPEBAiEAsuGAxiW/Imo3TkxgrHxWnZZsnkmm+mfSGD/GMzvS+04="}]},"maintainers":[{"name":"olivercaldwell","email":"olliec87@gmail.com"}]},"1.0.1":{"name":"sentinel","description":"Watch source files for changes and processes them accordingly","keywords":["build","automation"],"author":{"name":"Oliver Caldwell","email":"olliec87@gmail.com","url":"http://olivercaldwell.co.uk/"},"main":"./sentinel.js","contributors":[],"version":"1.0.1","bin":{"sentinel":"./sentinel-binary.js"},"dependencies":{},"devDependencies":{},"homepage":"https://github.com/Wolfy87/sentinel","repository":{"type":"git","url":"git://github.com/Wolfy87/sentinel.git"},"_npmUser":{"name":"olivercaldwell","email":"olliec87@gmail.com"},"_id":"sentinel@1.0.1","engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.0.106","_nodeVersion":"v0.6.4","_defaultsLoaded":true,"dist":{"shasum":"57977892a06f4dee61d5000924d7e76e4815d4b4","tarball":"https://registry.npmjs.org/sentinel/-/sentinel-1.0.1.tgz","integrity":"sha512-elfTMjEXrP1EgUOUxT/MJK8feQQ8KLQc/48Cl6N5M/r9zSbV+aUCYd0BnDe8uH7pwjs6ZjC++S0kX0kDzkYzig==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICNnDQNALqho2200KVG4zkaQcTr4OCluZmLM1fUNuE+XAiB5HIVoS1Va8sBk/2dJcBHjFo1jTKNwONtB3pNdq9DDCg=="}]},"maintainers":[{"name":"olivercaldwell","email":"olliec87@gmail.com"}]}},"readme":"# sentinel\n\nThis program, when configured correctly, will watch your source files and run them through other programs when they are modified. It was intended for [LESS](http://lesscss.org/) and JavaScript files although can be set up to run anything you want. sentinel is built to run on [node.js](http://nodejs.org/).\n\nAt the moment the only way to stop it is with `Ctrl + C`. I am planning on implementing some kind of interface so that you can prompt things like reloading the config, or forcing the processing of a file. I would also like to add regular expression file matching.\n\n## Installation\n\nYou can either download this repository or use [npm](http://npmjs.org/). I strongly recommend npm. To install it simply type:\n\n    sudo npm install sentinel -g\n\nThat's it. Done.\n\n## Configuration\n\nLike `make`, sentinel looks in your current directory for a config file. This file should be named `sentinel.json`. It will also look for a global config in your home directory called `.sentinel.json`. The local one in your current folder will overwrite things set in the global one via inheritance.\n\nAs you can tell from the name, the configuration is written in JSON, lets have a look at a very basic one that runs a JavaScript file through JSHint.\n\n    {\n        \"files\": [\n            {\n                \"path\": \"assets/javascript/main.js\",\n                \"processor\": \"jshint\"\n            }\n        ],\n        \"processors\": {\n            \"jshint\": \"jshint {{path}}\"\n        }\n    }\n\nLets walk through this. We have a fairly simple JSON object containing two top level properties, `files` and `processors`. Files is an array of objects that contain data about your source files. Each of the files values are actually arguments, this is because they replace their associated value in the processor string. So if you write `{{path}}` in your processor it will be replaced with the path value. The processor value can either be a string or an array of strings, these let sentinel know what processor you wish to run the file through.\n\nThe processors object is a list of key value pairs containing the name of the processor and a small bash script to run your script to. You can utilise any passed values in a file object by simply wrapping the name of the value in double curly braces (`{{value name}}`). So you can use the path value as an input and output as the destination.\n\nIf you wanted to, you could copy this (less the files array) into `~/.sentinel.json` and have the JSHint processor available in every project.\n\n## Running sentinel\n\nTo run sentinel simply navigate your terminal to the directory containing your configuration and run `sentinel`. It will read your global config file first and then the one inside the directory. It will watch your files for changes and run them through their processors when it needs to.\n\nThere are a few command line arguments you can use too.\n\n * --verbose / -v: Show verbose output, so information will be logged to the console when files change for example.\n * --process file / -p file: Does not watch any files but instantly processes the file you specify, just like make. The file name must match one in the config exactly.\n\n## Example configurations\n\nSimply drop these into the `processors` section of your global config. You can find it in `~/.sentinel.json`. Here is a template you can use.\n\n    {\n        \"processors\": {\n            \n        }\n    }\n\nRemember to add commas after each processor! Please make sure you are using valid JSON. If something is not working, run with the `-v` parameter to see information regarding errors. The following lines use external packages installed via [npm](http://npmjs.org/).\n\n * \"less\": \"lessc {{path}} -x -o {{output}}\"\n * \"jshint\": \"jshint {{path}}\"\n * \"uglifyjs\": \"uglifyjs -o {{output}} {{path}}\"\n\n## Licence\n\nsentinel - Watch source files for changes and processes them accordingly\n\nCopyright (C) 2011 Oliver Caldwell\n\nThis program is free software: you can redistribute it and/or modify\nit under the terms of the GNU General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nThis program is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU General Public License for more details.\n\nYou should have received a copy of the GNU General Public License\nalong with this program.  If not, see <http://www.gnu.org/licences/gpl.html>.\n\n## Author\n\nWritten by [Oliver Caldwell](http://olivercaldwell.co.uk).","maintainers":[{"email":"blueglue@fastmail.com","name":"alixander"},{"email":"olliec87@gmail.com","name":"olical"}],"time":{"modified":"2022-06-26T17:44:45.679Z","created":"2011-11-14T14:27:24.925Z","1.0.0":"2011-11-14T14:27:26.392Z","1.0.1":"2011-12-11T12:23:15.785Z"},"author":{"name":"Oliver Caldwell","email":"olliec87@gmail.com","url":"http://olivercaldwell.co.uk/"},"repository":{"type":"git","url":"git://github.com/Wolfy87/sentinel.git"},"homepage":"https://github.com/Wolfy87/sentinel","keywords":["build","automation"],"contributors":[],"readmeFilename":""}