3.7.100 • Published 7 months ago

slice2js v3.7.100

Weekly downloads
122
License
GPL-2.0
Repository
github
Last release
7 months ago

Build Status Build status

slice2js

Compiles Slice files to JavaScript.

Install

npm install slice2js --save-dev

Usage

var slice2js = require('slice2js');

Methods

slice2js.compile(args [, options])

args Array

List of arguments passed to the slice2js compiler.

OptionDescription
-hShow usage information.
-v, --versionDisplay the Ice version.
-DNAMEDefine NAME as 1.
-DNAME=DEFDefine NAME as DEF.
-UNAMERemove any definition for NAME.
-IDIRAdd DIR to the include path for Slice files.
-EPrint preprocessor output on stdout.
--stdoutPrint generated code to stdout.
--output-dir DIRCreate files in the directory DIR.
--dependPrint dependency information for Slice files.
--depend-jsonPrint dependency information for Slice files in JSON format.
--depend-xmlPrint dependency information for Slice files in XML format.
--depend-file FILEWrite dependencies to FILE instead of standard output.
-d, --debugPrint debug messages.

Additional documentation can be found here.

The slice2js module includes all the Ice Slice files and adds these files to the include file search path.

options Object

Object options is passed directly to child_process.spawn(command[, args][, options]) as the options parameter. This can be used to control things such as stdio, environment, and working directory.

var slice2js = require('slice2js');
slice2js.compile(['Hello.ice'], { stdio: 'inherit' })

slice2js.sliceDir

Returns the absolute path of the included Ice Slice files.

Example

var slice2js = require('slice2js');
slice2js.compile(['Hello.ice']).on('close', function (code)
{
    if(code !== 0)
    {
      console.log('slice2js exited with code ' + code);
    }
    else
    {
      console.log('slice2js finished successfully');
    }
});

Command Line

Slice2js can also be installed globally and used from the command line.

npm install -g slice2js
slice2js Hello.ice

Gulp

For gulp integration refer to the gulp-ice-builder package.

3.7.100

7 months ago

3.7.90

11 months ago

3.7.9

1 year ago

3.7.8

2 years ago

3.7.7

2 years ago

3.7.6

3 years ago

3.7.5

3 years ago

3.7.4

4 years ago

3.7.3

5 years ago

3.6.5

5 years ago

3.7.2

5 years ago

3.7.1

6 years ago

3.6.4

7 years ago

3.7.0

7 years ago

3.6.3

8 years ago

3.6.2

8 years ago

3.6.1

9 years ago

3.6.0

9 years ago

3.6.0-rc.0

9 years ago