distr
v1.6.0
Published
Smartly change src path to dist path, for use in small build systems.
Downloads
75
Readme
distr
Smartly change src path to dist path, for use in small build systems.
Installation
$ npm i distr;
Configuration
{
source: 'src', // directory fragment to target can be RegExp: /src|source/
destination: 'dist', // new name to use
limit:1 // number of replacements to make
}
Example
const distr = require('distr');
distr('./src/www/index.html');
//-> ./dist/www/index.html
distr('./sources/widgets/upload-component/src/index.js', {source:/sources|src/, limit:2});
//-> ./dist/widgets/upload-component/dist/index.js