Brunch bower_component CSS 没有编译? (花式盒子)
Brunch bower_component CSS not compiling? (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
我已经设置了我的配置文件:
早午餐-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 <test@test.com>"
],
"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"
}
将css-brunch 插件添加到您的项目中,否则Brunch 不知道您要如何处理.css
文件。
我已尝试关注所有这些其他主题,但由于某种原因无法使其正常工作:
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
我已经设置了我的配置文件:
早午餐-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 <test@test.com>"
],
"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"
}
将css-brunch 插件添加到您的项目中,否则Brunch 不知道您要如何处理.css
文件。