6.0.2 • Published 7 years ago

ygor v6.0.2

Weekly downloads
32
License
MIT
Repository
github
Last release
7 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

7 years ago

6.0.1

7 years ago

6.0.0

7 years ago

5.4.0

7 years ago

5.3.0

7 years ago

5.2.3

7 years ago

5.2.2

7 years ago

5.2.1

7 years ago

5.2.0

7 years ago

5.1.6

8 years ago

5.1.5

8 years ago

5.1.4

8 years ago

5.1.3

8 years ago

5.1.2

8 years ago

5.1.1

8 years ago

5.1.0

8 years ago

5.0.0

8 years ago

5.0.0-9

8 years ago

5.0.0-8

8 years ago

5.0.0-7

8 years ago

5.0.0-6

8 years ago

5.0.0-5

8 years ago

5.0.0-4

8 years ago

5.0.0-3

8 years ago

5.0.0-2

8 years ago

4.0.4

8 years ago

4.0.3

8 years ago

4.0.2

8 years ago

4.0.1

9 years ago

4.0.0

9 years ago

3.0.1

9 years ago

3.0.0

9 years ago

2.2.4

9 years ago

2.2.3

9 years ago

2.2.2

9 years ago

2.2.1

9 years ago

2.2.0

9 years ago

2.1.0

9 years ago

2.0.0

9 years ago

1.7.0

9 years ago

1.6.0

9 years ago

1.5.4

9 years ago

1.5.3

9 years ago

1.5.2

9 years ago

1.5.1

9 years ago

1.5.0

10 years ago

1.4.1

10 years ago

1.4.0

10 years ago

1.3.2

10 years ago

1.3.1

10 years ago

1.3.0

10 years ago

1.2.2

10 years ago

1.2.1

10 years ago

1.2.0

10 years ago

1.1.0

10 years ago

1.0.2

10 years ago

1.0.1

10 years ago

1.0.0

10 years ago