6.0.2 • Published 6 years ago

ygor v6.0.2

Weekly downloads
32
License
MIT
Repository
github
Last release
6 years ago

Ygor is a no-frills toolkit consisting of a task runner and a file transformer. Enjoy as a whole or a la carte. Built on promises to work wonderfully with async and await in Node.js 8 and above.

Node is the CLI, npm is the plugin system. Go nuts.

Install

$ npm install --save-dev ygor

Usage

Create a JavaScript file, write some functions, tell Ygor.

// make.js

const { tasks, shell, find, read, write } = require('ygor');
const { transform } = require('babel-core');

function buildCss() {
  return shell`postcss --use autoprefixer --dir dest src/**/*.css`;
}

function buildJs(cli) {
  return find('src/**/*.js')
    .map(read())
    .map(async (file) => {
      const { code } = await transform(file.contents, cli);

      file.contents = code;

      return file;
    })
    .map(write('dest'));
}

async function build(cli) {
  await buildCss(cli);
  await buildJs(cli);
}

tasks
  .add('css', buildCss);
  .add('js', buildJs)
  .add('default', build);

To run a task, execute the file with Node.js and indicate which task to perform.

$ node make js --minified

API

See the individual packages for complete documentation:


MIT © Shannon Moeller

6.0.2

6 years ago

6.0.1

6 years ago

6.0.0

6 years ago

5.4.0

6 years ago

5.3.0

6 years ago

5.2.3

6 years ago

5.2.2

6 years ago

5.2.1

6 years ago

5.2.0

6 years ago

5.1.6

6 years ago

5.1.5

6 years ago

5.1.4

6 years ago

5.1.3

6 years ago

5.1.2

6 years ago

5.1.1

6 years ago

5.1.0

6 years ago

5.0.0

6 years ago

5.0.0-9

6 years ago

5.0.0-8

6 years ago

5.0.0-7

6 years ago

5.0.0-6

6 years ago

5.0.0-5

6 years ago

5.0.0-4

6 years ago

5.0.0-3

6 years ago

5.0.0-2

6 years ago

4.0.4

7 years ago

4.0.3

7 years ago

4.0.2

7 years ago

4.0.1

7 years ago

4.0.0

7 years ago

3.0.1

8 years ago

3.0.0

8 years ago

2.2.4

8 years ago

2.2.3

8 years ago

2.2.2

8 years ago

2.2.1

8 years ago

2.2.0

8 years ago

2.1.0

8 years ago

2.0.0

8 years ago

1.7.0

8 years ago

1.6.0

8 years ago

1.5.4

8 years ago

1.5.3

8 years ago

1.5.2

8 years ago

1.5.1

8 years ago

1.5.0

8 years ago

1.4.1

8 years ago

1.4.0

8 years ago

1.3.2

8 years ago

1.3.1

8 years ago

1.3.0

8 years ago

1.2.2

8 years ago

1.2.1

8 years ago

1.2.0

8 years ago

1.1.0

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago