1

実行時に問題が発生しています

Gastic ビルド --env=prod

私のgassetic.ymlファイルには次のものがあります

requires:
    compass : gulp-compass
    minify  : gulp-minify-css
    concat  : gulp-concat
    uglify  : gulp-uglify
mimetypes:
    # This section contains the formatters for the css files
    css:
        # In 'prod' mode, use these settings
        prod:
            outputFolder: web/css  # The output folder for your saving your compiled files
            webPath:      css  # The web path for the compiled files
        # Run these tasks on your compiled files
        tasks:
            - { name: compass, args: { sass: src/WebBundle/Resources/sass, css: web/css } }
            - { name: minify }
            - { name: concat, args: '%filename%' }
    # This is the list of source files to apply the above settings
        files:
            frontend.css: # This is the output filename
                - src/WebBundle/Resources/sass/*.scss

    # Watch these files for changes (optional)
    watch:
        - src/WebBundle/Resources/sass/*.scss

ただし、css をコンパイルした後、指定された場所にある scss ファイルの変更を監視するウォッチャーはありません。

Gassetic.yml ファイルに何か足りないものはありますか?

4

1 に答える 1

1

Gassetic は、ウォッチャーを開始し、dev環境に対してのみ livereload を実行します。したがって、env が 1 つしかない場合は、 prodの代わりにdevを使用します。

コードで次に使用します<!-- *:frontend.css -->(そこにある * を参照してください)

于 2015-03-30T16:21:25.780 に答える