jasonlam604 / grunt-rename-util Goto Github PK
View Code? Open in Web Editor NEWGrunt Plugin for Renaming
License: MIT License
Grunt Plugin for Renaming
License: MIT License
Does not create subdirectories as needed like other plugins giving the error: ENOENT.
Error:
$ npm shrinkwrap --dev
npm ERR! Linux 4.8.0-34-generic
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "shrinkwrap" "--dev"
npm ERR! node v4.7.2
npm ERR! npm v4.1.1
npm ERR! Problems were encountered
npm ERR! Please correct and try again.
npm ERR! peer invalid: grunt@~0.4.0, required by [email protected]
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! <https://github.com/npm/npm/issues>
npm ERR! Please include the following file with any support request:
npm ERR! /media/ferdipr/Dev/carbonfibre/cs.core.ui/main/pkg/CS_CORE_UI.git/npm-debug.log
npm-debug.log:
0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node',
1 verbose cli '/usr/local/bin/npm',
1 verbose cli 'shrinkwrap',
1 verbose cli '--dev' ]
2 info using [email protected]
3 info using [email protected]
4 info lifecycle [email protected]~preshrinkwrap: [email protected]
5 silly lifecycle [email protected]~preshrinkwrap: no script for preshrinkwrap, continuing
6 info lifecycle [email protected]~shrinkwrap: [email protected]
7 silly lifecycle [email protected]~shrinkwrap: no script for shrinkwrap, continuing
8 verbose stack Error: Problems were encountered
8 verbose stack Please correct and try again.
8 verbose stack peer invalid: grunt@~0.4.0, required by [email protected]
8 verbose stack at shrinkwrap_ (/usr/local/lib/node_modules/npm/lib/shrinkwrap.js:128:15)
8 verbose stack at Array.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/slide/lib/bind-actor.js:15:8)
8 verbose stack at LOOP (/usr/local/lib/node_modules/npm/node_modules/slide/lib/chain.js:15:14)
8 verbose stack at /usr/local/lib/node_modules/npm/node_modules/slide/lib/chain.js:18:7
8 verbose stack at done (/usr/local/lib/node_modules/npm/lib/utils/lifecycle.js:132:5)
8 verbose stack at LOOP (/usr/local/lib/node_modules/npm/node_modules/slide/lib/chain.js:7:26)
8 verbose stack at /usr/local/lib/node_modules/npm/node_modules/slide/lib/chain.js:18:7
8 verbose stack at /usr/local/lib/node_modules/npm/lib/utils/lifecycle.js:318:20
8 verbose stack at /usr/local/lib/node_modules/npm/node_modules/graceful-fs/polyfills.js:284:29
8 verbose stack at FSReqWrap.oncomplete (fs.js:82:15)
9 verbose cwd /media/ferdipr/Dev/carbonfibre/cs.core.ui/main/pkg/CS_CORE_UI.git
10 error Linux 4.8.0-34-generic
11 error argv "/usr/local/bin/node" "/usr/local/bin/npm" "shrinkwrap" "--dev"
12 error node v4.7.2
13 error npm v4.1.1
14 error Problems were encountered
14 error Please correct and try again.
14 error peer invalid: grunt@~0.4.0, required by [email protected]
15 error If you need help, you may report this error at:
15 error <https://github.com/npm/npm/issues>
16 verbose exit [ 1, true ]
Peer dependency on grunt should be changed from:
"peerDependencies": {
"grunt": "~0.4.0"
}
to the version compatible with grunt 1.x, like it is done in gruntt-contrib-clean
, for example:
"peerDependencies": {
"grunt": ">= 0.4.5"
}
Input:
rename: {
pageids: {
files: [
{
src: ['../crn-main/page-3750.php'],
dest: '../crn-main/page-4077.php'
},
{
src: ['../crn-main/page-3812.php'],
dest: '../crn-main/page-4079.php'
},
{
src: ['../crn-main/page-3809.php'],
dest: '../crn-main/page-4081.php'
},
{
src: ['../crn-main/page-3712.php'],
dest: '../crn-main/page-4083.php'
},
{
src: ['../crn-main/page-3714.php'],
dest: '../crn-main/page-4089.php'
},
{
src: ['../crn-main/page-3716.php'],
dest: '../crn-main/page-4085.php'
},
{
src: ['../crn-main/page-3664.php'],
dest: '../crn-main/page-4087.php'
},
{
src: ['../crn-main/page-3764.php'],
dest: '../crn-main/page-4092.php'
}
]
}
}
Output:
Running "rename:pageids" (rename) task
Renaming File ../crn-main/page-3750.php -> ../crn-main/page-4077.php
Renaming File ../crn-main/page-3812.php -> ../crn-main/page-4079.php
Renaming File ../crn-main/page-3809.php -> ../crn-main/page-4081.php
Renaming File ../crn-main/page-3712.php -> ../crn-main/page-4083.php
Renaming File ../crn-main/page-3714.php -> ../crn-main/page-4089.php
Done, without errors.
It might be a good idea to rename this plugin. The grunt-contrib namespace is generally reserved for official plugins.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.