{"_id":"grunt-context","_rev":"28-b2354933c9be8324ba673b7352a6c005","name":"grunt-context","description":"Give grunt some context, provide named configs for common options and override individual options via the command line","dist-tags":{"latest":"0.3.3"},"versions":{"0.1.0":{"name":"grunt-context","description":"Give your config some context.","version":"0.1.0","homepage":"https://github.com/indieisaconcept/grunt-context","author":{"name":"Jonathan Barnett @indieisaconcept","email":"me@indieisaconcept.com","url":"http://twitter.com/indieisaconcept"},"repository":{"type":"git","url":"git://github.com/indieisaconcept/grunt-context.git"},"bugs":{"url":"https://github.com/indieisaconcept/grunt-context/issues"},"licenses":[{"type":"MIT","url":"https://github.com/indieisaconcept/grunt-context/blob/master/LICENSE-MIT"}],"main":"grunt.js","bin":{"grunt-context":"bin/grunt-context"},"engines":{"node":">=0.6.0"},"scripts":{"test":"grunt test"},"dependencies":{"grunt":"~0.3.9"},"devDependencies":{"grunt":"~0.3.9"},"keywords":["gruntplugin"],"_npmUser":{"name":"indieisaconcept","email":"me@indieisaconcept.com"},"_id":"grunt-context@0.1.0","optionalDependencies":{},"_engineSupported":true,"_npmVersion":"1.1.0","_nodeVersion":"v0.6.6","_defaultsLoaded":true,"dist":{"shasum":"17a5670afa553abfc01347e78c1c3d273ad44da9","tarball":"https://registry.npmjs.org/grunt-context/-/grunt-context-0.1.0.tgz","integrity":"sha512-rMk+YzhV6Ihb3SSwEbIPC4NzjL5fdPCcfYuYlprD+yiJgRLxjaSFW5GpLHXTVWXUY78wA8CdoT3C8Ca0YZdoJw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCVY/15lKapj+MVkIlQD0NqFX+FUlM7skkb5Of0tUGojQIgA+wJ9aket+2UUwyks/pA7RqkplDfxdbKi2ZIUoodQU4="}]},"maintainers":[{"name":"indieisaconcept","email":"me@indieisaconcept.com"}],"directories":{}},"0.2.0":{"name":"grunt-context","description":"Give your config some context.","version":"0.2.0","homepage":"https://github.com/indieisaconcept/grunt-context","author":{"name":"Jonathan Barnett @indieisaconcept","email":"me@indieisaconcept.com","url":"http://twitter.com/indieisaconcept"},"repository":{"type":"git","url":"git://github.com/indieisaconcept/grunt-context.git"},"bugs":{"url":"https://github.com/indieisaconcept/grunt-context/issues"},"licenses":[{"type":"MIT","url":"https://github.com/indieisaconcept/grunt-context/blob/master/LICENSE-MIT"}],"main":"grunt.js","bin":{"grunt-context":"bin/grunt-context"},"engines":{"node":">=0.6.0"},"scripts":{"test":"grunt test"},"dependencies":{"grunt":"~0.3.9"},"devDependencies":{"grunt":"~0.3.9"},"keywords":["gruntplugin"],"_npmUser":{"name":"indieisaconcept","email":"me@indieisaconcept.com"},"_id":"grunt-context@0.2.0","optionalDependencies":{},"_engineSupported":true,"_npmVersion":"1.1.0","_nodeVersion":"v0.6.6","_defaultsLoaded":true,"dist":{"shasum":"e125fdcf9bc25ecaa93c0cc3881381428a0f118d","tarball":"https://registry.npmjs.org/grunt-context/-/grunt-context-0.2.0.tgz","integrity":"sha512-av8qaIYRz9u2zd4NN3PvnpVP+aiDag5PipmMT/C5X45HkGJPp5w3yR9rkLrDSKrd61z91m8GsC+Y4IFvh+fO0A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIB+7D3sktftxeb8qJ0R/LLqyp/bSPQkm8O/o9N9JBDSpAiEAkGo5+sQN2fJf5e+RjbuUdZZsFCSw/iqiKyveAk55MzQ="}]},"maintainers":[{"name":"indieisaconcept","email":"me@indieisaconcept.com"}],"directories":{}},"0.3.0":{"name":"grunt-context","description":"Give your grunt some some context.","version":"0.3.0","homepage":"https://github.com/indieisaconcept/grunt-context","author":{"name":"Jonathan Barnett @indieisaconcept","email":"me@indieisaconcept.com","url":"http://twitter.com/indieisaconcept"},"repository":{"type":"git","url":"git://github.com/indieisaconcept/grunt-context.git"},"bugs":{"url":"https://github.com/indieisaconcept/grunt-context/issues"},"licenses":[{"type":"MIT","url":"https://github.com/indieisaconcept/grunt-context/blob/master/LICENSE-MIT"}],"main":"grunt.js","bin":{"grunt-context":"bin/grunt-context"},"engines":{"node":">=0.6.0"},"scripts":{"test":"grunt test"},"dependencies":{"grunt":"~0.3.9"},"devDependencies":{"grunt":"~0.3.9"},"keywords":["gruntplugin"],"_npmUser":{"name":"indieisaconcept","email":"me@indieisaconcept.com"},"_id":"grunt-context@0.3.0","optionalDependencies":{},"_engineSupported":true,"_npmVersion":"1.1.0","_nodeVersion":"v0.6.6","_defaultsLoaded":true,"dist":{"shasum":"bd3ebc80d08d7b8b8b0e9728c98d2d1cd011c794","tarball":"https://registry.npmjs.org/grunt-context/-/grunt-context-0.3.0.tgz","integrity":"sha512-YSS2topFBSxkno8PVlsL42dJN4o03mU2rOtqRrYeXl/Vzl+QD5/BOPsUVSJ5D0a3rLU9VzCu+0S3vVEweyDi5A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDr9lx6silacmvopTD1mfNmzqfDq8B6zXweCb28zC4c+QIhAKiEeSMxJ1gc1v4cxEiaGy0PA5de/ao1pd0LCNo+tjMv"}]},"maintainers":[{"name":"indieisaconcept","email":"me@indieisaconcept.com"}],"directories":{}},"0.3.1":{"name":"grunt-context","description":"Give your grunt some some context.","version":"0.3.1","homepage":"https://github.com/indieisaconcept/grunt-context","author":{"name":"Jonathan Barnett @indieisaconcept","email":"me@indieisaconcept.com","url":"http://twitter.com/indieisaconcept"},"repository":{"type":"git","url":"git://github.com/indieisaconcept/grunt-context.git"},"bugs":{"url":"https://github.com/indieisaconcept/grunt-context/issues"},"licenses":[{"type":"MIT","url":"https://github.com/indieisaconcept/grunt-context/blob/master/LICENSE-MIT"}],"main":"grunt.js","bin":{"grunt-context":"bin/grunt-context"},"engines":{"node":">=0.6.0"},"scripts":{"test":"grunt test"},"dependencies":{"grunt":"~0.3.9"},"devDependencies":{"grunt":"~0.3.9"},"keywords":["gruntplugin"],"_npmUser":{"name":"indieisaconcept","email":"me@indieisaconcept.com"},"_id":"grunt-context@0.3.1","optionalDependencies":{},"_engineSupported":true,"_npmVersion":"1.1.0","_nodeVersion":"v0.6.6","_defaultsLoaded":true,"dist":{"shasum":"ec4c3c211a50f3b970dce07737d0f3d46bf80611","tarball":"https://registry.npmjs.org/grunt-context/-/grunt-context-0.3.1.tgz","integrity":"sha512-+Z3Dhn/9Ww1cX1xwOO4rTvlcQQHDdh0emfsAS+BYwIqjjMa8w3g9sjdASJcHsIK9wnNAnZoXanokwkYc9RuNiA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAC1tZaDEMXQl8I9oenu12334LSFrZj6lAg282xNkotGAiACqM081A1WtSQDzutKByCbbz1Xl838fxsVVT+LKImdYQ=="}]},"maintainers":[{"name":"indieisaconcept","email":"me@indieisaconcept.com"}],"directories":{}},"0.3.2":{"name":"grunt-context","description":"Give grunt some some context, provide named configs for common options and override individual options via the command line","version":"0.3.2","homepage":"https://github.com/indieisaconcept/grunt-context","author":{"name":"Jonathan Barnett @indieisaconcept","email":"me@indieisaconcept.com","url":"http://twitter.com/indieisaconcept"},"repository":{"type":"git","url":"git://github.com/indieisaconcept/grunt-context.git"},"bugs":{"url":"https://github.com/indieisaconcept/grunt-context/issues"},"licenses":[{"type":"MIT","url":"https://github.com/indieisaconcept/grunt-context/blob/master/LICENSE-MIT"}],"main":"grunt.js","bin":{"grunt-context":"bin/grunt-context"},"engines":{"node":">=0.6.0"},"scripts":{"test":"grunt test"},"dependencies":{"grunt":"~0.3.9"},"devDependencies":{"grunt":"~0.3.9"},"keywords":["gruntplugin"],"_npmUser":{"name":"indieisaconcept","email":"me@indieisaconcept.com"},"_id":"grunt-context@0.3.2","optionalDependencies":{},"_engineSupported":true,"_npmVersion":"1.1.0","_nodeVersion":"v0.6.6","_defaultsLoaded":true,"dist":{"shasum":"2c689a31968037cc8959a714398886f48ed3dfd5","tarball":"https://registry.npmjs.org/grunt-context/-/grunt-context-0.3.2.tgz","integrity":"sha512-dadhe1HZCuMfc/k4GBjmd+jrByB1qnSh/x6t6pvhZ8wUGG1W+Ma+9JInWb2LNOrzQo1nNtrO0p0HLVXeGEmIMQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDQvbN8WT79atldsQljDJkKFVuBEDTdth5KTi8VJknL+gIgUrYDCKypj57bDSq5pufxAI8ugDO6eyEqFTQLjtQMgf4="}]},"maintainers":[{"name":"indieisaconcept","email":"me@indieisaconcept.com"}]},"0.3.3":{"name":"grunt-context","description":"Give grunt some context, provide named configs for common options and override individual options via the command line","version":"0.3.3","homepage":"https://github.com/indieisaconcept/grunt-context","author":{"name":"Jonathan Barnett @indieisaconcept","email":"me@indieisaconcept.com","url":"http://twitter.com/indieisaconcept"},"repository":{"type":"git","url":"git://github.com/indieisaconcept/grunt-context.git"},"bugs":{"url":"https://github.com/indieisaconcept/grunt-context/issues"},"licenses":[{"type":"MIT","url":"https://github.com/indieisaconcept/grunt-context/blob/master/LICENSE-MIT"}],"main":"grunt.js","bin":{"grunt-context":"bin/grunt-context"},"engines":{"node":">=0.6.0"},"scripts":{"test":"grunt test"},"dependencies":{"grunt":"~0.3.9"},"devDependencies":{"grunt":"~0.3.9"},"keywords":["gruntplugin"],"_npmUser":{"name":"indieisaconcept","email":"me@indieisaconcept.com"},"_id":"grunt-context@0.3.3","optionalDependencies":{},"_engineSupported":true,"_npmVersion":"1.1.24","_nodeVersion":"v0.6.19","_defaultsLoaded":true,"dist":{"shasum":"53b9b1b7e1bf9cd17524eb5f5cbd08736b56fa53","tarball":"https://registry.npmjs.org/grunt-context/-/grunt-context-0.3.3.tgz","integrity":"sha512-9maTDU+l+rChLTH3cCtM5Bdpf2iXtQbvD2gCzZIuQnIUfbnEklqpV9f249lbfmi+MTXTGitmVnFdxlMI25Fdlw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIANCRgVq+nC6zHgov4wn5J63795E5wcJoApqzWAalJQrAiEAs3G1KMiYlvlFOq+54QBjinhjWHCDjkhtrZqGV3XXdxM="}]},"maintainers":[{"name":"indieisaconcept","email":"me@indieisaconcept.com"}]}},"readme":"# grunt-context\n\nThe aim of this plugin is to allow the grunt config to be overridden based on the current context selected. This is particularly useful if builds need to be tailored based upon the deployment environment.\n\n## Getting Started\nInstall this grunt plugin next to your project's [grunt.js gruntfile][getting_started] with: `npm install grunt-context`\n\nThen add this line to your project's `grunt.js` gruntfile:\n\n```javascript\ngrunt.loadNpmTasks('grunt-context');\n```\n\n[grunt]: https://github.com/cowboy/grunt\n[getting_started]: https://github.com/cowboy/grunt/blob/master/docs/getting_started.md\n\n## Documentation\n\n### Usage\n\ngrunt-context supports arguments. The arguments are broken down as follows:\n\ncontext:*name*:*task*:*arguments*\n\n+ name: The name of the context to use\n+ task: A single task or task list to run\n+ arguments: The arguments to apply to a single task, these are ignored when a task list is used.\n\n### Overrides\n\nTasks you wish to provide a context for should be defined inside the context object and under the options key inside your main config. Properties for a specific task will then be combined with any defined outside of the context object.\n\nExample grunt file with contexts defined:\n\n```javascript\n\n// ... grunt file contents\n\n    // =====================\n    // GLOBAL CONFIG\n    // =====================\n\n    someplugin: {\n        prop1: 'some original value',\n        prop2: 'some original value'\n    },\n\n    context: {\n\n        // =====================\n        // CONFIG OVERRIDES\n        // =====================\n\n        development: {\n\n            options: {\n\n                someplugin: {\n                    prop1: 'some development value',\n                    prop3: 'some development value',\n                    prop4: 'some development value'\n                }\n\n            },\n\n            tasks: {\n                'default': 'someplugin'\n            }\n\n        }\n\n    }\n\n// ... even more grunt file contents\n\n```\n\nThe above configuration would result in the following config when grunt-context is run with the context set to \"development\".\n\n```javascript\n\n    someplugin: {\n        prop1: 'some development value',\n        prop2: 'some original value'        \n        prop3: 'some development value',\n        prop4: 'some development value'\n    },\n\n```\n\nUsing the approach above you could also define the following tasks inside your grunt.js and when run the default task list for the context will run if it exists.\n\n```javascript\n\n    grunt.registerTask('default', 'context:development');\n    grunt.registerTask('release', 'context:production');\n\n```    \n\n### Tasks\n\nTasks can also be defined against a context, in the same way in which you would normally use grunt.registerTask you can now directly associate tasks to a specific context.\n\n```javascript\n\n    tasks: {\n        'default': 'someplugin'\n    },\n\n```\n\nA \"default\" task should always be defined as per normal grunt task convention.\n\nTo run the default task for a context, this is possible using the following syntax:\n\n```\n> grunt context:development or\n> grunt content:development:default\n```\n\nThis will either run a single task or either a task list.\n\n*Note:* Ensure that you do not duplicate task names.\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 and test your code using [grunt][grunt].\n\n## Release History\n\n### 0.1.0\n+ Initial Release\n\n## License\nCopyright (c) 2012 \"indieisaconcept\" Jonathan Barnett  \nLicensed under the MIT license.","maintainers":[{"name":"indieisaconcept","email":"me@indieisaconcept.com"}],"time":{"modified":"2022-06-18T14:42:21.069Z","created":"2012-06-06T14:41:38.156Z","0.1.0":"2012-06-06T14:41:42.458Z","0.2.0":"2012-06-07T16:39:43.582Z","0.3.0":"2012-06-10T17:19:02.403Z","0.3.1":"2012-06-11T03:28:04.894Z","0.3.2":"2012-06-12T12:21:35.499Z","0.3.3":"2012-07-23T14:55:34.528Z"},"author":{"name":"Jonathan Barnett @indieisaconcept","email":"me@indieisaconcept.com","url":"http://twitter.com/indieisaconcept"},"repository":{"type":"git","url":"git://github.com/indieisaconcept/grunt-context.git"},"users":{"fgribreau":true}}