在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):gil/gulp-include-source开源软件地址(OpenSource Url):https://github.com/gil/gulp-include-source开源编程语言(OpenSource Language):JavaScript 100.0%开源软件介绍(OpenSource Introduction):gulp-include-sourceGulp plugin to include scripts and styles into your HTML files automatically. InstallInstall with npm
Examplegulpfile.jsgulp.task('html', function() {
return gulp.src( './client/index.html' )
.pipe( includeSources() )
.pipe( gulp.dest('build/') );
}); index.html<html>
<head>
<!-- include:css(style/**/*.css) -->
</head>
<body>
<!-- include:js(list:vendorList) -->
<!-- include:js(script/**/*.js) -->
</body>
</html> scriptList
Result:<html>
<head>
<link rel="stylesheet" href="style/main.css">
</head>
<body>
<script src="bower_components/jquery/dist/jquery.js"></script>
<script src="bower_components/angular/angular.js"></script>
<script src="app.js"></script>
<script src="controllers/LoginController.js"></script>
<script src="controllers/MainController.js"></script>
<script src="services/LoginService.js"></script>
</body>
</html> APIincludeSources(options)options.cwdType: Base directory from where the plugin will search for source files. options.scriptExtType: When available, will override script extension in resulted HTML code. options.styleExtType: When available, will override style extension in resulted HTML code. LicenseMIT © André Gil |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论