1.0.0 • Published 8 years ago
gulp-typson v1.0.0
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
settrue
to pretty print the JSON source.
Changelog
1.0.0
- Initial release
1.0.0
8 years ago