0.1.8 • Published 10 years ago

gulp-typespace v0.1.8

Weekly downloads
1
License
MIT
Repository
github
Last release
10 years ago

gulp-typespace

Typespace plugin for Gulp.

Usage

All parameters supported by Typespace can be passed as a settings object.

Required arguments/flags:

  • namespace - name of the root namespace

Optional arguments/flags:

  • config - input tsconfig.json file path to load files from
  • files - paths of files to include
  • outFile - output .ts file path
  • pathPrefix - directory root to ignore from module paths
  • root - root path to search for files under
const typespace = require("gulp-typespace");

gulp.task("typespace", () => {
    const settings = {
        config: "./tsconfig.json",
        namespace: "MyProject",
        pathPrefix: "src/",
        root: "."
    };

    typespace(settings)
        .pipe(gulp.dest("dist"));
});

You can also pass a callback to be executed instead of creating a stream. It will receive the generated text as a string.

const typespace = require("gulp-typespace");

gulp.task("typespace", () => {
    const settings = {
        config: "./tsconfig.json",
        rootNamespace: "MyProject",
        root: "."
    };

    typespace(settings, text => console.log(text));
});
0.1.8

10 years ago

0.1.7

10 years ago

0.1.6

10 years ago

0.1.5

10 years ago

0.1.4

10 years ago

0.1.3

10 years ago

0.1.2

10 years ago

0.1.1

10 years ago

0.1.0

10 years ago