{"_id":"assetmanager","_rev":"27-85906497cef853e0771616a25b89396d","name":"assetmanager","description":"Asset manager easily allows you to switch between development and production css and js files in your templates by managing them in a single json file that's still compatible with grunt cssmin and uglify.","dist-tags":{"latest":"1.2.3"},"versions":{"0.1.0":{"name":"assetmanager","version":"0.1.0","description":"Asset manager easily allows you to switch between development and production css and js files in your templates by managing them in a single json file that's still compatible with grunt cssmin and uglify.","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"https://github.com/ReedD/node-assetmanager"},"keywords":["asset","manager","css","js","layout"],"author":{"name":"Reed Dadoune","email":"Reed@Dadoune.com","url":"http://www.dadoune.com/"},"license":"MIT","bugs":{"url":"https://github.com/ReedD/node-assetmanager/issues"},"homepage":"https://github.com/ReedD/node-assetmanager","dependencies":{"glob":"^3.2.9","underscore":"^1.6.0"},"_id":"assetmanager@0.1.0","dist":{"shasum":"bda52931e1a064ac96e383f7f70a14cf03f9d46e","tarball":"https://registry.npmjs.org/assetmanager/-/assetmanager-0.1.0.tgz","integrity":"sha512-HK3Nzyg7bXILWLkli44EWBqSCpGZe50VrThAWGKfmyEQzI4IxE7MRwxgtN+8SH6OrUQ+b3aqi3z6/G1DNY2oTg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHjH62Ha+H9W8GwX0qmrJcrzEygHXEuKjj5ydNnjLPSfAiEAicgqyYG+AjAxfl6i0s4LEOMYWWTT5/emOb2gZJQ4Xm8="}]},"_from":"./","_npmVersion":"1.4.4","_npmUser":{"name":"reedd","email":"reed@dadoune.com"},"maintainers":[{"name":"reedd","email":"reed@dadoune.com"}]},"0.1.1":{"name":"assetmanager","version":"0.1.1","description":"Asset manager easily allows you to switch between development and production css and js files in your templates by managing them in a single json file that's still compatible with grunt cssmin and uglify.","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"https://github.com/ReedD/node-assetmanager"},"keywords":["asset","manager","css","js","layout"],"author":{"name":"Reed Dadoune","email":"Reed@Dadoune.com","url":"http://www.dadoune.com/"},"license":"MIT","bugs":{"url":"https://github.com/ReedD/node-assetmanager/issues"},"homepage":"https://github.com/ReedD/node-assetmanager","dependencies":{"glob":"^3.2.9","underscore":"^1.6.0"},"_id":"assetmanager@0.1.1","dist":{"shasum":"81630f2fa152b078cc7a58210372e9c3e96841f6","tarball":"https://registry.npmjs.org/assetmanager/-/assetmanager-0.1.1.tgz","integrity":"sha512-gmIZj0LBfAFzk7+9ps+TGWbTiwv51rSp/eCjPiNXkwmzkaN8NfUzDc+fd0d05nOOx1M8cIK+KFViJvodvHmEXA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDCobaVRNW2307D53L4fmbqOcy0jiUA5P96vh+jBKwamgIgEx1xbe9FCjshFLoM2fPzDjZY/0YO7oWJ8c7kVRUUYFk="}]},"_from":".","_npmVersion":"1.4.4","_npmUser":{"name":"reedd","email":"reed@dadoune.com"},"maintainers":[{"name":"reedd","email":"reed@dadoune.com"}]},"0.1.2":{"name":"assetmanager","version":"0.1.2","description":"Asset manager easily allows you to switch between development and production css and js files in your templates by managing them in a single json file that's still compatible with grunt cssmin and uglify.","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"https://github.com/ReedD/node-assetmanager"},"keywords":["asset","manager","css","js","layout"],"author":{"name":"Reed Dadoune","email":"Reed@Dadoune.com","url":"http://www.dadoune.com/"},"license":"MIT","bugs":{"url":"https://github.com/ReedD/node-assetmanager/issues"},"homepage":"https://github.com/ReedD/node-assetmanager","dependencies":{"glob":"^3.2.9","underscore":"^1.6.0"},"_id":"assetmanager@0.1.2","dist":{"shasum":"cf786f141299ed141bd5e13fd4ba30c56fd4ed13","tarball":"https://registry.npmjs.org/assetmanager/-/assetmanager-0.1.2.tgz","integrity":"sha512-AAK4nOdDyyUfGISQRgIUsXsJHUUiRkP2fV5fLhkeTsV/YOpWIa1Vxvk0bJH917RJhjwQV49xm+0UQAZ9yW5BCw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDxXIxUtL9a9gYMraSynkRQT2q0QqI3l15M5SkGZvWuaQIhAJmN6IOaVCyX3iAuYL55qWGFeGVuOsqPynNyZbejv4wd"}]},"_from":".","_npmVersion":"1.4.4","_npmUser":{"name":"reedd","email":"reed@dadoune.com"},"maintainers":[{"name":"reedd","email":"reed@dadoune.com"}]},"0.1.3":{"name":"assetmanager","version":"0.1.3","description":"Asset manager easily allows you to switch between development and production css and js files in your templates by managing them in a single json file that's still compatible with grunt cssmin and uglify.","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"https://github.com/ReedD/node-assetmanager"},"keywords":["asset","manager","css","js","layout"],"author":{"name":"Reed Dadoune","email":"Reed@Dadoune.com","url":"http://www.dadoune.com/"},"license":"MIT","bugs":{"url":"https://github.com/ReedD/node-assetmanager/issues"},"homepage":"https://github.com/ReedD/node-assetmanager","dependencies":{"glob":"^3.2.9","underscore":"^1.6.0"},"_id":"assetmanager@0.1.3","dist":{"shasum":"2c3b3ee059a5ea70e6658a96207ea3450e406ed2","tarball":"https://registry.npmjs.org/assetmanager/-/assetmanager-0.1.3.tgz","integrity":"sha512-I09SRCeMDWBVyddkYGXuSnLk+MJ2Tv6RK9pJ3tDGiVlGNv6JNNhIw2IRenBCDpV2MWyubsMZ3PuI7dP3LKJODA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHB/4BS5bFhAWgzW0uefeaV67ObHcYjNDKHlQjMtnRWEAiEA52y1veWY946nMBbxf1zHOXSDsWoY30PIUNc7iHjJFYM="}]},"_from":".","_npmVersion":"1.4.4","_npmUser":{"name":"reedd","email":"reed@dadoune.com"},"maintainers":[{"name":"reedd","email":"reed@dadoune.com"}]},"1.0.0":{"name":"assetmanager","version":"1.0.0","description":"Asset manager easily allows you to switch between development and production css and js files in your templates by managing them in a single json file that's still compatible with grunt cssmin and uglify.","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"https://github.com/ReedD/node-assetmanager"},"keywords":["asset","manager","css","js","layout"],"author":{"name":"Reed Dadoune","email":"Reed@Dadoune.com","url":"http://www.dadoune.com/"},"license":"MIT","bugs":{"url":"https://github.com/ReedD/node-assetmanager/issues"},"homepage":"https://github.com/ReedD/node-assetmanager","dependencies":{"glob":"^3.2.9","underscore":"^1.6.0"},"_id":"assetmanager@1.0.0","dist":{"shasum":"d9b3b6592f9a33dadc2ff5821f52d92c6a018098","tarball":"https://registry.npmjs.org/assetmanager/-/assetmanager-1.0.0.tgz","integrity":"sha512-D8AwSWGeoalk+H83CeIvNxS66m2nFDFpEN/O2JcdgEtrajli+RKInJ7B1KWADWV9tuORKe7wDeu0/mICCBCDng==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDEjVVB6VpG+mHWgn4ovNgclSo6fS+Y0fSO7NkzFN22+AiA4SKPFEplNJvg2CiPDTiTNxglacaxFosyFi5xGCJ1jCg=="}]},"_from":".","_npmVersion":"1.4.4","_npmUser":{"name":"reedd","email":"reed@dadoune.com"},"maintainers":[{"name":"reedd","email":"reed@dadoune.com"}]},"1.1.0":{"name":"assetmanager","version":"1.1.0","description":"Asset manager easily allows you to switch between development and production css and js files in your templates by managing them in a single json file that's still compatible with grunt cssmin and uglify.","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"https://github.com/ReedD/node-assetmanager"},"keywords":["asset","manager","css","js","layout"],"author":{"name":"Reed Dadoune","email":"Reed@Dadoune.com","url":"http://www.dadoune.com/"},"license":"MIT","bugs":{"url":"https://github.com/ReedD/node-assetmanager/issues"},"homepage":"https://github.com/ReedD/node-assetmanager","dependencies":{"grunt":"^0.4.5","underscore":"^1.6.0"},"_id":"assetmanager@1.1.0","dist":{"shasum":"f5aa53c335b059b9ba51e41f949b3643eef77d23","tarball":"https://registry.npmjs.org/assetmanager/-/assetmanager-1.1.0.tgz","integrity":"sha512-6jybFX91KWvis4HBvAJ5GldtVdAVxHudMgl0Srnx6XBm02QMvjW/ma68gEgEy0UHMOsk4Spw0IS5UAZhCJLLnA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIA+zPEGIOa4+XMGmDTJ7EopHr2OjkBjgVIrSxtssQmYQAiEArYwj6JkFiw5W+lXQS1k7L4vkkrZXJ8+EdzB4Db823qc="}]},"_from":".","_npmVersion":"1.4.4","_npmUser":{"name":"reedd","email":"reed@dadoune.com"},"maintainers":[{"name":"reedd","email":"reed@dadoune.com"}]},"1.1.1":{"name":"assetmanager","version":"1.1.1","description":"Asset manager easily allows you to switch between development and production css and js files in your templates by managing them in a single json file that's still compatible with grunt cssmin and uglify.","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"https://github.com/ReedD/node-assetmanager"},"keywords":["asset","manager","css","js","layout"],"author":{"name":"Reed Dadoune","email":"Reed@Dadoune.com","url":"http://www.dadoune.com/"},"license":"MIT","bugs":{"url":"https://github.com/ReedD/node-assetmanager/issues"},"homepage":"https://github.com/ReedD/node-assetmanager","dependencies":{"grunt":"^0.4.5","underscore":"^1.6.0"},"_id":"assetmanager@1.1.1","dist":{"shasum":"b3793cade5cf44a6d9b4b3ea6eb0fedbf981b32f","tarball":"https://registry.npmjs.org/assetmanager/-/assetmanager-1.1.1.tgz","integrity":"sha512-1BhrQqNDX7QHhN43RhQq/9k8vldXEVGuIehcExQMq5JVSCLBHQ2/BsPGvBomxlARTL6/iIVV8XpJiNDu2dmPAg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFsNY1ZTFXarqwW/+J6pybRof9fQljlbSvQMKGq2kshMAiEAqZgx3ze0BhaJYoxw+MNbOxIKlK4TtirmgUC2RNjw+W8="}]},"_from":".","_npmVersion":"1.4.4","_npmUser":{"name":"reedd","email":"reed@dadoune.com"},"maintainers":[{"name":"reedd","email":"reed@dadoune.com"}]},"1.1.2":{"name":"assetmanager","version":"1.1.2","description":"Asset manager easily allows you to switch between development and production css and js files in your templates by managing them in a single json file that's still compatible with grunt cssmin and uglify.","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"https://github.com/ReedD/node-assetmanager"},"keywords":["asset","manager","css","js","layout"],"author":{"name":"Reed Dadoune","email":"Reed@Dadoune.com","url":"http://www.dadoune.com/"},"license":"MIT","bugs":{"url":"https://github.com/ReedD/node-assetmanager/issues"},"homepage":"https://github.com/ReedD/node-assetmanager","dependencies":{"grunt":"^0.4.5","underscore":"^1.6.0"},"gitHead":"726285dc61dd3a73e04175c4a2e9a6f47d32b59f","_id":"assetmanager@1.1.2","_shasum":"dc0428bfb1792bca576f74bbf194986149443cab","_from":".","_npmVersion":"2.1.6","_nodeVersion":"0.10.33","_npmUser":{"name":"reedd","email":"reed@dadoune.com"},"maintainers":[{"name":"reedd","email":"reed@dadoune.com"}],"dist":{"shasum":"dc0428bfb1792bca576f74bbf194986149443cab","tarball":"https://registry.npmjs.org/assetmanager/-/assetmanager-1.1.2.tgz","integrity":"sha512-im8w+v6+hsEOQ96estt70jZry44nILmb9yFgEEjqupcrPTcDQwhEJ6DombpH2Pf8XQ0lFdc99ivnB/EsqyUw5w==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIB736xqZzDhr1aXLw6CRKzh7HAiaBhZJL4LdkOon5ZkOAiEAyBrnwS4IOLUmAWA5XVQDIWjlX/QQ9g8G227pX7PTi0M="}]}},"1.2.0":{"name":"assetmanager","version":"1.2.0","description":"Asset manager easily allows you to switch between development and production css and js files in your templates by managing them in a single json file that's still compatible with grunt cssmin and uglify.","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"https://github.com/ReedD/node-assetmanager"},"keywords":["asset","manager","css","js","layout"],"author":{"name":"Reed Dadoune","email":"Reed@Dadoune.com","url":"http://www.dadoune.com/"},"license":"MIT","bugs":{"url":"https://github.com/ReedD/node-assetmanager/issues"},"homepage":"https://github.com/ReedD/node-assetmanager","dependencies":{"grunt":"^0.4.5","underscore":"^1.6.0"},"gitHead":"1c98fe3af0958be48c0639344085cb184c30d8dd","_id":"assetmanager@1.2.0","_shasum":"09001dabaf1c08362bc8c2bdebe0b024014d2ff9","_from":".","_npmVersion":"2.7.5","_nodeVersion":"0.12.2","_npmUser":{"name":"reedd","email":"reed@dadoune.com"},"maintainers":[{"name":"reedd","email":"reed@dadoune.com"}],"dist":{"shasum":"09001dabaf1c08362bc8c2bdebe0b024014d2ff9","tarball":"https://registry.npmjs.org/assetmanager/-/assetmanager-1.2.0.tgz","integrity":"sha512-6wsevAaytywK32CrQuxovbOWUwauWIAV/MTDf3KCoOO273oMg5OBY6o3awuQSBWCTIBxRej7ljkmx0u+WWxhaw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC43bycnJQqPrsWZl6rnqaHK42eSJUFsQIbzCANjcBYDgIgIgFm65Iei3h99eShinR3W2CTP40oGWSAWNc86WpWzcA="}]}},"1.2.1":{"name":"assetmanager","version":"1.2.1","description":"Asset manager easily allows you to switch between development and production css and js files in your templates by managing them in a single json file that's still compatible with grunt cssmin and uglify.","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"https://github.com/ReedD/node-assetmanager"},"keywords":["asset","manager","css","js","layout"],"author":{"name":"Reed Dadoune","email":"Reed@Dadoune.com","url":"http://www.dadoune.com/"},"license":"MIT","bugs":{"url":"https://github.com/ReedD/node-assetmanager/issues"},"homepage":"https://github.com/ReedD/node-assetmanager","dependencies":{"grunt":"^0.4.5","underscore":"^1.6.0"},"gitHead":"76806ae0f72ef693f0116ca9da6612386e2a7fd0","_id":"assetmanager@1.2.1","_shasum":"1ace943d40c75d671cadb485ac17022495c230da","_from":".","_npmVersion":"2.7.5","_nodeVersion":"0.12.2","_npmUser":{"name":"reedd","email":"reed@dadoune.com"},"maintainers":[{"name":"reedd","email":"reed@dadoune.com"}],"dist":{"shasum":"1ace943d40c75d671cadb485ac17022495c230da","tarball":"https://registry.npmjs.org/assetmanager/-/assetmanager-1.2.1.tgz","integrity":"sha512-d91bgHj+GiME12G887Wy+WA8w0VqDXIzfjYZoWFXyMxxXFUJYR0eH7k9Rwote+NYkBfl7HmijiiH1bX1Wy9GSw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDczIhQ85XEOnFvwQAmxAJfK3S/q2Mea+M69UsJN3YAKAIhAMctRVzsWOCHktVlUBDjbH9dx//BvhKcon4VwqdbXjkT"}]}},"1.2.2":{"name":"assetmanager","version":"1.2.2","description":"Asset manager easily allows you to switch between development and production css and js files in your templates by managing them in a single json file that's still compatible with grunt cssmin and uglify.","main":"index.js","scripts":{"test":"mocha -R spec"},"repository":{"type":"git","url":"https://github.com/ReedD/node-assetmanager"},"keywords":["asset","manager","css","js","layout"],"author":{"name":"Reed Dadoune","email":"Reed@Dadoune.com","url":"http://www.dadoune.com/"},"license":"MIT","bugs":{"url":"https://github.com/ReedD/node-assetmanager/issues"},"homepage":"https://github.com/ReedD/node-assetmanager","dependencies":{"grunt":"^0.4.5","underscore":"^1.6.0"},"devDependencies":{"mocha":"*"},"gitHead":"cdc80d17359a1819ed787800cfaa1f880f800a27","_id":"assetmanager@1.2.2","_shasum":"9efaa1515d3efbc9a9181592d3b7f8c1b282a6cd","_from":".","_npmVersion":"2.7.5","_nodeVersion":"0.12.2","_npmUser":{"name":"reedd","email":"reed@dadoune.com"},"maintainers":[{"name":"reedd","email":"reed@dadoune.com"}],"dist":{"shasum":"9efaa1515d3efbc9a9181592d3b7f8c1b282a6cd","tarball":"https://registry.npmjs.org/assetmanager/-/assetmanager-1.2.2.tgz","integrity":"sha512-WOztB8zShknrBAP3X+cgRKMvgeo1S+Zl9KIdoxX93f5xW8/GU0JUAjtVt6+DI4RID5rRT2HAuMmsKgFn1R3E3w==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCG6YxRjZXZIW19qUGklkrT1+ZwCgojRzX6H+yRwkrNTQIgXNf6EkI4jkuTl7tn/pGBCLgV0v3SeKODr8YIoDVMq8U="}]}},"1.2.3":{"name":"assetmanager","version":"1.2.3","description":"Asset manager easily allows you to switch between development and production css and js files in your templates by managing them in a single json file that's still compatible with grunt cssmin and uglify.","main":"index.js","scripts":{"test":"mocha -R spec"},"repository":{"type":"git","url":"git+https://github.com/ReedD/node-assetmanager.git"},"keywords":["asset","manager","css","js","layout"],"author":{"name":"Reed Dadoune","email":"Reed@Dadoune.com","url":"http://www.dadoune.com/"},"license":"MIT","bugs":{"url":"https://github.com/ReedD/node-assetmanager/issues"},"homepage":"https://github.com/ReedD/node-assetmanager","dependencies":{"grunt":"^1.0.1","lodash":"^4.11.0"},"devDependencies":{"mocha":"*"},"gitHead":"f25aab34554a98abe0d0eb0f1262444aaef8e056","_id":"assetmanager@1.2.3","_shasum":"34393e8d93a189780513c5a0c13fc31e7cf6f731","_from":".","_npmVersion":"3.8.5","_nodeVersion":"5.10.0","_npmUser":{"name":"reedd","email":"reed@dadoune.com"},"maintainers":[{"name":"reedd","email":"reed@dadoune.com"}],"dist":{"shasum":"34393e8d93a189780513c5a0c13fc31e7cf6f731","tarball":"https://registry.npmjs.org/assetmanager/-/assetmanager-1.2.3.tgz","integrity":"sha512-RMSlARSCcOgbNVBJOm4BsL+JMxqk4naHjZJh1GdINkDN1bpNpwV/NrEBG7lwfNtVrFxaoH3NeEM7YHfp+0aU2g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD8/YAeqlX3qWYtpqyVvDIYathmpPSTgw1+IKAiZ7ckEwIgG6FI8+onV1MnBu+BnlLFNJXh7UmlrF6M3R/4UaGT2JU="}]},"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/assetmanager-1.2.3.tgz_1460686763840_0.783911882666871"}}},"readme":"[![NPM](https://nodei.co/npm/assetmanager.png?downloads=true)](https://nodei.co/npm/assetmanager/)\n\nnode-assetmanager\n=================\n\nAsset manager easily allows you to switch between development and production css\nand js files in your templates by managing them in a single json file that's\nstill compatible with grunt cssmin and uglify. A working demo/implimentation of\nthis can been seen in [MEAN Stack](https://github.com/linnovate/mean).\n\n\n##Usage\nTo use [assetmanager](https://www.npmjs.org/package/assetmanager), cd into your\nproject directory and install assetmanager with npm.\n\n\n```\n$ cd /to/project/directory\n$ npm install assetmanager --save\n```\n\nSetup an external json asset configuration file that holds your development and\nproduction css and js files. The format of this file can be in either\n[files object format](http://gruntjs.com/configuring-tasks#files-object-format),\nor [files array format](http://gruntjs.com/configuring-tasks#files-array-format).\n\nYou may also add external resources, however these entries should be 1-to-1 key value\npairs. External resources will not cause issues with grunt cssmin or uglify,\nthey will simply be treated as empty resources and thus ignored.\n\n###Files Object Format\n[Files object format](http://gruntjs.com/configuring-tasks#files-object-format)\nconsists of file groups (main, secondary, etc.) that contain file types (css,\njs).  Each file type has a destination file mapped to a list of files of which\nthe destination file is composed in production mode.\n\nIn the [assets file](#assets.json) below, the main js files might be passed\nto [grunt-contrib-uglify](https://github.com/gruntjs/grunt-contrib-uglify).  The\noutput from that Grunt task would be in \"public/build/js/main.min.js\" - in\nproduction mode, assetmanager will place that filename in the list of assets in\n_assets.main.js_ and appends it with MD5 fingerprint of source files.\nIn debug mode, assetmanager would flatten the lists of\njs source files, placing the flattened list in _assets.main.js_.  This makes\noriginal, uncompressed js source files available in the browser during\ndebugging.\n\n####assets.json\n\n```\n{\n\t\"main\": {\n\t\t\"css\": {\n\t\t\t\"public/build/css/main.min.css\": [\n\t\t\t\t\"public/lib/bootstrap/dist/css/bootstrap.css\",\n\t\t\t\t\"public/css/**/*.css\"\n\t\t\t]\n\t\t},\n\t\t\"js\": {\n\t\t\t\"//cdnjs.cloudflare.com/ajax/libs/underscore.js/1.6.0/underscore-min.js\": \"//cdnjs.cloudflare.com/ajax/libs/underscore.js/1.6.0/underscore.js\",\n\t\t\t\"public/build/js/main.min.js\": [\n\t\t\t\t\"public/lib/angular/angular.js\",\n\t\t\t\t\"public/lib/angular-cookies/angular-cookies.js\",\n\t\t\t\t\"public/lib/angular-resource/angular-resource.js\",\n\t\t\t\t\"public/lib/angular-ui-router/release/angular-ui-router.js\",\n\t\t\t\t\"public/lib/angular-bootstrap/ui-bootstrap.js\",\n\t\t\t\t\"public/lib/angular-bootstrap/ui-bootstrap-tpls.js\",\n\t\t\t\t\"public/js/**/*.js\"\n\t\t\t]\n\t\t}\n\t},\n\t\"secondary\": {\n\t\t\"css\": {\n\t\t\t\"public/build/css/secondary.min.css\": [\n\t\t\t\t\"public/css/**/*.css\"\n\t\t\t]\n\t\t},\n\t\t\"js\": {\n\t\t\t\"public/build/js/secondary.min.js\": [\n\t\t\t\t\"public/js/**/*.js\"\n\t\t\t]\n\t\t}\n\t}\n}\n```\n\nThis way in your `gruntfile` you can easily import the same `assets.json` config\nfile and plop in the respective values for css and js.\n\n####gruntfile.js\n\n```\n'use strict';\n\nmodule.exports = function(grunt) {\n\t// Project Configuration\n\tgrunt.initConfig({\n\t\tassets: grunt.file.readJSON('config/assets.json'),\n\t\tuglify: {\n\t\t\tmain: {\n\t\t\t\toptions: {\n\t\t\t\t\tmangle: true,\n\t\t\t\t\tcompress: true\n\t\t\t\t},\n\t\t\t\tfiles: '<%= assets.main.js %>'\n\t\t\t},\n\t\t\tsecondary: {\n\t\t\t\tfiles: '<%= assets.secondary.js %>'\n\t\t\t}\n\t\t},\n\t\tcssmin: {\n\t\t\tmain: {\n\t\t\t\tfiles: '<%= assets.main.css %>'\n\t\t\t},\n\t\t\tsecondary: {\n\t\t\t\tfiles: '<%= assets.secondary.css %>'\n\t\t\t}\n\t\t}\n\t});\n\n\t//Load NPM tasks\n\tgrunt.loadNpmTasks('grunt-contrib-cssmin');\n\tgrunt.loadNpmTasks('grunt-contrib-uglify');\n\n\t//Making grunt default to force in order not to break the project.\n\tgrunt.option('force', true);\n\n\t//Default task(s).\n\tgrunt.registerTask('default', ['cssmin', 'uglify']);\n\n};\n```\n\n###Files Array Format\n[Files array format](http://gruntjs.com/configuring-tasks#files-array-format)\nrequires that each file type be an object with \"src\" (string array or string)\nand \"dest\" (string) attributes.\n\nThis format allows configuring a single Grunt target with multiple destinations.\nFor example, perhaps you'd like to concatenate vendor minified css and js files\nin production.  Both sets should have their own destination file as illustrated\nin the assets configuration below with \"vendorCss\" and \"vendorJs\" file types.\n\n####assets.js - array format\n```\n{\n\t\"main\": {\n\t\t\"vendorCss\": {\n\t\t\t\"dest\": \"public/vendor_styles.min.css\",\n\t\t\t\"src\": [\n\t\t\t\t\"public/lib/bootstrap/dist/css/bootstrap.min.css\",\n\t\t\t\t\"public/lib/bootstrap/dist/css/bootstrap-theme.min.css\"\n\t\t\t]\n\t\t},\n\t\t\"vendorJs\": {\n\t\t\t\"dest\": \"public/lib.min.js\",\n\t\t\t\"src\": [\n\t\t\t\t\"public/lib/jquery/dist/jquery.min.js\",\n\t\t\t\t\"public/lib/bootstrap/dist/js/bootstrap.min.js\",\n\t\t\t\t\"public/lib/angular/angular.min.js\",\n\t\t\t\t\"public/lib/angular-resource/angular-resource.min.js\",\n\t\t\t\t\"public/lib/angular-cookies/angular-cookies.min.js\",\n\t\t\t\t\"public/lib/angular-ui-router/release/angular-ui-router.min.js\",\n\t\t\t\t\"public/lib/angular-bootstrap/ui-bootstrap-tpls.min.js\"\n\t\t\t]\n\t\t},\n\t\t\"publicCss\": {\n\t\t\t\"dest\": \"public/client_styles.min.css\",\n\t\t\t\"src\": [\n\t\t\t\t\"public/client/index/styles/common.css\"\n\t\t\t]\n\t\t},\n\t\t\"publicJs\": {\n\t\t\t\"dest\": \"public/client.min.js\",\n\t\t\t\"src\": [\n\t\t\t\t\"public/client/app.js\",\n\t\t\t\t\"public/client/**/*.js\",\n\t\t\t\t\"!public/client/init.js\",\n\t\t\t\t\"public/client/init.js\",\n\t\t\t\t\"!public/client/**/*Test.js\"\n\t\t\t]\n\t\t},\n\t\t\"underscore\": {\n\t\t\t\"dest\": \"//cdnjs.cloudflare.com/ajax/libs/underscore.js/1.6.0/underscore-min.js\",\n\t\t\t\"src\": \"//cdnjs.cloudflare.com/ajax/libs/underscore.js/1.6.0/underscore.js\"\n\t\t}\n\t}\n}\n```\n\n####gruntfile.js - array format\nNote here that file array format requires the _files_ attribute be a list of\nobjects from the assets configuration:\n\n```\n\tgrunt.initConfig({\n\t\tpkg: grunt.file.readJSON('package.json'),\n\t\tassets: grunt.file.readJSON('client/assets-faf.json'),\n\t\tconcat: {\n\t\t\toptions: {\n\t\t\t\tseparator: ';'\n\t\t\t},\n\t\t\tproduction: {\n\t\t\t\tfiles: [\n\t\t\t\t\t'<%= assets.main.vendorCss %>',\n\t\t\t\t\t'<%= assets.main.vendorJs %>'\n\t\t\t\t]\n\t\t\t}\n\t\t},\n\t\tcssmin: {\n\t\t\toptions: {},\n\t\t\tproduction: {\n\t\t\t\tfiles: ['<%= assets.main.clientCss %>']\n\t\t\t}\n\t\t},\n\t\tuglify: {\n\t\t\toptions: {},\n\t\t\tproduction: {\n\t\t\t\tfiles: ['<%= assets.main.clientJs %>']\n\t\t\t}\n\t\t}\n\t});\n\n\tgrunt.loadNpmTasks('grunt-contrib-concat');\n\tgrunt.loadNpmTasks('grunt-contrib-cssmin');\n\tgrunt.loadNpmTasks('grunt-contrib-uglify');\n\n\tgrunt.registerTask('production', [\n\t\t'concat:production',\n\t\t'cssmin:production',\n\t\t'uglify:production'\n\t]);\n\n```\n\n### Node.js Configuration\nIn your node app require `assetmanager`, the example below is partial code\nfrom an express setup. Call `assetmanager.process` with your files from your\n`assets.json` config file. Set the `debug` value to toggle between your\ncompressed files and your development files. You can also set the `webroot`\nvalue so that when assetmanager processes your files it will change\n`public/lib/angular/angular.js` to `/lib/angular/angular.js` so that everything\nis relative to your webroot.\n\nFor the sake of efficiency, assetmanager should be configured after your static\nresources.\n\n#### Options\n* assets - An object containing the list of assets. Default: `{}`\n* debug - When true returns source assets rather than destination files. Default: `true`\n* webroot - Strip the webroot folder name from the file paths. Default: `false`.\n\n```\n'use strict';\n\n/**\n * Module dependencies.\n */\nvar express = require('express'),\n\tassetmanager = require('assetmanager');\n\nmodule.exports = function(app, passport, db) {\n\n\tapp.use(express.static(config.root + '/client'));\n\n\tapp.configure(function() {\n\t\t// Process your assets file\n\t\tvar assets = assetmanager.process({\n\t\t\tassets: require('./assets.json'),\n\t\t\tdebug: (process.env.NODE_ENV !== 'production'),\n\t\t\twebroot: 'public'\n\t\t});\n\t\t// Add assets to local variables\n\t\tapp.use(function (req, res, next) {\n\t\t\tres.locals({\n\t\t\t\tassets: assets\n\t\t\t});\n\t\t\tnext();\n\t\t});\n\n\t\t// ... Your CODE\n\n\t});\n\n\t// ... Your CODE\n\n};\n```\n\n#### Templates\nThen finally in your template you can output them with whatever templating\nframework you use. Using swig your main layout template might look something\nlike this:\n\n```\n{% for file in assets.main.css %}\n\t<link rel=\"stylesheet\" href=\"{{file}}\">\n{% endfor %}\n\n{% for file in assets.main.js %}\n\t<script type=\"text/javascript\" src=\"{{file}}\"></script>\n{% endfor %}\n```\n\nAnd in perhaps a secondary layout your second group of files:\n\n```\n{% for file in assets.secondary.css %}\n\t<link rel=\"stylesheet\" href=\"{{file}}\">\n{% endfor %}\n\n{% for file in assets.secondary.js %}\n\t<script type=\"text/javascript\" src=\"{{file}}\"></script>\n{% endfor %}\n```\n","maintainers":[{"name":"reedd","email":"reed@dadoune.com"}],"time":{"modified":"2022-06-13T03:34:27.885Z","created":"2014-03-15T20:26:25.052Z","0.1.0":"2014-03-15T20:26:25.052Z","0.1.1":"2014-03-16T23:51:58.435Z","0.1.2":"2014-04-03T00:07:07.400Z","0.1.3":"2014-05-29T23:54:40.436Z","1.0.0":"2014-05-30T07:51:02.614Z","1.1.0":"2014-06-13T07:56:00.974Z","1.1.1":"2014-06-25T17:39:10.490Z","1.1.2":"2014-12-21T21:13:21.888Z","1.2.0":"2015-05-28T06:40:58.201Z","1.2.1":"2015-05-28T23:43:36.852Z","1.2.2":"2015-06-01T20:44:22.626Z","1.2.3":"2016-04-15T02:19:25.963Z"},"homepage":"https://github.com/ReedD/node-assetmanager","keywords":["asset","manager","css","js","layout"],"repository":{"type":"git","url":"git+https://github.com/ReedD/node-assetmanager.git"},"author":{"name":"Reed Dadoune","email":"Reed@Dadoune.com","url":"http://www.dadoune.com/"},"bugs":{"url":"https://github.com/ReedD/node-assetmanager/issues"},"license":"MIT","readmeFilename":"README.md","users":{"mswanson1524":true,"kabomi":true,"wangnan0610":true}}