SASS没有在凤凰应用程序中编译

时间:2017-04-24 14:09:43

标签: sass elixir phoenix-framework brunch

我刚刚开始使用Phoenix和Elixir,并且我在scss / css文件的最开始就遇到了障碍。

关于一些博客/文章,到目前为止,我已经完成了以下工作:

将app.css重命名为app.scss

创建了新的目录' _scss'我把scss文件放在哪里。

在app.scss中我正在导入我的scss文件。

@import "../_scss/_foundation.scss";

package.json看起来像:

{
  "repository": {},
  "license": "MIT",
  "scripts": {
    "deploy": "brunch build --production",
    "watch": "brunch watch --stdin"
  },
  "dependencies": {
    "babel-preset-es2015": "^6.24.1",
    "bourbon": "^4.3.4",
    "bourbon-neat": "^2.0.0",
    "foundation-sites": "^6.3.1",
    "phoenix": "file:deps/phoenix",
    "phoenix_html": "file:deps/phoenix_html",
    "purecss": "^0.6.2",
    "sass-brunch": "^2.10.4"
  },
  "devDependencies": {
    "babel-brunch": "~6.0.0",
    "brunch": "2.7.4",
    "clean-css-brunch": "~2.0.0",
    "css-brunch": "~2.0.0",
    "javascript-brunch": "~2.0.0",
    "uglify-js-brunch": "~2.0.1"
  }
}

brunch.config.js我有:

stylesheets: {
  joinTo: "css/app.scss",
  order: {
    after: ["web/static/css/app.scss"] // concat app.css last
  }
},

我更改了上述内容以反映app.scss的名称更改。那是对的吗?

当我加载服务器时,页面加载,但没有任何样式。我的终端似乎在不断编译...

24 Apr 15:01:56 - info: compiling..

我在这里做错了什么?

更新

似乎是个人档案。在他的案例foundation.scss。我刚刚尝试了另一个框架Bulma,它立即起作用。

0 个答案:

没有答案