1.2.1 • Published 3 years ago

iclo v1.2.1

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

Installation

npm i iclo --save-dev

Configuration

The config filename is iclo.config.js, and iclo.config.cjs for packages with "type":"module"

Basic configuration:

module.exports = {
    from: 'git',
    to: ['prettier', 'npm'],
};

With absolute paths:

module.exports = {
    from: {
        path: '.gitignore',
        absolute: true,
    },
    to: {
        paths: ['.prettierignore', '.npmignore'],
        absolute: true,
    },
};

With prepending and appending to files:

module.exports = {
    from: 'git',
    to: ['prettier', 'npm'],
    prepend: ['# before first line', 'my-file-1', '\n'],
    append: ['\n', '# after last line', 'my-file-2'],
};

With multiple configs:

module.exports = [
    {
        from: 'git',
        to: ['prettier', 'npm'],
    },
    {
        from: 'git',
        to: ['prettier', 'npm'],
    },
];

Usage

CLI

npx iclo [from] [to] [options]

Example

npx iclo .gitignore -f prettier npm -c ./my-config.js

Options:

NameShorthandDescription
--from-absolute-fTreat the from path as absolute.
--to-absolute-tTreat the to paths as absolute.
--config-file-cSpecify a custom config file path.
--version-vPrint the current version to the console.

API

const iclo = require('iclo');

(async () => {
    await iclo({
        from: 'git',
        to: ['prettier', 'npm'],
    });
})();
1.2.0

3 years ago

1.2.1

3 years ago

1.1.1

3 years ago

1.1.0

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago