在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):crissdev/gulp-yaml开源软件地址(OpenSource Url):https://github.com/crissdev/gulp-yaml开源编程语言(OpenSource Language):JavaScript 100.0%开源软件介绍(OpenSource Introduction):gulp-yamlInstallnpm install gulp-yaml --save-dev Usageconst yaml = require('gulp-yaml');
gulp.src('./src/*.yml')
.pipe(yaml({ schema: 'DEFAULT_SAFE_SCHEMA' }))
.pipe(gulp.dest('./dist/'))
gulp.src('./src/*.yml')
.pipe(yaml({ space: 2 }))
.pipe(gulp.dest('./dist/'))
gulp.src('./src/*.yml')
.pipe(yaml({ safe: true }))
.pipe(gulp.dest('./dist/')) APIyaml([options])options.safeType: Default: Enable or disable support for regexps, functions and undefined. This flag should always be enabled when working with untrusted data. When this flag is enabled then safeLoad method is used, otherwise load. options.spaceType: Default: Control spacing in the resulting output. It has the same usage as for JSON.stringify options.replacerType: Default: Further transform the resulting output. It has the same usage as for JSON.stringify options.schemaType: Default: Specifies what schema to use. Valid values are the same that js-yaml supports, except they are received as strings (lowercase or uppercase). See the example in the Usage section of this README. The default schema is chosen using the options.filenameType: Default: the path of the file processed String to be used as a file path in error/warning messages. options.extType: Default: File extension of the generated file. options.jsonType: Default: Compatibility with JSON.parse behaviour. If true, then duplicate keys in a mapping will override values rather than throwing an error. options.onWarningType: Default: Function to call on warning messages. Loader will throw on warnings if this function is not provided. LicenseMIT © Cristian Trifan |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论