0
我試圖按照所有這些其他的線程,但我無法得到這個出於某種原因:Brunch bower_component CSS不編譯? (的fancybox)
Vendor CSS files not being compiled for Brunch
Separating app and vendor css in Brunch
出於某種原因,我不能得到早午餐輸出供應商的CSS呢?
我正在談論的特定軟件包是Fancybox,它有一個css文件source/jquery.fancybox.css
。
我已經在我的bower.json
中重寫了fancybox main
(因爲包中沒有包含main)。出於某種原因,沒有輸出CSS,只有javascript。我覺得我必須做一些細小的事情,因爲沒有錯誤輸出,我甚至可以看到在調試輸出中監視的css文件?
brunch b -Pd
:
❯ brunch b -Pd > brunch-debug.txt
brunch:watch Loaded plugins: javascript-brunch, sass-brunch +0ms
brunch:watch File 'package.json' received event 'add' +5ms
brunch:watch File 'bower.json' received event 'add' +1ms
brunch:watch File 'brunch-config.coffee' received event 'add' +0ms
brunch:file-list Reading 'bower_components/fancybox/source/jquery.fancybox.js' +1ms
brunch:watch File 'bower_components/fancybox/source/jquery.fancybox.js' received event 'add' +0ms
brunch:file-list Reading 'bower_components/fancybox/source/jquery.fancybox.css' +0ms
brunch:watch File 'bower_components/fancybox/source/jquery.fancybox.css' received event 'add' +0ms
brunch:source-file Initializing fs_utils.SourceFile: {"path":"bower_components/fancybox/source/jquery.fancybox.js","isntModule":true,"isWrapped":true} +1ms
brunch:pipeline Compiling 'bower_components/fancybox/source/jquery.fancybox.js' with 'JavaScriptCompiler' +1ms
brunch:file-list Compiled file 'bower_components/fancybox/source/jquery.fancybox.js'... +40ms
brunch:write Writing 1/1 files +71ms
brunch:generate Concatenating bower_components/fancybox/source/jquery.fancybox.js to public/libraries.js +3ms
brunch:common Writing file 'public/libraries.js' +7ms
我設置我的配置文件,所以:
brunch-config.coffee
module.exports = config:
files:
javascripts: joinTo:
'libraries.js': /^(?!app\/)/
'app.js': /^app\//
stylesheets: joinTo:
'vendor.css': /^(bower_components|vendor)\//
'app.css': /^app\//
modules:
wrapper: false
definition: false
bower.json
{
"name": "brunch-test-fancybox",
"version": "0.0.0",
"authors": [
"Test <[email protected]>"
],
"description": "",
"main": "",
"moduleType": [],
"license": "MIT",
"homepage": "",
"private": true,
"ignore": [
"**/.*",
"node_modules",
"bower_components",
"test",
"tests"
],
"overrides": {
"fancybox": {
"main": [
"source/jquery.fancybox.css",
"source/jquery.fancybox.js"
]
}
},
"dependencies": {
"fancybox": "~2.1.5"
}
}
的package.json
{
"name": "brunch-test-fancybox",
"version": "1.0.0",
"description": "",
"main": "index.js",
"dependencies": {
"brunch": "^1.8.5",
"javascript-brunch": "^1.7.1",
"sass-brunch": "^1.9.1"
},
"devDependencies": {},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC"
}
當然,是的,這是我的一個完全微不足道的錯誤哈哈。謝謝。一個簡單的'npm install --save-dev css-brunch'現在它工作的很好。 – waffl