{"_id":"assets-pipeline","_rev":"34-8af57be8d3a4c993adeea3230d1be909","name":"assets-pipeline","time":{"modified":"2022-06-13T03:34:34.101Z","created":"2014-04-14T06:19:34.411Z","0.0.1":"2014-04-14T06:19:39.576Z","0.0.2":"2014-05-04T08:13:31.449Z","0.0.3":"2014-05-05T09:50:12.400Z","0.0.4":"2014-05-05T10:00:43.727Z","0.0.5":"2014-05-06T05:58:21.063Z","0.0.6":"2014-05-13T04:24:49.115Z"},"maintainers":[{"name":"theroman","email":"roman@kalyakin.com"}],"description":"Smart assets pipeline for node.js.","readme":"assets-pipeline\n===============\n\nSmart assets pipeline for node.js. Minify, compile and deploy Javascript, CSS and Less locally, to S3 or via SCP. Cachebuster included.\n\nUsage\n=====\n\n```js\nvar Assets = require(\"assets-pipeline\").Assets;\n\nvar assets = new Assets({\n    js: { // all .js files are minified using UglifyJS\n        app: [ // files are merged to \"js/app.js\"\n            \"js/myapp.js\"\n        ],\n        lib: [ // files are merged to \"js/lib.js\"\n            \"js/jquery.js\",\n            \"js/angular.js\"\n        ]\n    },\n    css: { // all .css files are minified using clean-css\n        app: [ // \"css/app.css\"\n            \"css/theme.css\"\n        ]\n    },\n    less: { // all .less files are converted to .css\n        lib: [ // \"css/lib.css\"\n            \"less/theme.less\"\n        ]\n    },\n    statics: [ // static files are copied recursively\n        \"favico.ico\", // a file\n        \"img\" // a directory\n    ],\n    assetsDirectory: __dirname + \"/assets\", // where our source files are\n    deployment: {\n        method: \"cp\",\n        prefix: \"/opt/assets/\"\n    },\n    production: process.env.NODE_ENV === 'production', // render sources or deployed\n    localPrefix: '/assets', // sources are rendered with this prefix\n    productionPrefix: 'http://mycdn.com/myapp', // deployed are rendered with this prefix\n    useCachebuster: true // use git versin or Date() as css and js files suffix (\"app.js\" -> \"app-12312312312312.js\"). default false\n    // lessScriptUrl: '/assets/js/less.js' // defaults to a cdn file\n});\n\n// \"/assets/app.js\" or \"http://mycdn.com/myapp/app.js\"\nconsole.log(assets.jsToHtml('app'));\nconsole.log(assets.cssToHtml('app'));\nconsole.log(assets.lessToHtml('app'));\nconsole.log(assets.staticUrl('favicon.ico'));\n\nassets.deploy(function(err) {\n  if (err) {\n    console.log(err.stack)\n    console.error(err);\n    console.log(\"Not deployed\");\n  } else {\n    console.log(\"Deployed!\");\n  }\n});\n\n```\n\nDeployers\n=========\n\n * cp\n\n Copy files locally.\n\n ```js\n deployment: {\n    method: \"cp\",\n    prefix: \"/opt/myapp/assets\", // directory where assets are uploaded\n }\n ```\n\n* scp\n\n Copy files remotely (See [scp2](https://www.npmjs.org/package/scp2) npm module for more configuration options).\n\n ```js\n deployment: {\n    method: \"scp\",\n    prefix: \"/opt/myapp/assets\" // directory on the server where assets are uploaded\n    host: \"mycdn.com\",\n    username: \"me\",\n    privateKey: require('fs').readFileSync(\"/Users/me/.ssh/id_rsa\"),\n }\n ```\n\n* s3\n\n Upload files to S3 (See [knox](https://www.npmjs.org/package/knox) npm module for more configuration options). The deployer will guess MIME type of each file and add a relevant `Content-Type` header.\n\n ```js\n deployment: {\n    method: \"s3\",\n    key: process.env.S3_KEY,\n    secret: process.env.S3_SECRET,\n    bucket: 'my-cdn-bucket',\n    prefix: '/assets', // prefix (directory) added to every file name.\n    headers: {'x-amz-meta-extra-header': 'bar'}, // optional S3 metadata\n    gzipContentTypes: ['text/css', 'application/javascript'], // gzip content of the files with the following type before uploading. This will also add 'Content-Encoding: gzip' to these files. By default the list is empty (nothing is gzipped).\n }\n ```\n\nExample\n=======\n\nThere is an example express application in [examples](./examples) directory to try it out.\n","versions":{"0.0.2":{"name":"assets-pipeline","version":"0.0.2","description":"Assets pipeline for node.js","keywords":["assets","pipeline","static","cdn","less","css","js","scp","images","web","version","cachebuster","cache","minify","compress"],"author":{"name":"Roman Kalyakin","email":"roman@kalyakin.com"},"repository":{"type":"git","url":"git://github.com/theorm/assets-pipeline.git"},"dependencies":{"lodash":"~2.4.1","less":"~1.7.0","uglify-js":"~2.4.13","bluebird":"~1.2.1","knox":"~0.8.9","clean-css":"~2.1.8","recursive-readdir":"~1.0.0","mime":"~1.2.11","execSync":"~1.0.1-pre","mkdirp":"~0.4.0","ncp":"~0.5.1","scp2":"~0.1.4"},"devDependencies":{"mocha":"*","should":"*"},"main":"index","bugs":{"url":"https://github.com/theorm/assets-pipeline/issues"},"_id":"assets-pipeline@0.0.2","dist":{"shasum":"00852eb382fa427827ec43f7e488d71093b586e1","tarball":"https://registry.npmjs.org/assets-pipeline/-/assets-pipeline-0.0.2.tgz","integrity":"sha512-T7mXLAlNcbUGfrUFCZl0C00/bQfCfDMCOqFAUJ7MwgtlrREghzijw15a4n/l5W2Kl172qeYtChzW6H2tt+WVZw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBep5ptZn+sLFl+rA2tzgPLI98pXZQGVF7LRforjtDJnAiAyLvzO6LCfj5LqcaBiNGCIOa5UY3MMvhrU3LW8JcoAdQ=="}]},"_from":".","_npmVersion":"1.3.11","_npmUser":{"name":"theroman","email":"roman@kalyakin.com"},"maintainers":[{"name":"theroman","email":"roman@kalyakin.com"}]},"0.0.3":{"name":"assets-pipeline","version":"0.0.3","description":"Assets pipeline for node.js","keywords":["assets","pipeline","static","cdn","less","css","js","scp","images","web","version","cachebuster","cache","minify","compress","express"],"author":{"name":"Roman Kalyakin","email":"roman@kalyakin.com"},"repository":{"type":"git","url":"http://github.com/theorm/assets-pipeline.git"},"dependencies":{"lodash":"~2.4.1","less":"~1.7.0","uglify-js":"~2.4.13","bluebird":"~1.2.1","knox":"~0.8.9","clean-css":"~2.1.8","recursive-readdir":"~1.0.0","mime":"~1.2.11","execSync":"~1.0.1-pre","mkdirp":"~0.4.0","ncp":"~0.5.1","scp2":"~0.1.4"},"devDependencies":{"mocha":"*","should":"*","express":"~4.1.1","jade":"~1.3.1","colors":"~0.6.2"},"main":"index","bugs":{"url":"https://github.com/theorm/assets-pipeline/issues"},"_id":"assets-pipeline@0.0.3","dist":{"shasum":"f3567b0e79d95c166e9a49e29e71bb42c2d60731","tarball":"https://registry.npmjs.org/assets-pipeline/-/assets-pipeline-0.0.3.tgz","integrity":"sha512-vZHUjY9dHDfp/Pwiyj9kX7GiZha2zT6ZBMXOJQhAi7kfp1zDhmAUPL/v4WjYvmYA2XF3czTqYy/RvbYGJJwuPg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICBsZZw2EY8MpZYDJRNTQ0x09QV8mw7KL9UxsPqhUkd4AiEAvpcOcu0MURBFm/6xZWdWX1xeUq3clKQJbzzpFmgF9mk="}]},"_from":".","_npmVersion":"1.3.11","_npmUser":{"name":"theroman","email":"roman@kalyakin.com"},"maintainers":[{"name":"theroman","email":"roman@kalyakin.com"}]},"0.0.4":{"name":"assets-pipeline","version":"0.0.4","description":"Smart assets pipeline for node.js. Minify, compile and deploy Javascript, CSS and Less locally, to S3 or via SCP. Cachebuster included.","keywords":["assets","pipeline","static","cdn","less","css","js","scp","images","web","version","cachebuster","cache","minify","compress","express"],"author":{"name":"Roman Kalyakin","email":"roman@kalyakin.com"},"homepage":"http://github.com/theorm/assets-pipeline","repository":{"type":"git","url":"git://github.com/theorm/assets-pipeline.git"},"dependencies":{"lodash":"~2.4.1","less":"~1.7.0","uglify-js":"~2.4.13","bluebird":"~1.2.1","knox":"~0.8.9","clean-css":"~2.1.8","recursive-readdir":"~1.0.0","mime":"~1.2.11","execSync":"~1.0.1-pre","mkdirp":"~0.4.0","ncp":"~0.5.1","scp2":"~0.1.4"},"devDependencies":{"mocha":"*","should":"*","express":"~4.1.1","jade":"~1.3.1","colors":"~0.6.2"},"main":"index","engines":{"node":">=0.8.0"},"bugs":{"url":"https://github.com/theorm/assets-pipeline/issues"},"_id":"assets-pipeline@0.0.4","dist":{"shasum":"60310068a9ce3fd432af57ee4b2e7bd8fe438024","tarball":"https://registry.npmjs.org/assets-pipeline/-/assets-pipeline-0.0.4.tgz","integrity":"sha512-nx0oJo5rAT6QL071+OhF1AA3BY0Q2atNwGPt2eKOZT/oEDbvbkBz3lvLF2HsNTCFo3AxJeaGFMJ+XQ7QMdTRTw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAq6iJkQ/Yaso0JWunWiwBAC58gfZ9Rt4Xlz9m2H61r6AiAKUcibhHVddpf5JA77ayuznYf2zaM4Qde1zcBDYzle7g=="}]},"_from":".","_npmVersion":"1.3.11","_npmUser":{"name":"theroman","email":"roman@kalyakin.com"},"maintainers":[{"name":"theroman","email":"roman@kalyakin.com"}]},"0.0.5":{"name":"assets-pipeline","version":"0.0.5","description":"Smart assets pipeline for node.js.","keywords":["assets","pipeline","static","cdn","less","css","js","scp","images","web","version","cachebuster","cache","minify","compress","express","s3","aws","gzip"],"author":{"name":"Roman Kalyakin","email":"roman@kalyakin.com"},"homepage":"http://github.com/theorm/assets-pipeline","repository":{"type":"git","url":"git://github.com/theorm/assets-pipeline.git"},"dependencies":{"lodash":"~2.4.1","less":"~1.7.0","uglify-js":"~2.4.13","bluebird":"~1.2.1","knox":"~0.8.9","clean-css":"~2.1.8","recursive-readdir":"~1.0.0","mime":"~1.2.11","execSync":"~1.0.1-pre","mkdirp":"~0.4.0","ncp":"~0.5.1","scp2":"~0.1.4"},"devDependencies":{"mocha":"*","should":"*","express":"~4.1.1","jade":"~1.3.1","colors":"~0.6.2"},"main":"index","engines":{"node":">=0.8.0"},"bugs":{"url":"https://github.com/theorm/assets-pipeline/issues"},"_id":"assets-pipeline@0.0.5","dist":{"shasum":"380eaa179771f0ce1ee58d9aeec75ddbdc80fb66","tarball":"https://registry.npmjs.org/assets-pipeline/-/assets-pipeline-0.0.5.tgz","integrity":"sha512-Ad/lDzK/mxOY4uSvV880ymB7Og3E8mKdhY8+3FHpnu84/XP24CEyQcr6TB2sSFIuJRR5dADjEXQmJOOvZjmXxA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIH5vB32jfwm/2uBz7pQ89PGOmP5j284lqsrvHI2+hDDaAiEA2DiG3NBKSpWwq3tyhLcqAUyiC9sA1I9LzcrY1FKDGVg="}]},"_from":".","_npmVersion":"1.3.11","_npmUser":{"name":"theroman","email":"roman@kalyakin.com"},"maintainers":[{"name":"theroman","email":"roman@kalyakin.com"}]},"0.0.6":{"name":"assets-pipeline","version":"0.0.6","description":"Smart assets pipeline for node.js.","keywords":["assets","pipeline","static","cdn","less","css","js","scp","images","web","version","cachebuster","cache","minify","compress","express","s3","aws","gzip"],"author":{"name":"Roman Kalyakin","email":"roman@kalyakin.com"},"homepage":"http://github.com/theorm/assets-pipeline","repository":{"type":"git","url":"git://github.com/theorm/assets-pipeline.git"},"dependencies":{"lodash":"~2.4.1","less":"~1.7.0","uglify-js":"~2.4.13","bluebird":"~1.2.1","knox":"~0.8.9","clean-css":"~2.1.8","recursive-readdir":"~1.0.0","mime":"~1.2.11","execSync":"~1.0.1-pre","mkdirp":"~0.4.0","ncp":"~0.5.1","scp2":"~0.1.4"},"devDependencies":{"mocha":"*","should":"*","express":"~4.1.1","jade":"~1.3.1","colors":"~0.6.2"},"main":"index","engines":{"node":">=0.8.0"},"bugs":{"url":"https://github.com/theorm/assets-pipeline/issues"},"_id":"assets-pipeline@0.0.6","dist":{"shasum":"7db8b553c66033818f1d40764d5319848fce9f37","tarball":"https://registry.npmjs.org/assets-pipeline/-/assets-pipeline-0.0.6.tgz","integrity":"sha512-ZMjpyrmYR4Rmw7wRHG+boXSEsrF8rZoB9NBY0HgOAYc3bBiCygyf1W+F+Ryr5fGCwY/AOpFnVYeM2l17PucQyQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC+CSis+hCtVb2ru+aGplU+xIWUttmbYS6Ay+k2GXgdJwIhAIDAtFWxsUqX2kx8KY1LaTHAWuWCEcqXZma9yU5EyTu8"}]},"_from":".","_npmVersion":"1.3.11","_npmUser":{"name":"theroman","email":"roman@kalyakin.com"},"maintainers":[{"name":"theroman","email":"roman@kalyakin.com"}]}},"dist-tags":{"latest":"0.0.6"},"readmeFilename":"README.md","keywords":["assets","pipeline","static","cdn","less","css","js","scp","images","web","version","cachebuster","cache","minify","compress","express","s3","aws","gzip"],"repository":{"type":"git","url":"git://github.com/theorm/assets-pipeline.git"},"author":{"name":"Roman Kalyakin","email":"roman@kalyakin.com"},"bugs":{"url":"https://github.com/theorm/assets-pipeline/issues"},"homepage":"http://github.com/theorm/assets-pipeline","users":{"theroman":true,"lundepm":true,"adriancmiranda":true}}