2016-12-01 158 views
0

編譯基礎青菜當我咕嚕命令編譯除了青菜作品裏面foundation.scss沒有編譯很好,你輸出的註釋所有@import部分的所有任務。與咕嚕 - 薩斯

有什麼問題? 這是我gruntfile.js

 module.exports = function(grunt) { 

    grunt.initConfig({ 
    pkg: grunt.file.readJSON('package.json'), 
    uglify: { 
     build: { 
     src: 'src/js/*.js', 
     dest: 'js/script.min.js' 
     }, 
     dev:{ 
     options:{ 
      beautify: true, 
      mangle: false, 
      compress:false, 
      preserveComments: 'all' 
     }, 
     src: 'src/js/*.js', 
     dest: 'js/script.min.js' 
     } 
    }, 
    sass: { 
     dev:{ 
     options:{ 
      outputStyle: 'expanded' 
     }, 
     files:{ 
      'css/app.css' : 'node_modules/foundation-sites/scss' 
     } 
     }, 
     build:{ 
     options:{ 
      outputStyle: 'compressed' 
     }, 
     files:{ 
      'css/app.css' : 'node_modules/foundation-sites/scss' 
     } 
     } 
    }, 
    watch:{ 
     js: { 
     files: ['src/js/*.js'], 
     tasks: ['uglify:dev'] 
     }, 
     css: { 
     files: ['node_modules/foundation-sites/scss/**/*.scss'], 
     tasks: ['sass:dev'] 
     } 
    } 
    }); 
    grunt.loadNpmTasks('grunt-contrib-uglify'); 
    grunt.loadNpmTasks('grunt-contrib-watch'); 
    grunt.loadNpmTasks('grunt-sass'); 
    // Default task(s). 
    grunt.registerTask('default', ['uglify:dev', 'sass:dev']); 
    grunt.registerTask('build', ['uglify:build', 'sass:build']); 

}; 

,這是我foundation.scss文件:

/** 
* Foundation for Sites by ZURB 
* Version 6.2.4 
* foundation.zurb.com 
* Licensed under MIT Open Source 
*/ 

// Sass utilities 
@import 'util/util'; 

// Global variables and styles 
@import 'global'; 

// Components 
@import 'grid/grid'; 
@import 'typography/typography'; 
@import 'forms/forms'; 
@import 'components/visibility'; 
@import 'components/float'; 
@import 'components/button'; 
@import 'components/button-group'; 
@import 'components/accordion-menu'; 
@import 'components/accordion'; 
@import 'components/badge'; 
@import 'components/breadcrumbs'; 
@import 'components/callout'; 
@import 'components/close-button'; 
@import 'components/drilldown'; 
@import 'components/dropdown-menu'; 
@import 'components/dropdown'; 
@import 'components/flex'; 
@import 'components/flex-video'; 
@import 'components/label'; 
@import 'components/media-object'; 
@import 'components/menu'; 
@import 'components/menu-icon'; 
@import 'components/off-canvas'; 
@import 'components/orbit'; 
@import 'components/pagination'; 
@import 'components/progress-bar'; 
@import 'components/reveal'; 
@import 'components/slider'; 
@import 'components/sticky'; 
@import 'components/switch'; 

回答