rulify

1.0.0 • Public • Published

Rulify

Convert .rule files into .fst files.

Node Usage

Rulify takes two arguments, the first is the path to the RULE file, the second is the callback when complete.

const rulify = require('rulify');
rulify('main.rule', function(err, output) {
  // output is the path to the output file
});

Specify Output

An optional second argument can be the output path for the FST file.

rulify('src/main.rule', 'rules/main.fst', function(err, output) {
  // file is saved
});

Sync

There's an option to run rulify synchronously.

rulify.sync('src/main.rule', 'rules/main.fst');

Commandline

Installing rulify globally (npm install -g rulify) will allow you to batch convert rule files to fst files.

Convert to FST

Convert a single file. Must specify the output directory (either -o or --output).

rulify -o rules src/main.rule 

Multiple files

Use the -o or --output argument to specify an output directory.

rulify --output rules src/*.rule
rulify -o rules src/*.rule

Convert Directory

Use the -i or --input argument to specify an input directory of files.

rulify --output rules --input src
rulify -o rules -i src

Dependents (0)

Package Sidebar

Install

npm i rulify

Weekly Downloads

1

Version

1.0.0

License

SEE LICENSE IN LICENSE.txt

Last publish

Collaborators

  • squiddisco
  • wwlib
  • marstonstudio
  • mividtim
  • golgobot
  • justin-perez
  • jibo-jonathan
  • carolyn
  • bigtimebuddy