我正在尝试将 gulp-useref 与 django 一起使用。我所有的注入脚本都工作正常,注入后进行手动路径更新,但现在我想连接我注入的脚本。这是我的html
<!-- build:css({compile/serve,src}) styles/vendor.css -->
<!-- bower:css -->
<link rel="stylesheet" href="{{ STATIC_URL }}dash/bower_components/angular-material/angular-material.css" />
<link rel="stylesheet" href="{{ STATIC_URL }}dash/bower_components/nvd3/src/nv.d3.css" />
<!-- endbower -->
<!-- endbuild -->
<!-- build:css({compile/serve,src}) styles/app.css -->
<!-- inject:css -->
<link rel="stylesheet" href="{{ STATIC_URL }}dash/compile/serve/styles/main.css">
<!-- endinject -->
<!-- endbuild -->
和
<!-- build:js(src) scripts/vendor.js -->
<!-- bower:js -->
<script src="{{ STATIC_URL }}dash/bower_components/angular/angular.js"></script>
<script src="{{ STATIC_URL }}dash/bower_components/angular-animate/angular-animate.js"></script>
<script src="{{ STATIC_URL }}dash/bower_components/angular-cookies/angular-cookies.js"></script>
<script src="{{ STATIC_URL }}dash/bower_components/angular-touch/angular-touch.js"></script>
<script src="{{ STATIC_URL }}dash/bower_components/angular-sanitize/angular-sanitize.js"></script>
<script src="{{ STATIC_URL }}dash/bower_components/angular-resource/angular-resource.js"></script>
<script src="{{ STATIC_URL }}dash/bower_components/angular-route/angular-route.js"></script>
<script src="{{ STATIC_URL }}dash/bower_components/angular-aria/angular-aria.js"></script>
<script src="{{ STATIC_URL }}dash/bower_components/angular-material/angular-material.js"></script>
<script src="{{ STATIC_URL }}dash/bower_components/angular-messages/angular-messages.js"></script>
<script src="{{ STATIC_URL }}dash/bower_components/pace/pace.js"></script>
<script src="{{ STATIC_URL }}dash/bower_components/d3/d3.js"></script>
<script src="{{ STATIC_URL }}dash/bower_components/nvd3/nv.d3.js"></script>
<script src="{{ STATIC_URL }}dash/bower_components/angularjs-nvd3-directives/dist/angularjs-nvd3-directives.js"></script>
<!-- endbower -->
<!-- endbuild -->
<!-- build:js({compile/serve,src}) scripts/app.js -->
<!-- inject:js -->
<script src="{{ STATIC_URL }}dash/src/js/dashboard/services/api/campaigns.js"></script>
<script src="{{ STATIC_URL }}dash/src/js/dashboard/controllers/navigation/sidebar.js"></script>
<script src="{{ STATIC_URL }}dash/src/js/dashboard/controllers/navigation/header.js"></script>
<script src="{{ STATIC_URL }}dash/src/js/dashboard/controllers/forms/company-settings.js"></script>
<script src="{{ STATIC_URL }}dash/src/js/dashboard/controllers/forms/campaign-create.js"></script>
<script src="{{ STATIC_URL }}dash/src/js/dashboard/directives/file-reader.js"></script>
<script src="{{ STATIC_URL }}dash/src/js/app.js"></script>
<!-- endinject -->
<!-- inject:partials -->
<!-- angular templates will be automatically converted in js and inserted here -->
<!-- endinject -->
<!-- endbuild -->
我只想{{ STATIC_URL }}dash
从路径中删除,因为这是我的 gulpfile.js 所在的根目录(不同于 index.html 目录),将脚本处理到相应的文件中,然后使用编译 css 和 js 更新我的 index.html ..但预先{{ STATIC_URL }}dash