2017-01-21 7 views
0

、私は次のファイルの構造を有する:main.sassがぶ飲み+ブートストラップフォント

frontend 
├── bower_components 
│ └── bootstrap 
│  └── dist 
│   ├── css 
│   │ └── bootstrap.css 
│   └── fonts 
│    └── glyphicons-halflings-regular.eot 
│ 
├── src 
│ ├── style 
│ │ └── main.sass 
│ └── index.html 
│ 
└── gulpfile.js 

を私が直接ブートストラップファイルのインポート:

@import ../../bower_components/bootstrap/dist/css/bootstrap.css 

をしかし、それは自動的に

からフォントにリンクを変更します

~

../../bower_components/bootstrap/dist/fonts/glyphicons-halflings-regular.eot

build 
├── css 
│ └── main.css 
├── fonts 
| └── glyphicons-halflings-regular.eot 
└── index.html 

どのように私は正しくglyphicons-halflings-regular.eotmain.css内のリンクを取得するためにすべてを構築する必要があります。

この構造は、私がガルプでビルドした後に取得したいのですか?

答えて

0

最後に、私はgulp-concatのために.cssファイルのインポートを中止しました。正常に動作します。ソースマッピングも正しいです。

gulp.task('style:build', function() { 
    var cssStream = gulp.src(path.bower.bootstrap.css); 

    var sassStream = gulp.src(path.src.style) 
     .pipe(sourcemaps.init()) 
     .pipe(sass()) 
     .pipe(prefixer()) 
     .pipe(cleanCSS()) 
     .pipe(sourcemaps.write()); 

    var mergedStream = merge(cssStream, sassStream) 
     .pipe(sourcemaps.init()) 
     .pipe(concat('main.css')) 
     .pipe(sourcemaps.write()) 
     .pipe(gulp.dest(path.build.css)) 
     .pipe(reload({stream: true})); 

    return mergedStream; 
}); 
関連する問題