Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/electricessence/gulp-typescript-helper
This repo is the base lib for extending helpers to render TypeScript in your project.
https://github.com/electricessence/gulp-typescript-helper
gulp gulp-typescript minify sourcemaps typescript typescript-compiler typescript-definitions uglify
Last synced: 1 day ago
JSON representation
This repo is the base lib for extending helpers to render TypeScript in your project.
- Host: GitHub
- URL: https://github.com/electricessence/gulp-typescript-helper
- Owner: electricessence
- License: mit
- Created: 2016-06-18T02:24:11.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2021-04-20T20:58:20.000Z (over 3 years ago)
- Last Synced: 2024-04-14T06:04:33.530Z (9 months ago)
- Topics: gulp, gulp-typescript, minify, sourcemaps, typescript, typescript-compiler, typescript-definitions, uglify
- Language: TypeScript
- Size: 196 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
gulp-typescript-helper
======================#### Provides a single simplified means for building TypeScript with:
* Source Maps
* Declaration Files
* Minification#### Other features:
* Resolves using promises instead of streams for more easy of use and flexibility.
* Use whatever Promise library you want.### Usage:
###### Write your tasks like this:
```ts
import {Target, Module, CoreTypeScriptOptions, BuildHelper} from "gulp-typescript-helper";
const DEFAULTS:CoreTypeScriptOptions = {
noImplicitAny: true,
removeComments: true,
noEmitHelpers: true,
sourceMap: true,
declaration: true
});
const builder = BuildHelper
// Setup the builder by injecting a promise constructor.
.inject(PromiseFactory) // Optional: will use Q as a default.
// Define your source folder and destination base path.
.fromTo(PATH.SOURCE, "./dist" , DEFAULTS);
// Subsequent tasks are simplified down to this:
gulp.task(
TASK.DIST_UMD,
()=> builder
.init(
MODULE.UMD + '.min',
TARGET.ES5,
MODULE.UMD)
.clear() // Clears the destination directory.
.minify() // Signals to enable minification (uglify).
.execute() // Commences the build pipeline
.then(()=>
/* Whatever steps you want to do before completion */) //
);
```See more real use cases and examples here:
https://github.com/electricessence/TypeScript.NET/blob/master/_gulp/dist.ts