npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

gulp-ice-builder

v3.0.4

Published

Gulp plugin to compile Slice files to JavaScript

Downloads

3,281

Readme

Build Status Build status

Ice Builder for Gulp

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

Install

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

Usage

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

gulp.task("slice2js", () => {
    return gulp.src('slice/*.ice')
        .pipe(iceBuilder())
        .pipe(gulp.dest("."));
});

Options

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.

iceBuilder({
    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).

iceBuilder({
    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.

iceBuilder({
    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.

iceBuilder({
    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.

iceBuilder({
    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.

iceBuilder({
    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.

iceBuilder({
    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.

iceBuilder({
    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.