• function



steal.build.pluginify(moduleId, opts)


  1. moduleId {Object}

    The moduleId of the plugin to be built.

  2. opts {Object}

    An object map of the following optional configuration properties:

    • out {String}

      Specifies the location of the generated file. The default filename is the moduleId with . replacing all / in the moduleId's folder. For example, pluginifying "foo/bar" will create `"foo/bar/foo.bar.js"

        out: "bar.js"
    • exclude {Array}

      An array of moduleIds to exclude. If the moduleId ends with a slash (ex: "can/") all modules within that folder will be ignored.

    • standAlone {Boolean | String}

      Set to true to only build the moduleId resource, everything else will be excluded. standAlone can also be set to a specific module or folder.

    • nojquery {Boolean}

      Excludes jQuery and adds jquery: "jQuery" to the shim. Example:

        nojquery: true
    • nocanjs {Boolean}

      Exclude all CanJS files and adds corresponding shims.

    • minify {Boolean}

      Set to true to minify the build.

    • wrapInner {Array}

      An array containing code you want to wrap the output in like [before, after]. Example:

        wrapInner: ["(function($,can){","})(jQuery, can)"]
    • shim {Object}

      Specifies a mappings between an excluded moduleId and it's global value. For example:

        exclude: ["jquery","can/"],
        shim: {
          jquery: "jQuery",
          "can/util": "can",
          "can/control": "can.Control"
    • skipAll {Boolean}
      • Don't run any of the code in steal callbacks (used for canjs build)

steal.build.pluginify(moduleId, options) builds a 'steal-less' version of a module. It can called programatically in JavaScript like:

  nojquery: true,
  nocanjs: true,
  exclude: ["underscore"],
  shim: { "underscore" : "_" }

Basic examples can be called from the command line like:

./js steal/pluginifyjs widgets/chart -nojquery -nocanjs