Включить упомянутые CSS-файлы из Gruntfile.js

Прочитайте и включите упомянутые css,js файлы из Gruntfile.js. Я пытался использовать плагин grunt-include-source, но не работал

index.html

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

</html>

В Gruntfile.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'

                        ] 
   }
  }

в 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 -->

мой последний 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>

0 ответов

Другие вопросы по тегам