代码之家  ›  专栏  ›  技术社区  ›  Zeeshan Hassan Memon

Grunt compass:dist任务失败,原因是bootstrap sass official/assets/stylesheets/bootstrap/_variables.CSS中的CSS无效

  •  0
  • Zeeshan Hassan Memon  · 技术社区  · 4 年前

    咕哝的体格 由于产生以下错误而失败:

    错误app/styles/directive.scs(第369行,共369行 bower_components/bootstrap-sass official/assets/stylesheets/bootstrap/_variables.css: “…floor(math”:expected“)”后的CSS无效,为 “.div($grid gutt…”)

    Gruntfile.js compass build 任务如下:

    grunt.initConfig({
    
            ....
            
            compass: {
                options: {
                    sassDir: '<%= yeoman.app %>/styles',
                    cssDir: '.tmp/styles',
                    generatedImagesDir: '.tmp/images/generated',
                    imagesDir: '<%= yeoman.app %>/images',
                    javascriptsDir: '<%= yeoman.app %>/scripts',
                    fontsDir: '<%= yeoman.app %>/styles/fonts',
                    importPath: './bower_components',
                    httpImagesPath: '/images',
                    httpGeneratedImagesPath: '/images/generated',
                    httpFontsPath: '/styles/fonts',
                    relativeAssets: false,
                    assetCacheBuster: false,
                    raw: 'Sass::Script::Number.precision = 10\n'
                },
                dist: {
                    options: {
                        generatedImagesDir: '<%= yeoman.dist %>/images/generated'
                    }
                },
                server: {
                    options: {
                        sourcemap: true
                    }
                }
            },
            
            concurrent: {
                server: [
                    'compass:server'
                ],
                test: [
                    'compass'
                ],
                dist: [
                    'compass:dist',
                    'imagemin',
                    'svgmin'
                ]
            },
            ....
        });
    
    grunt.registerTask('build', [
            'concurrent:dist',
        ]);
    

    package.json 包括:

    "grunt-contrib-compass": "^1.0.0",
    

    bower.json 包括:

    "bootstrap-sass-official": "^3.2.0",
    

    其他信息:

    操作系统:Linux Ubuntu 18.10

    节点:v8.17.0

    NPM:v6.13.4

    Ruby:Ruby 2.5.1p57(2018-03-29修订版63029)[x86_64-linux-gnu]

    指南针:指南针1.0.3(北极星)

    0 回复  |  直到 4 年前