在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):fraserxu/gulp-html2js开源软件地址(OpenSource Url):https://github.com/fraserxu/gulp-html2js开源编程语言(OpenSource Language):JavaScript 100.0%开源软件介绍(OpenSource Introduction):gulp-html2jsGulp plugin for converting AngularJS templates to JavaScript See more from grunt-html2js InstallInstall with npm
UsageAngularvar gulp = require('gulp');
var html2js = require('gulp-html2js');
gulp.task('default', function () {
gulp.src('templates/*.html')
.pipe(html2js('angular.js', {
adapter: 'angular',
base: 'templates',
name: 'angular-demo'
}))
.pipe(gulp.dest('dist/'));
}); Vanillavar gulp = require('gulp');
var html2js = require('gulp-html2js');
gulp.task('default', function () {
gulp.src('templates/*.html')
.pipe(html2js('js-demo.js', {
adapter: 'javascript',
base: 'templates',
name: 'js-demo'
}))
.pipe(gulp.dest('dist/'));
}); Available options
LICENSE(MIT License) Copyright (c) 2015 Fraserxu [email protected] |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论