Gruntjs 包括Gruntfile.js中提到的css文件

Gruntjs 包括Gruntfile.js中提到的css文件,gruntjs,grunt-includes,Gruntjs,Grunt Includes,阅读并包含Gruntfile.js中提到的css、js文件。我尝试使用grunt包含源代码插件,但不起作用 index.html <html> <head> <!-- build:css <include destination file name> --> <---include the mentioned css files from Gruntfile.js---> <!-- endbuild -->

阅读并包含Gruntfile.js中提到的css、js文件。我尝试使用grunt包含源代码插件,但不起作用

index.html

<html>
<head>
  <!-- build:css <include destination file name> -->
    <---include the mentioned css files from Gruntfile.js--->
  <!-- endbuild -->

</html>
 <html>
 <head>
  <!-- build:css assets/styles/styles.css -->
    <link rel="stylesheet" type="text/css" href="bower_components/angular-autocomplete/angucomplete.css"/>
   <link rel="stylesheet" type="text/css" href="bower_components/angular-calendar/fullcalendar.css"/>
    <link rel="stylesheet" type="text/css" href="bower_components/fonts/font-awesome/css/font-awesome.css"/>
   <link rel="stylesheet" type="text/css" href="bower_components/fonts/glyphicons/css/site.css"/>
   <link rel="stylesheet" type="text/css" href="bower_components/bootstrap/bootstrap.min.css"/>
   <link rel="stylesheet" type="text/css" href="bower_components/angular-ng-table/ng-table.min.css"/>
   <link rel="stylesheet" type="text/css" href="bower_components/angular-ui-select/select.min.css" />
   <link rel="stylesheet" type="text/css" href="bower_components/styles/style.min.css"/>
    <!-- endbuild -->

grunfile.js中

files: {
                        '<%= props.dirdeploy %>/<%= props.deployname  %>dist/assets/styles/vendors.css': [
                            '<%= props.dirdeploy %>/<%= props.deployname %>/bower_components/angular-autocomplete/angucomplete.css',
                            '<%= props.dirdeploy %>/<%= props.deployname %>/bower_components/angular-calendar/fullcalendar.css',
                            '<%= props.dirdeploy %>/<%= props.deployname %>/bower_components/fonts/font-awesome/css/font-awesome.css',
                            '<%= props.dirdeploy %>/<%= props.deployname %>/bower_components/fonts/glyphicons/css/site.css',
                            '<%= props.dirdeploy %>/<%= props.deployname %>/bower_components/bootstrap/bootstrap.min.css',
                            '<%= props.dirdeploy %>/<%= props.deployname %>/bower_components/angular-ng-table/ng-table.min.css',
                            '<%= props.dirdeploy %>/<%= props.deployname %>/bower_components/angular-ui-select/select.min.css',
                            '<%= props.dirdeploy %>/<%= props.deployname %>/bower_components/styles/style.min.css'

                        ] 
   }
  }
文件:{
“/dist/assets/styles/vendors.css”:[
“//bower_components/angular autocomplete/angucomplete.css”,
“//bower_components/angular calendar/fullcalendar.css”,
“//bower_components/font/font awesome/css/font awesome.css”,
“//bower_components/fonts/glyphicons/css/site.css”,
“//bower_components/bootstrap/bootstrap.min.css”,
“//bower_components/angular ng table/ng table.min.css”,
“//bower_components/angular ui select/select.min.css”,
“//bower_components/styles/style.min.css”
] 
}
}
index.html中

<html>
<head>
  <!-- build:css <include destination file name> -->
    <---include the mentioned css files from Gruntfile.js--->
  <!-- endbuild -->

</html>
 <html>
 <head>
  <!-- build:css assets/styles/styles.css -->
    <link rel="stylesheet" type="text/css" href="bower_components/angular-autocomplete/angucomplete.css"/>
   <link rel="stylesheet" type="text/css" href="bower_components/angular-calendar/fullcalendar.css"/>
    <link rel="stylesheet" type="text/css" href="bower_components/fonts/font-awesome/css/font-awesome.css"/>
   <link rel="stylesheet" type="text/css" href="bower_components/fonts/glyphicons/css/site.css"/>
   <link rel="stylesheet" type="text/css" href="bower_components/bootstrap/bootstrap.min.css"/>
   <link rel="stylesheet" type="text/css" href="bower_components/angular-ng-table/ng-table.min.css"/>
   <link rel="stylesheet" type="text/css" href="bower_components/angular-ui-select/select.min.css" />
   <link rel="stylesheet" type="text/css" href="bower_components/styles/style.min.css"/>
    <!-- endbuild -->

我的最终index.html将是

 <html>
  <head>
        <!-- build:css assets/styles/styles.css -->
    <link rel="stylesheet" type="text/css" href="bower_components/angular-autocomplete/angucomplete.css"/>
    <link rel="stylesheet" type="text/css" href="bower_components/angular-calendar/fullcalendar.css"/>
    <link rel="stylesheet" type="text/css" href="bower_components/fonts/font-awesome/css/font-awesome.css"/>
    <link rel="stylesheet" type="text/css" href="bower_components/fonts/glyphicons/css/site.css"/>
    <link rel="stylesheet" type="text/css" href="bower_components/bootstrap/bootstrap.min.css"/>
    <link rel="stylesheet" type="text/css" href="bower_components/angular-ng-table/ng-table.min.css"/>
    <link rel="stylesheet" type="text/css" href="bower_components/angular-ui-select/select.min.css" />
    <link rel="stylesheet" type="text/css" href="bower_components/styles/style.min.css"/>
    <!-- endbuild -->
 </head>
 </html>