mirror of
https://github.com/leanote/desktop-app.git
synced 2026-01-20 06:04:34 +08:00
54 lines
3.5 KiB
JSON
54 lines
3.5 KiB
JSON
{
|
|
"name": "gulp-rename",
|
|
"version": "1.2.2",
|
|
"description": "Rename files",
|
|
"keywords": [
|
|
"gulpplugin"
|
|
],
|
|
"homepage": "https://github.com/hparra/gulp-rename",
|
|
"bugs": {
|
|
"url": "https://github.com/hparra/gulp-rename/issues"
|
|
},
|
|
"author": {
|
|
"name": "Hector Guillermo Parra Alvarez",
|
|
"email": "hector@hectorparra.com",
|
|
"url": "https://github.com/hparra"
|
|
},
|
|
"main": "./index.js",
|
|
"files": [
|
|
"index.js"
|
|
],
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "git://github.com/hparra/gulp-rename.git"
|
|
},
|
|
"scripts": {
|
|
"pretest": "jshint index.js test/",
|
|
"test": "mocha"
|
|
},
|
|
"devDependencies": {
|
|
"gulp": ">=3.0.0",
|
|
"gulp-sourcemaps": "^1.5.0",
|
|
"gulp-util": "^3.0.4",
|
|
"jshint": "^2.6.3",
|
|
"map-stream": ">=0.0.4",
|
|
"mocha": ">=1.15.0",
|
|
"should": ">=2.1.0"
|
|
},
|
|
"engines": {
|
|
"node": ">=0.10.0",
|
|
"npm": ">=1.2.10"
|
|
},
|
|
"licenses": [
|
|
{
|
|
"type": "MIT"
|
|
}
|
|
],
|
|
"readme": "# gulp-rename\n\ngulp-rename is a [gulp](https://github.com/wearefractal/gulp) plugin to rename files easily.\n\n[](https://nodei.co/npm/gulp-rename/)\n\n[](http://travis-ci.org/hparra/gulp-rename)\n[](https://david-dm.org/hparra/gulp-rename#info=devDependencies)\n\n## Usage\n\ngulp-rename provides simple file renaming methods.\n\n```javascript\nvar rename = require(\"gulp-rename\");\n\n// rename via string\ngulp.src(\"./src/main/text/hello.txt\")\n .pipe(rename(\"main/text/ciao/goodbye.md\"))\n .pipe(gulp.dest(\"./dist\")); // ./dist/main/text/ciao/goodbye.md\n\n// rename via function\ngulp.src(\"./src/**/hello.txt\")\n .pipe(rename(function (path) {\n path.dirname += \"/ciao\";\n path.basename += \"-goodbye\";\n path.extname = \".md\"\n }))\n .pipe(gulp.dest(\"./dist\")); // ./dist/main/text/ciao/hello-goodbye.md\n\n// rename via hash\ngulp.src(\"./src/main/text/hello.txt\", { base: process.cwd() })\n .pipe(rename({\n dirname: \"main/text/ciao\",\n basename: \"aloha\",\n prefix: \"bonjour-\",\n suffix: \"-hola\",\n extname: \".md\"\n }))\n .pipe(gulp.dest(\"./dist\")); // ./dist/main/text/ciao/bonjour-aloha-hola.md\n```\n\n**See test/rename.spec.js for more examples and test/path-parsing.spec.js for hairy details.**\n\n## Notes\n\n* `dirname` is the relative path from the base directory set by `gulp.src` to the filename.\n * `gulp.src()` uses glob-stream which sets the base to the parent of the first directory glob (`*`, `**`, [], or extglob). `dirname` is the remaining directories or `./` if none. glob-stream versions >= 3.1.0 (used by gulp >= 3.2.2) accept a `base` option, which can be used to explicitly set the base.\n * `gulp.dest()` renames the directories between `process.cwd()` and `dirname` (i.e. the base relative to CWD). Use `dirname` to rename the directories matched by the glob or descendents of the base of option.\n* `basename` is the filename without the extension like path.basename(filename, path.extname(filename)).\n* `extname` is the file extension including the '.' like path.extname(filename).\n\n## License\n\n[MIT License](http://en.wikipedia.org/wiki/MIT_License)\n",
|
|
"readmeFilename": "README.md",
|
|
"_id": "gulp-rename@1.2.2",
|
|
"_shasum": "3ad4428763f05e2764dec1c67d868db275687817",
|
|
"_resolved": "https://registry.npmjs.org/gulp-rename/-/gulp-rename-1.2.2.tgz",
|
|
"_from": "gulp-rename@>=1.0.0 <2.0.0"
|
|
}
|