【问题标题】:October CMS sass folder十月 CMS sass 文件夹
【发布时间】:2017-11-23 12:50:41
【问题描述】:

我是 10 月 cms 的新手,刚刚在本地系统上安装了一个项目,但我卡在 sass 文件夹上,如何在当前项目中获取 sass 文件夹。

【问题讨论】:

  • 你已经尝试过什么?你能提供更多细节吗?不是专门针对 octobercms,但您只需将 sass 编译成 css,然后将主题连接到该 css 文件。
  • 我已经安装了 October cms 然后创建了一个自定义主题,还创建了 gulpfile.js,安装 laravel elixir。现在我想知道如何在当前项目中获取 sass 文件夹并获取其中包含 CSS 和 js 的编译文件夹。我是 10 月 cms 的新手,所以也许我无法正确解释。

标签: sass octobercms


【解决方案1】:

我遇到了同样的问题,用这种方式解决了:

1.我创建了这个结构:

app/sass 
app/scripts

2.放入我的主题文件夹:

themes/myCustomTheme/app/sass 
themes/myCustomTheme/app/scripts

3.将 gulpfile.js 放入 myCustomTheme 文件夹:

themes/myCustomTheme/app
themes/myCustomTheme/gulpfile.js
themes/myCustomTheme/package.json

4. 像这样配置 gulpfile.js:

源文件夹是app文件夹。

Dist 文件夹是 assets 文件夹。

5.最后在 myCustomTheme 文件夹中安装 Gulp。

【讨论】:

  • 谢谢!!期待你的答复。我不明白如何获取 gulpfile.js,我已使用“npm install gulp”命令安装它,但没有在主题/mycustomtheme/gulpfile.js 中获取 gulpfile.js。
  • 你需要自己创建这个文件 :) 这是我的:gulpfile.js。只需下载并保存为 gulpfile.js
  • 好的,谢谢。我必须自己创建编译文件夹还是通过命令创建编译文件夹?
  • 编译文件夹是默认创建的“assets”文件夹。看看我的文件夹结构structure
猜你喜欢
  • 2016-09-11
  • 1970-01-01
  • 1970-01-01
  • 2017-07-18
  • 2017-09-27
  • 1970-01-01
  • 2018-04-22
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多