【发布时间】:2017-01-28 23:55:35
【问题描述】:
我正在关注这篇博文,但字体没有被复制。
http://cloudless.studio/articles/4-installing-font-awesome-from-npm-in-phoenix
说明
问题的本质是什么? 不包括字体文件夹
预期行为
我希望包含字体文件夹
环境
- 早午餐:2.8.2
- 节点:v6.3.1
- NPM:3.10.3
- 操作系统:OS X 10.11.6
package.json内容
{
"repository": {},
"license": "MIT",
"scripts": {
"deploy": "brunch build --production",
"watch": "brunch watch --stdin"
},
"dependencies": {
"font-awesome": "^4.6.3",
"google-maps": "^3.2.1",
"phoenix": "file:deps/phoenix",
"phoenix_html": "file:deps/phoenix_html",
"sass-brunch": "^2.6.3"
},
"devDependencies": {
"babel-brunch": "~6.0.0",
"brunch": "~2.8.0",
"clean-css-brunch": "~2.0.0",
"css-brunch": "~2.0.0",
"javascript-brunch": "~2.0.0",
"uglify-js-brunch": "~2.0.1"
}
}
早午餐配置内容
exports.config = {
// See http://brunch.io/#documentation for docs.
files: {
javascripts: {
joinTo: "js/app.js"
// To use a separate vendor.js bundle, specify two files path
// http://brunch.io/docs/config#-files-
// joinTo: {
// "js/app.js": /^(web\/static\/js)/,
// "js/vendor.js": /^(web\/static\/vendor)|(deps)/
// }
//
// To change the order of concatenation of files, explicitly mention here
// order: {
// before: [
// "web/static/vendor/js/jquery-2.1.1.js",
// "web/static/vendor/js/bootstrap.min.js"
// ]
// }
},
stylesheets: {
joinTo: "css/app.css",
order: {
after: ["web/static/css/app.css"] // concat app.css last
}
},
templates: {
joinTo: "js/app.js"
}
},
conventions: {
// This option sets where we should place non-css and non-js assets in.
// By default, we set this to "/web/static/assets". Files in this directory
// will be copied to `paths.public`, which is "priv/static" by default.
assets: [
/^(web\/static\/assets)/,
/^(node_modules\/font-awesome)/
]
},
// Phoenix paths configuration
paths: {
// Dependencies and current project directories to watch
watched: [
"web/static",
"test/static",
'node_modules/font-awesome/fonts',
],
// Where to compile files to
public: "priv/static"
},
// Configure your plugins
plugins: {
babel: {
// Do not use ES6 compiler in vendor code
ignore: [/web\/static\/vendor/]
}
},
modules: {
autoRequire: {
"js/app.js": ["web/static/js/app"]
}
},
npm: {
enabled: true
}
};
【问题讨论】:
标签: elixir phoenix-framework brunch