{"name":"rewrite-ext","description":"Automatically re-write the destination extension of a filepath based on the source extension. e.g  `.coffee` => `.js`. This will only rename the ext, no other path parts are modified.","version":"0.2.0","homepage":"https://github.com/jonschlinkert/rewrite-ext","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"https://github.com/jonschlinkert/rewrite-ext"},"bugs":{"url":"https://github.com/jonschlinkert/rewrite-ext/issues"},"license":"MIT","files":["index.js"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"dependencies":{"ext-map":"^1.0.0"},"devDependencies":{"mocha":"*","should":"*"},"keywords":["dest","ext","extensions","extname","file","filename","filepath","fp","fs","gulpfriendly","map","path","src"],"gitHead":"973c2508d69e466e576e0e52b52c618f5eaaffdb","_id":"rewrite-ext@0.2.0","_shasum":"5b358b4472d4f544e7036c37b066306492edd7b4","_from":".","_npmVersion":"2.5.1","_nodeVersion":"0.12.0","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"5b358b4472d4f544e7036c37b066306492edd7b4","tarball":"http://registry-npm.ywwl.com/rewrite-ext/download/rewrite-ext-0.2.0.tgz","integrity":"sha512-Ow1Tg8ATvh7qB67pPL9vk5eCMEG1j2HmPhjhU0cJlbJNuyvp0Mm+xRmKkX+dJfbQiqo8DSNDWphIBDhVKquTxQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCooMeDxFNLS4ciq4NqRwtEPn20zph2Wgw6ZW+mEydj/gIgWK+UxAyYy8q8jCX2KXwnBEqAxplxpXe2UqrGHP3kNDg="}],"size":1991,"noattachment":false,"key":"/rewrite-ext/-/rewrite-ext-0.2.0.tgz"},"directories":{},"readme":"# rewrite-ext [![NPM version](https://img.shields.io/npm/v/rewrite-ext.svg?style=flat)](https://www.npmjs.com/package/rewrite-ext) [![NPM monthly downloads](https://img.shields.io/npm/dm/rewrite-ext.svg?style=flat)](https://npmjs.org/package/rewrite-ext)  [![NPM total downloads](https://img.shields.io/npm/dt/rewrite-ext.svg?style=flat)](https://npmjs.org/package/rewrite-ext) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/rewrite-ext.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/rewrite-ext)\n\n> Automatically re-write the destination extension of a filepath based on the source extension. e.g  `.coffee` => `.js`. This will only rename the ext, no other path parts are modified.\n\n## Install\n\nInstall with [npm](https://www.npmjs.com/):\n\n```sh\n$ npm install --save rewrite-ext\n```\n\n## Usage\n\n```js\nvar rewrite = require('rewrite-ext');\n```\n\nAutomatically re-write extensions to the mapped extensions from [ext-map](https://github.com/jonschlinkert/ext-map):\n\n```js\nconsole.log(rewrite('abc.coffee'));\n//=> 'abc.js'\nconsole.log(rewrite('abc.less'));\n//=> 'abc.css'\n```\n\nExplicitly pass an extension to use:\n\n```js\nconsole.log(rewrite('foo/bar.txt', '.abc'));\n//=> 'foo/bar.abc'\n```\n\n## More examples\n\n```js\nrewrite('abc.styl');    //=> 'abc.css'\nrewrite('abc.sass');    //=> 'abc.css'\nrewrite('abc.scss');    //=> 'abc.css'\nrewrite('faux.css');    //=> 'faux.css'\nrewrite('abc.swig');    //=> 'abc.html'\nrewrite('abc.hbs');     //=> 'abc.html'\nrewrite('abc.md');      //=> 'abc.html'\nrewrite('abc.tmpl');    //=> 'abc.html'\nrewrite('faux.html');   //=> 'faux.html'\nrewrite('faux.coffee'); //=> 'faux.js'\n```\n\n## About\n\n### Related projects\n\n* [file-normalize](https://www.npmjs.com/package/file-normalize): File system utils for normalizing things like eol, encoding and BOM.  | [homepage](https://github.com/jonschlinkert/file-normalize \"File system utils for normalizing things like eol, encoding and BOM. \")\n* [fs-utils](https://www.npmjs.com/package/fs-utils): fs extras and utilities to extend the node.js file system module. Used in Assemble and… [more](https://github.com/assemble/fs-utils) | [homepage](https://github.com/assemble/fs-utils \"fs extras and utilities to extend the node.js file system module. Used in Assemble and many other projects.\")\n* [parse-filepath](https://www.npmjs.com/package/parse-filepath): Pollyfill for node.js `path.parse`, parses a filepath into an object. | [homepage](https://github.com/jonschlinkert/parse-filepath \"Pollyfill for node.js `path.parse`, parses a filepath into an object.\")\n\n### Contributing\n\nPull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).\n\n### Building docs\n\n_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_\n\nTo generate the readme, run the following command:\n\n```sh\n$ npm install -g verbose/verb#dev verb-generate-readme && verb\n```\n\n### Running tests\n\nRunning and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:\n\n```sh\n$ npm install && npm test\n```\n\n### Author\n\n**Jon Schlinkert**\n\n* [github/jonschlinkert](https://github.com/jonschlinkert)\n* [twitter/jonschlinkert](https://twitter.com/jonschlinkert)\n\n### License\n\nCopyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert).\nReleased under the [MIT License](LICENSE).\n\n***\n\n_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.4.3, on March 22, 2017._","publish_time":1424648151588,"_cnpm_publish_time":1424648151588,"dist-tags":{"latest":"1.0.0"}}