{"_id":"samson","_rev":"29-170aedf44620aca24b53c82cfe3126f0","name":"samson","description":"A very useful build step; read any number of files, process them as JavaScript templates, and save output to another destination.","dist-tags":{"latest":"0.3.1"},"versions":{"0.1.1":{"author":{"name":"Dr. Kibitz","email":"drkibitz@gmail.com","url":"http://github.com/drkibitz"},"preferGlobal":"true","name":"samson","description":"A very useful build step; read any number of files, process them as JavaScript templates, and save output to another destination.","version":"0.1.1","repository":{"type":"git","url":"git://github.com/drkibitz/node-samson.git"},"bin":{"samson":"./bin.js"},"main":"./main.js","engines":{"node":">=0.6.14"},"dependencies":{"dot":"0.2.4","glob":"3.1.9","mime-magic":">=0.2.6","mimeparse":">=0.1.4","mkdirp":">=0.3.2","optimist":"0.3.4"},"devDependencies":{"vows":"0.6.2"},"licenses":[{"type":"MIT","url":"http://github.com/drkibitz/node-samson/raw/master/LICENSE"}],"keywords":["build","util","process"],"_npmUser":{"name":"drkibitz","email":"drkibitz@gmail.com"},"_id":"samson@0.1.1","optionalDependencies":{},"_engineSupported":true,"_npmVersion":"1.1.21","_nodeVersion":"v0.6.17","_defaultsLoaded":true,"dist":{"shasum":"0dc03e321a7d2aba7ac8759cee5032fdc50fec62","tarball":"https://registry.npmjs.org/samson/-/samson-0.1.1.tgz","integrity":"sha512-W6H2Sex3BtNwD7+6LNelT7hQPM5fz2hDm+ZuewnfwwXswKOp2chLFthXfQvXQiupoqnlQSqDtAygtQRBtg3B9Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCWBAmK/li75TI7oHESECPWOW7XCYoWVm2U9E/V+q8gIgIgXSVnuSR0E0T82cAne6AMFt2pn0kcZ/B3LfmE5546E5c="}]},"maintainers":[{"name":"drkibitz","email":"drkibitz@gmail.com"}],"directories":{}},"0.1.2":{"author":{"name":"Dr. Kibitz","email":"drkibitz@gmail.com","url":"http://github.com/drkibitz"},"preferGlobal":"true","name":"samson","description":"A very useful build step; read any number of files, process them as JavaScript templates, and save output to another destination.","version":"0.1.2","repository":{"type":"git","url":"git://github.com/drkibitz/node-samson.git"},"bin":{"samson":"./bin.js"},"main":"./main.js","engines":{"node":">=0.6.14"},"dependencies":{"dot":"0.2.4","glob":"3.1.9","mime-magic":">=0.2.6","mimeparse":">=0.1.4","mkdirp":">=0.3.2","optimist":"0.3.4"},"devDependencies":{"vows":"0.6.2"},"licenses":[{"type":"MIT","url":"http://github.com/drkibitz/node-samson/raw/master/LICENSE"}],"keywords":["build","util","process"],"_npmUser":{"name":"drkibitz","email":"drkibitz@gmail.com"},"_id":"samson@0.1.2","optionalDependencies":{},"_engineSupported":true,"_npmVersion":"1.1.22","_nodeVersion":"v0.6.17","_defaultsLoaded":true,"dist":{"shasum":"19b56876c33dd9f6caf702eded628213ccfae718","tarball":"https://registry.npmjs.org/samson/-/samson-0.1.2.tgz","integrity":"sha512-VwyfHEVQhedBnYQjBoTJeKmHXR1aetwVoe4sibrWvuzuTjxcQ8QnHeVIX5eKpihUgQLQ7Zna+GQNFytnu/p0/g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDHgl3DynD/mqsQOk8LiqXxJxjpp8gu0RGMF/AgNYO9QQIhAJoq8y/7zeZuRz4Kdg+zvpRTO/EAb1X/WlfT6mo72ibw"}]},"maintainers":[{"name":"drkibitz","email":"drkibitz@gmail.com"}],"directories":{}},"0.2.0":{"author":{"name":"Dr. Kibitz","email":"drkibitz@gmail.com","url":"http://github.com/drkibitz"},"preferGlobal":"true","name":"samson","description":"A very useful build step; read any number of files, process them as JavaScript templates, and save output to another destination.","version":"0.2.0","repository":{"type":"git","url":"git://github.com/drkibitz/node-samson.git"},"bin":{"samson":"./bin.js"},"main":"./main.js","engines":{"node":">=0.6.14"},"dependencies":{"dot":"0.2.5","glob":"3.1.10","mime-magic":">=0.2.6","mimeparse":">=0.1.4","mkdirp":">=0.3.3","optimist":"0.3.4"},"devDependencies":{"vows":"0.6.2"},"licenses":[{"type":"MIT","url":"http://github.com/drkibitz/node-samson/raw/master/LICENSE"}],"keywords":["build","util","process"],"_npmUser":{"name":"drkibitz","email":"drkibitz@gmail.com"},"_id":"samson@0.2.0","optionalDependencies":{},"_engineSupported":true,"_npmVersion":"1.1.22","_nodeVersion":"v0.6.17","_defaultsLoaded":true,"dist":{"shasum":"03c101cd07491f06a6409b629fb42abc0d0e24e0","tarball":"https://registry.npmjs.org/samson/-/samson-0.2.0.tgz","integrity":"sha512-y/NTp/gk8rqeYO0o/ugeAwp/SuYPg2T5AqmuQszfwanuLXajbi9K/i9SA+iAy+F3OBGTzDq5cnxM6H+53+l8Hg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFlDp2LPTyGJUaNUaf6A4QPpSgmEocpo/D5zRVCXqbwEAiEAqb9Cvn2xGhQiAib3wShMarXWc8THSKvK8efDKZ8KYxk="}]},"maintainers":[{"name":"drkibitz","email":"drkibitz@gmail.com"}],"directories":{}},"0.3.0":{"author":{"name":"Dr. Kibitz","email":"drkibitz@gmail.com","url":"http://github.com/drkibitz"},"preferGlobal":"true","name":"samson","description":"A very useful build step; read any number of files, process them as JavaScript templates, and save output to another destination.","version":"0.3.0","repository":{"type":"git","url":"git://github.com/drkibitz/node-samson.git"},"bin":{"samson":"./bin.js"},"main":"./main.js","engines":{"node":">=0.6.14"},"dependencies":{"dot":"0.2.5","glob":"3.1.10","mime-magic":">=0.4.2","mimeparse":">=0.1.4","mkdirp":">=0.3.4","optimist":"0.3.4"},"devDependencies":{"vows":"0.6.2"},"licenses":[{"type":"MIT","url":"http://github.com/drkibitz/node-samson/raw/master/LICENSE"}],"keywords":["build","util","process"],"readme":"Samson\n===========\n\n### The elevator pitch:\n\nA very useful build step; read any number of files, process them as JavaScript templates, and save output to another destination.\n\n### The more descriptive version:\n\nProcess an input directory to an output directory recursively:\n\n    samson -i path/to/directory -o path/to/other/directory -R\n\nSamson's functionality can be summarized in 3 steps:\n\n1. Read any number of files that are of any size\n2. Process the content of files read as doT.js templates\n    - Each template's delimiters are defined as comment blocks specific to the processed file's language\n    - Although files are processed in chunks, the internal validation queues data until it may be processed correctly\n    - If a file's mimeType is not a processable type, then the data is simply piped through without processing\n3. Write the processed or piped data to a new location on the file system\n\nInclude samson in your own module:\n\n    var samson = require('samson');\n    samson.run(['source/dir/**/*'], {\n        copyUnknown : true,\n        outputDir   : 'build/dir',\n        recursive   : true\n    });\n\n### doT\n\nSounds pretty simple right?\n\nThe unique part of Samson is in step #2. doT.js is both the fastest, and most open-ended JavaScript template engine I've found to date, and is the engine I believe to be best suited for the task I'm trying to achieve with Samson. If you are familiar with doT, skip to the next section, otherwise now would be a good time to visit http://olado.github.com/doT/\n\nInstall\n-----------\n\nWith npm this module prefers global installation:\n\n    npm i samson -g\n\nUsage\n-----------\n\n### Settings\n\nOne thing doT allows, is defining custom delimiters before compiling a string into a template, and with that I have defined different settings for the most common comment block delimiters.\n\nA quick look at these settings:\n- html\n    - tag start `<!--{`\n    - tag end `}-->`\n- js, css, php\n    - tag start `/*{`\n    - tag end `}*/`\n- txt (the most common and default format)\n    - tag start `#{`\n    - tag end `}#`\n\nA more detailed view of these settings can be found here http://drkibitz.github.com/node-samson/Template.settingsByType.html\n\n### Example\n\nTake a look at the following example in `my-file.js`, that is not processed with Samson:\n\n    /* start */\n    /*{?argv.target !== 'release'}*/\n    var DEBUG = true;\n    /*{?}*/\n    /* end */\n\nProcess with Samson as `samson my-file.js` outputs:\n\n    /* start */\n\n    var DEBUG = true;\n\n    /* end */\n\nProcess with Samson as `samson my-file.js --target release` outputs:\n\n    /* start */\n\n\n    /* end */\n\n### Template Namespaces and Variables\n\nNotice the `argv` member accessible in the doT template. This object contains all of the script arguments parsed by the module optimist, and passed directly into the doT template.\n\nJust as within doT, the `def` object is special. Once a member property is set, it may not be changed. There is one `def` object defined for each file, and one file's template may not access another file's `def`.\n\nAdditionally but not limited to, enumerables set within `def` are passed directly to the template's runtime function as arguments. What this means is `/*{#def.FILE}*/`, may also be accessed as `/*{=FILE}*/`\n\nFor a more detailed view of the defailt members of `def`, please visit http://drkibitz.github.com/node-samson/ResourceProcessor.def.html\n\n### More Usage Examples\n\nBe sure to to look at:\n\n    samson\n    samson -h\n    samson --help\n\nProcess a single file and output to console:\n\n    samson path/to/file\n\nProcess a single file and output to file system:\n\n    samson path/to/file -o path/to/directory\n\nProcess multiple files and output to file system:\n\n    samson path/to/file1 path/to/file2 path/to/file3 -o path/to/directory\n\nProcess single directory recursively and output to file system:\n\n    samson path/to/directory -o path/to/directory -R\n\nProcess files and directories recursively and output to file system:\n\n    samson path/to/dir1 path/to/file path/to/dir2 -o path/to/directory -R\n\nProcess matched files recursively and output to file system:\n\n    samson -i path/to/* -o path/to/other/directory -R\n\n","readmeFilename":"README.md","_id":"samson@0.3.0","dist":{"shasum":"bdae0b101eb3db9982b3e2d59a20656c6d0f9ac1","tarball":"https://registry.npmjs.org/samson/-/samson-0.3.0.tgz","integrity":"sha512-8uplLXG0G/j7UJ6Ddpwsn5kyRClO/yar4AlyYdkRlXkCLBCSBkyVBgxm8/cZR6H2z/InZiGyANL+HYoEz70AAg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGiO/+x0xTXgp1Yl8kDUKC4HTNn4RjaAFpevlEqs2aUNAiBkREpmIT1GgmuFqluA1+NabcYLfzeGNZeRS34n/h0Wgw=="}]},"_from":".","_npmVersion":"1.2.10","_npmUser":{"name":"drkibitz","email":"drkibitz@gmail.com"},"maintainers":[{"name":"drkibitz","email":"drkibitz@gmail.com"}]},"0.3.1":{"author":{"name":"Dr. Kibitz","email":"drkibitz@gmail.com","url":"http://github.com/drkibitz"},"preferGlobal":"true","name":"samson","description":"A very useful build step; read any number of files, process them as JavaScript templates, and save output to another destination.","version":"0.3.1","repository":{"type":"git","url":"git://github.com/drkibitz/node-samson.git"},"bin":{"samson":"./bin.js"},"main":"./main.js","engines":{"node":">=0.8"},"dependencies":{"dot":"0.2.5","glob":"3.1.10","mime-magic":">=0.4.2","mimeparse":">=0.1.4","mkdirp":">=0.3.4","optimist":"0.3.4"},"devDependencies":{"vows":"0.6.2"},"licenses":[{"type":"MIT","url":"http://github.com/drkibitz/node-samson/raw/master/LICENSE"}],"keywords":["build","util","process"],"readme":"Samson\n===========\n\n### The elevator pitch:\n\nA very useful build step; read any number of files, process them as JavaScript templates, and save output to another destination.\n\n### The more descriptive version:\n\nProcess an input directory to an output directory recursively:\n\n    samson -i path/to/directory -o path/to/other/directory -R\n\nSamson's functionality can be summarized in 3 steps:\n\n1. Read any number of files that are of any size\n2. Process the content of files read as doT.js templates\n    - Each template's delimiters are defined as comment blocks specific to the processed file's language\n    - Although files are processed in chunks, the internal validation queues data until it may be processed correctly\n    - If a file's mimeType is not a processable type, then the data is simply piped through without processing\n3. Write the processed or piped data to a new location on the file system\n\nInclude samson in your own module:\n\n    var samson = require('samson');\n    samson.run(['source/dir/**/*'], {\n        copyUnknown : true,\n        outputDir   : 'build/dir',\n        recursive   : true\n    });\n\n### doT\n\nSounds pretty simple right?\n\nThe unique part of Samson is in step #2. doT.js is both the fastest, and most open-ended JavaScript template engine I've found to date, and is the engine I believe to be best suited for the task I'm trying to achieve with Samson. If you are familiar with doT, skip to the next section, otherwise now would be a good time to visit http://olado.github.com/doT/\n\nInstall\n-----------\n\nWith npm this module prefers global installation:\n\n    npm i samson -g\n\nUsage\n-----------\n\n### Settings\n\nOne thing doT allows, is defining custom delimiters before compiling a string into a template, and with that I have defined different settings for the most common comment block delimiters.\n\nA quick look at these settings:\n- html\n    - tag start `<!--{`\n    - tag end `}-->`\n- js, css, php\n    - tag start `/*{`\n    - tag end `}*/`\n- txt (the most common and default format)\n    - tag start `#{`\n    - tag end `}#`\n\nA more detailed view of these settings can be found here http://drkibitz.github.com/node-samson/docs/0.3.1/Template.settingsByType.html\n\n### Example\n\nTake a look at the following example in `my-file.js`, that is not processed with Samson:\n\n    /* start */\n    /*{?argv.target !== 'release'}*/\n    var DEBUG = true;\n    /*{?}*/\n    /* end */\n\nProcess with Samson as `samson my-file.js` outputs:\n\n    /* start */\n\n    var DEBUG = true;\n\n    /* end */\n\nProcess with Samson as `samson my-file.js --target release` outputs:\n\n    /* start */\n\n\n    /* end */\n\n### Template Namespaces and Variables\n\nNotice the `argv` member accessible in the doT template. This object contains all of the script arguments parsed by the module optimist, and passed directly into the doT template.\n\nJust as within doT, the `def` object is special. Once a member property is set, it may not be changed. There is one `def` object defined for each file, and one file's template may not access another file's `def`.\n\nAdditionally but not limited to, enumerables set within `def` are passed directly to the template's runtime function as arguments. What this means is `/*{#def.FILE}*/`, may also be accessed as `/*{=FILE}*/`\n\nFor a more detailed view of the defailt members of `def`, please visit http://drkibitz.github.com/node-samson/docs/0.3.1/ResourceProcessor.def.html\n\n### More Usage Examples\n\nBe sure to to look at:\n\n    samson\n    samson -h\n    samson --help\n\nProcess a single file and output to console:\n\n    samson path/to/file\n\nProcess a single file and output to file system:\n\n    samson path/to/file -o path/to/directory\n\nProcess multiple files and output to file system:\n\n    samson path/to/file1 path/to/file2 path/to/file3 -o path/to/directory\n\nProcess single directory recursively and output to file system:\n\n    samson path/to/directory -o path/to/directory -R\n\nProcess files and directories recursively and output to file system:\n\n    samson path/to/dir1 path/to/file path/to/dir2 -o path/to/directory -R\n\nProcess matched files recursively and output to file system:\n\n    samson -i path/to/* -o path/to/other/directory -R\n\n","readmeFilename":"README.md","_id":"samson@0.3.1","dist":{"shasum":"332dc03753d499296f7269e59ec64ba2067a4219","tarball":"https://registry.npmjs.org/samson/-/samson-0.3.1.tgz","integrity":"sha512-HKhyDAjWZxaFz4BjCID940KQV9u9HGSkFSZCN0arNOPCyrnpMjpy7D7FR8zM4M5m0O7rLLg0KU6PunzVMgs0zA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFEZW9b2FQABDhk27QcaSGAhgnVq+4QwoQ0jzUB39JddAiBdi0V2bIzuAvIsaYldYx0K9MA0eNsXC12ZxvQFr2RWtw=="}]},"_from":".","_npmVersion":"1.2.10","_npmUser":{"name":"drkibitz","email":"drkibitz@gmail.com"},"maintainers":[{"name":"drkibitz","email":"drkibitz@gmail.com"}]}},"readme":"node-samson\n===========\n\nA very useful build step; read any number of files, process them as JavaScript templates, and save output to another destination.","maintainers":[{"name":"drkibitz","email":"drkibitz@gmail.com"}],"time":{"modified":"2022-06-26T15:50:14.237Z","created":"2012-05-20T08:06:12.823Z","0.1.0":"2012-05-20T08:06:14.240Z","0.1.1":"2012-05-20T08:50:00.405Z","0.1.2":"2012-05-21T16:03:14.037Z","0.2.0":"2012-06-21T16:58:17.167Z","0.3.0":"2013-02-13T04:21:38.495Z","0.3.1":"2013-02-13T22:59:48.184Z"},"author":{"name":"Dr. Kibitz","email":"drkibitz@gmail.com","url":"http://github.com/drkibitz"},"repository":{"type":"git","url":"git://github.com/drkibitz/node-samson.git"}}