Package Exports
- movejs
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (movejs) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
movejs
Rename/Move CJS module(s) and update all affected requires
Rename/Move module or directory of modules within given package to different location. All requires within moved module(s) and within files that require moved module(s) will be accordingly updated.
- Package root is intelligently detected
- Content of eventual node_modules (external dependencies) folder is not touched
- All files as ignored by .gitignore rules are not touched (it is assumed they're most likely generated files, which will automatically fixed by regeneration).
Constraints:
- Moved module must reside in some package
otherwise root of a system is perceived as root of a package, and operation is aborted to not proceed with whole system files search (of affected modules) - Modules can be moved only within a scope of same package. For obvious reasons move across different packages will fail
Installation
$ npm install -g movejsUsage
$ movejs sourcePath destPathsourcePath can be either module file path or directory path. destPath must not be taken.
Verbose logging of underlying operations is possible with additional setting of DEBUG variable:
$ DEBUG=movejs movejs sourcePath destPathProgramatical API
movejs
Move/rename single module file or directory of modules
var mv = require('movejs');
mv(sourcePath, destPath).done(function () {
// Module(s) successfully moved
});movejs/module
Move/rename single module file
var mvModule = require('movejs/module');
mvModule(sourcePath, destPath).done(function () {
// Module successfully moved
});movejs/directory
Move/rename directory of modules
var mvDir = require('movejs/directory');
mvDir(sourcePath, destPath).done(function () {
// Modules successfully moved
});Tests 
$ npm test