package.json 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. {
  2. "name": "gulp-replace",
  3. "version": "0.5.0",
  4. "description": "A string replace plugin for gulp",
  5. "main": "index.js",
  6. "dependencies": {
  7. "event-stream": "^3.1.7",
  8. "replacestream": "1.0.2",
  9. "istextorbinary": "^1.0.0"
  10. },
  11. "devDependencies": {
  12. "should": "^4.1.0",
  13. "mocha": "^2.0.1",
  14. "gulp-util": "^3.0.1"
  15. },
  16. "scripts": {
  17. "test": "mocha"
  18. },
  19. "repository": {
  20. "type": "git",
  21. "url": "git://github.com/lazd/gulp-replace.git"
  22. },
  23. "keywords": [
  24. "gulpplugin",
  25. "replace"
  26. ],
  27. "author": {
  28. "name": "Larry Davis",
  29. "email": "[email protected]"
  30. },
  31. "license": "MIT",
  32. "bugs": {
  33. "url": "https://github.com/lazd/gulp-replace/issues"
  34. },
  35. "engines": {
  36. "node": ">=0.10"
  37. },
  38. "readme": "# gulp-replace [![NPM version][npm-image]][npm-url] [![Build status][travis-image]][travis-url]\n> A string replace plugin for gulp 3\n\n## Usage\n\nFirst, install `gulp-replace` as a development dependency:\n\n```shell\nnpm install --save-dev gulp-replace\n```\n\nThen, add it to your `gulpfile.js`:\n\n```javascript\nvar replace = require('gulp-replace');\n\ngulp.task('templates', function(){\n gulp.src(['file.txt'])\n .pipe(replace(/foo(.{3})/g, '$1foo'))\n .pipe(gulp.dest('build/file.txt'));\n});\n```\n\n\n## API\n\ngulp-replace can be called with a string or regex.\n\n### replace(string, replacement[, options])\n\n#### string\nType: `String`\n\nThe string to search for.\n\n#### replacement\nType: `String` or `Function`\n\nThe replacement string or function. If `replacement` is a function, it will be called once for each match and will be passed the string that is to be replaced.\n\n### replace(regex, replacement[, options])\n\n*Note:* gulp-replace cannot perform regex replacement on streams.\n\n#### regex\nType: `RegExp`\n\nThe regex pattern to search for. See the [MDN documentation for RegExp] for details.\n\n#### replacement\nType: `String` or `Function`\n\nThe replacement string or function. See the [MDN documentation for String.replace] for details.\n\n### gulp-replace options\n\nAn optional third argument, `options`, can be passed.\n\n#### options\nType: `Object`\n\n##### options.skipBinary\nType: `boolean` \nDefault: `false`\n\nSkip binary files\n\n\n[MDN documentation for RegExp]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp\n[MDN documentation for String.replace]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replace#Specifying_a_string_as_a_parameter\n\n[travis-url]: http://travis-ci.org/lazd/gulp-replace\n[travis-image]: https://secure.travis-ci.org/lazd/gulp-replace.svg?branch=master\n[npm-url]: https://npmjs.org/package/gulp-replace\n[npm-image]: https://badge.fury.io/js/gulp-replace.svg\n",
  39. "readmeFilename": "README.md",
  40. "homepage": "https://github.com/lazd/gulp-replace",
  41. "_id": "[email protected]",
  42. "dist": {
  43. "shasum": "914fb7f6b6250d3c215fa09fb6ea40b63d05db7d"
  44. },
  45. "_from": "gulp-replace@",
  46. "_resolved": "https://registry.npmjs.org/gulp-replace/-/gulp-replace-0.5.0.tgz"
  47. }