增加自定义lib-js依赖
- index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18<!-- build:js(src) scripts/vendor.js -->
<!-- bower:js -->
<!-- run `gulp inject` to automatically populate bower script dependencies -->
<!-- endbower -->
<script src="lib/qrcodejs/qrcode.js"></script><!-- 二维码 -->
<!-- endbuild -->
<!-- build:js({.tmp/serve,.tmp/partials,src}) scripts/app.js -->
<!-- inject:js -->
<!-- js files will be automatically insert here -->
<!-- endinject -->
<!-- inject:partials -->
<!-- angular templates will be automatically converted in js and inserted here -->
<!-- endinject -->
<!-- endbuild -->
Web-developer's notes
http://eugenioz.blogspot.com/
1 | Now add links to JS files into first build:js block, after endbower and before endbuild line, so it becomes: |
- 更多:
gulp-inject
https://www.npmjs.com/package/gulp-inject1
2
3
4<!-- inject:js -->
<script src="/src/lib1.js"></script>
<script src="/src/lib2.js"></script>
<!-- endinject -->