source: Dev/trunk/node_modules/grunt-zip/package.json @ 484

Last change on this file since 484 was 484, checked in by hendrikvanantwerpen, 11 years ago

Commit node_modules, to make checkouts and builds more deterministic.

File size: 6.4 KB
Line 
1{
2  "name": "grunt-zip",
3  "description": "Zip and unzip files via a grunt plugin",
4  "version": "0.9.2",
5  "homepage": "https://github.com/twolfson/grunt-zip",
6  "author": {
7    "name": "Todd Wolfson",
8    "email": "todd@twolfson.com",
9    "url": "http://twolfson.com/"
10  },
11  "repository": {
12    "type": "git",
13    "url": "git://github.com/twolfson/grunt-zip.git"
14  },
15  "bugs": {
16    "url": "https://github.com/twolfson/grunt-zip/issues"
17  },
18  "licenses": [
19    {
20      "type": "MIT",
21      "url": "https://github.com/twolfson/grunt-zip/blob/master/LICENSE-MIT"
22    }
23  ],
24  "main": "grunt.js",
25  "bin": {
26    "grunt-zip": "bin/grunt-zip"
27  },
28  "engines": {
29    "node": "*"
30  },
31  "scripts": {
32    "test": "cd test && grunt"
33  },
34  "dependencies": {
35    "node-zip": "0.0.2",
36    "grunt-retro": "~0.6.0"
37  },
38  "devDependencies": {
39    "grunt": "~0.3.17",
40    "underscore.string": "~2.3.1",
41    "grunt-contrib-clean": "~0.3.2"
42  },
43  "_devDependencies": {
44    "grunt": "~0.4.0",
45    "grunt-contrib-nodeunit": "~0.1.2",
46    "underscore.string": "~2.3.1",
47    "grunt-contrib-clean": "~0.4.0"
48  },
49  "keywords": [
50    "gruntplugin",
51    "grunt",
52    "zip",
53    "unzip",
54    "compress",
55    "decompress"
56  ],
57  "readme": "# grunt-zip [![Donate on Gittip](http://badgr.co/gittip/twolfson.png)](https://www.gittip.com/twolfson/)\n\nZip and unzip files via a grunt plugin\n\n## Getting Started\nInstall this grunt plugin next to your project's [grunt.js gruntfile][getting_started] with: `npm install grunt-zip`\n\nThen add this line to your project's `grunt.js` gruntfile:\n\n```javascript\ngrunt.loadNpmTasks('grunt-zip');\n```\n\n[grunt]: http://gruntjs.com/\n[getting_started]: https://github.com/gruntjs/grunt/blob/master/docs/getting_started.md\n\n## Documentation\n`grunt-zip` introduces two grunt tasks: zip and unzip.\n\n### zip\n```js\ngrunt.initConfig({\n  zip: {\n    // We accept short syntax\n    // 'destinationZip': ['firstFileToZip', 'secondFileToZip', ...]\n    'acme.zip': ['index.html', 'rocket.js'],\n\n    // As well as standard grunt sytax\n    widgets: {\n      // Files to zip together\n      src: ['corkscrew.js', 'sillyStraw.js'],\n\n      // Destination of zip file\n      dest: 'widgets.zip'\n    },\n\n    // Specify working directory to zip from via `cwd`\n    'more-widgets': {\n      cwd: 'nested/'\n      // Files will zip to 'corkscrew.js' and 'sillyStraw.js'\n      src: ['nested/corkscrew.js', 'nested/sillyStraw.js'],\n      dest: 'moreWidgets.zip'\n    },\n\n    // Adjust file paths via `router` for complex cases\n    site: {\n      // `router` receives the path from grunt (e.g. js/main.js)\n      // The path it returns is what the file contents are saved as (e.g. all/main.js)\n      // This CANNOT be used with `cwd` since there are potential ordering issues.\n      router: function (filepath) {\n        // Route each file to all/{{filename}}\n        var filename = path.basename(filepath);\n        return 'all/' + filename;\n      }\n\n      // Files will zip to 'main.js' and 'main.css'\n      src: ['js/main.js', 'css/main.css'],\n      dest: 'site.zip'\n    },\n\n    // If you want to use the 'DEFLATE' compression algorithm, encode data in base64, or include dotfiles, you must opt-in to it\n    'even-more-widgets': {\n      src: ['corkscrew.js', 'sillyStraw.js'],\n      dest: 'evenMoreWidgets.zip',\n\n      // Setting for DEFLATE compression\n      compression: 'DEFLATE',\n\n      // Setting for base64 encoding\n      base64: true,\n\n      // Setting to include dotfiles (e.g. .travis.yml)\n      dot: true\n    },\n\n    // Skip/exclude files via `router`\n    zipJsOnly: {\n      // If router returns a falsy varaible, the file will be skipped\n      router: function (filepath) {\n        // Grab the extension\n        var extname = path.extname(filepath);\n\n        // If the file is a .js, add it to the zip\n        if (extname === '.js') {\n          return filepath;\n        } else {\n        // Otherwise, skip it\n          return null;\n        }\n      }\n\n      src: ['js/main.js', 'css/main.css'],\n      dest: 'jsOnly.zip'\n    }\n  }\n});\n```\n\n### unzip\n```js\ngrunt.initConfig({\n  'unzip': {\n    // Short syntax\n    // 'folderToExtractFilesTo': 'zipFileToExtract'\n    gallery: 'photos.zip',\n\n    // Long syntax\n    catalog: {\n      src: 'electronics.zip',\n      dest: 'catalog'\n    }\n\n    // Note: If you provide multiple src files, they will all be extracted to the same folder.\n    // This is not well-tested behavior so use at your own risk.\n\n    // Adjust file paths of zipped files via `router`\n    site: {\n      // `router` receives the path that was used during zipping (e.g. css/bootstrap.css)\n      // The path it returns is where the file contents will be written to (e.g. dist/bootstrap.css)\n      router: function (filepath) {\n        // Route each file to dist/{{filename}}\n        var filename = path.basename(filepath);\n        return 'dist/' + filename;\n      }\n\n      // Collects all nested files in same directory\n      // css/bootstrap.css -> bootstrap.css, js/bootstrap.js -> bootstrap.js\n      src: 'bootstrap.zip',\n      dest: 'bootstrap/'\n    },\n\n    // If you want to disable the CRC32 check or decode data from base64, you must opt-in to it\n    'unzip-more': {\n      src: 'bootstrap.zip',\n      dest: 'public',\n\n      // Setting for disabling the CRC32 check\n      checkCRC32: false,\n\n      // Setting for decoding from base64\n      base64: true\n    },\n\n    // Skip/exclude files via `router`\n    unzipCssOnly: {\n      // If router returns a falsy varaible, the file will be skipped\n      router: function (filepath) {\n        // Grab the extension\n        var extname = path.extname(filepath);\n\n        // If the file is a .css, extract it\n        if (extname === '.css') {\n          return filepath;\n        } else {\n        // Otherwise, skip it\n          return null;\n        }\n      }\n\n      src: ['bootstrap.css'],\n      dest: 'bootstrap-css/'\n    }\n\n\n  }\n});\n```\n\n## Contributing\nIn lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint your code using [grunt][grunt] and test via `npm test`.\n\n## License\nCopyright (c) 2013 Todd Wolfson\nLicensed under the MIT license.\n",
58  "readmeFilename": "README.md",
59  "_id": "grunt-zip@0.9.2",
60  "dist": {
61    "shasum": "817452714085d989a703e64ddba9e148e5b09e6e"
62  },
63  "_from": "grunt-zip@~0.9.0",
64  "_resolved": "https://registry.npmjs.org/grunt-zip/-/grunt-zip-0.9.2.tgz"
65}
Note: See TracBrowser for help on using the repository browser.