1.0.0 • Published 8 years ago

gulp-typson v1.0.0

Weekly downloads
2
License
MIT
Repository
github
Last release
8 years ago

gulp-typson

A simple and minimal wrapper around typson schema for gulp.

Note: This plugin generates one JSON file per typescript file read unless specified otherwise.

Usage

npm install gulp-typson --save-dev

In your gulpfile.js

const gulp = require('gulp');
const typson = require('gulp-typson');

gulp.task('typson', function () {
	return gulp.src('demo/*.ts')
		.pipe(typson({ pretty: true }))
		.pipe(gulp.dest('docs/'));
});

Want to merge all JSON files into one?

const gulp = require('gulp');
const concat = require('gulp-concat-json');
const typson = require('gulp-typson');

gulp.task('default', function () {
	return gulp.src('demo/*.ts')
		.pipe(typson({ pretty: true }))
		.pipe(concat('docs.json'))
		.pipe(gulp.dest('docs/'));
});

Options

  • pretty: boolean set true to pretty print the JSON source.

Changelog

1.0.0

  • Initial release