Gulp plugin to compile Slice files to JavaScript
Last updated a year ago by zeroc .
BSD-3-Clause · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install gulp-ice-builder 
SYNC missed versions from official npm registry.

Build Status Build status

Ice Builder for Gulp

Gulp plug-in to automate the compilation of Slice files to JavaScript.


npm install gulp-ice-builder --save-dev

gulp-ice-builder calls the slice2js compiler. You can install the latest slice2js with:

npm install slice2js --save-dev


const iceBuilder = require('gulp-ice-builder');

gulp.task("slice2js", () => {
    return gulp.src('slice/*.ice')


iceHome String

The root directory of your Ice installation used for locating the Slice-to-JS compiler and Slice files of your Ice installation, you don't need to set it when using the slice2js npm package.

    iceHome: "/opt/Ice-3.7.1"})

If not set, the builder will try to use the slice2js npm package.

iceToolsPath String

The directory of the slice2js executable. This setting is ignored when using the slice2js npm package (iceHome not set).

    iceHome: "c:\ice",
    iceToolsPath: "c:\ice\cpp\bin\x64\Release"});

When not set <iceHome>/bin and <iceHome>/cpp/bin are searched for the slice2js exectuable.

include Array

List of directories to add to Slice compiler include file search path.

    include: ["."]});

Each directory in include is passed to slice2js as -I<dir>. The Ice slice file directory is automatically included from either the slice2js npm package or iceHome (when set).

args Array

The list of extra arguments passed to the slice2js compiler.

    args: ["-DDEBUG"]});

For a full list of arguments you can pass to the slice2js compiler refer to slice2js.

jsbundle Boolean

Create a JavaScript bundle for each js:module, the bundle contains the JavaScript generated code for all the Slice compilation units that belong to a given js:module, an extra bundled named generated.js is generated containing all the JavaScript generated code for Slice compilation units that doesn't belong to any js:module.

The jsbundle option is enabled by default when args contains --typescript value. It can be manually enabled and disabled by setting this property to true or false respectively.

The bundle creation uses Rollup module bundler and it requires that your Slice definitions use the es6 JavaScript module mapping introduced with Ice 3.7.

    args: ["--typescript"],
    jsbundle: false});

jsbundleFormat String

The output format use by Rollup generated bundled, it correspond to Rollup --format option. The accepted values are amd, cjs, es, iife and umd. The default value is es.

    args: ["--typescript"],
    jsbundleFormat: "cjs"});

jsbundleSourcemap Boolean

Enable or disable the generation of source map files for the generated JavaScript bundle. The default is to generate a source map for each generated bundled, it can be disabled by setting this option to false.

    args: ["--typescript"],
    jsbundleSourcemap: false});

tsbundle Boolean

Create a bundle containing the TypeScript declarations for each js:module. An extra bundle named generated.d.ts is generated containing the TypeScript generated declarations for Slice compilation units that do not belong to any js:module.

    args: ["--typescript"],
    tsbundle: false});

The tsbundle option is enabled by default when args contains --typescript value. It can be manually enabled and disabled by setting this property to true or false respectively.

Current Tags

  • 3.0.2                                ...           latest (a year ago)

14 Versions

  • 3.0.2                                ...           a year ago
  • 3.0.1                                ...           a year ago
  • 3.0.0                                ...           a year ago
  • 2.0.3                                ...           a year ago
  • 2.0.2                                ...           a year ago
  • 2.0.1                                ...           2 years ago
  • 2.0.0                                ...           2 years ago
  • 1.0.6                                ...           3 years ago
  • 1.0.5                                ...           3 years ago
  • 1.0.4                                ...           3 years ago
  • 1.0.3                                ...           4 years ago
  • 1.0.2                                ...           5 years ago
  • 1.0.1                                ...           5 years ago
  • 1.0.0                                ...           5 years ago
Maintainers (1)
Today 0
This Week 0
This Month 3
Last Day 0
Last Week 0
Last Month 33
Dependencies (10)
Dev Dependencies (4)
Dependents (1)

Copyright 2014 - 2016 © |