Skip to content

runner/tools

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Task runner tools

build status npm version dependencies status devDependencies status Gitter RunKit

Installation

npm install runner-tools

Usage

Add to the scope:

const tools = require('runner-tools');

Remove some generated files:

tools.unlink(
    ['build/develop/main.css', 'build/develop/main.js'],
    log,
    function ( error ) {
        console.log(error);    
    }
);

Read file content in a buffer:

tools.read(
    'src/css/main.css',
    log,
    function ( error, data ) {
        console.log(error, data.toString());    
    }
);

Write generated files content:

tools.write(
    [{name: 'build/develop/main.js', data: someContent}],
    log,
    function ( error ) {
        console.log(error);    
    }
);

Create new directories and any necessary subdirectories:

tools.mkdir(
    ['build/develop', 'build/release'],
    log,
    function ( error ) {
        console.log(error);    
    }
);

Copy a directory content to another place:

tools.copy(
    {
        source: 'src/img',
        target: 'build/develop/img'
    },
    log,
    function ( error ) {
        console.log(error);
    }
);

Contribution

If you have any problems or suggestions please open an issue according to the contribution rules.

License

runner-tools is released under the GPL-3.0 License.

About

Simple task runner tools.

Resources

Contributing

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •