【发布时间】:2016-04-14 12:42:13
【问题描述】:
我终于找到了为什么我的 Rails 开发环境如此缓慢的答案。每次我刷新我的开发视图时,它都与 SASS @imports 样式表的方式有关,即使对样式表的更改可能很小。由于内存限制,我的 Cloud9 云开发环境也无法跟上所有不断的编译,每天必须重新启动几次。
查看这篇文章,看看是什么问题
http://blog.teamtreehouse.com/tale-front-end-sanity-beware-sass-import
所以我决定放弃 SASS @imports 转而使用 Sprockets =requires,但我不知道如何将我的 scss 文件迁移到常规的 css sprockets 文件中。
我有很多样式表,因为我购买了一个主题。我在资产和供应商/资产方面都有资源。任何帮助表示赞赏。
我的application.scss如下
// The organization of this CSS is heavily inspired by GitHub's CSS
// stylesheet guidelines.
//
// See: https://github.com/styleguide/css
//
// See Bootstrap's CSS at:
// https://github.com/twbs/bootstrap-sass/tree/master/assets/stylesheets/bootstrap
// or
// $ bundle show bootstrap-sass
//
// These both need to be imported before bootstrap:
@import 'globals/fonts';
@import 'globals/variables';
// --------------Bootstrap-----------------------------
@import 'bootstrap-sprockets';
@import 'bootstrap';
// --------------Font Awesome-----------------------------
@import 'font-awesome';
// --------------Social Share Buttons-----------------
@import "social-share-button";
// --------------Sweet Alert-----------------
@import 'sweetalert';
// --------------Global definitions--------------------
// For example (add your own!!):
@import 'globals/mixins';
// --------------Shared styles-------------------------
// Common base CSS modifications. For example:
@import 'shared/buttons';
@import 'shared/grid';
// --------------Components----------------------------
// Create your own and modify/extend Bootstrap's. For example:
@import 'components/panel';
// --------------Sections------------------------------
// Page-specific styles. These should *only* be used as a last
// resort if you really truly can't style your content more generally.
@import 'sections/profile_page';
// --------------Jango Base Theme------------------------------
@import 'components';
@import 'plugins';
@import 'default';
// --------------Jango Plugins------------------------------
@import 'animate/animate';
@import 'bootstrap-social/bootstrap-social';
@import 'cubeportfolio/css/cubeportfolio';
@import 'owl-carousel/owl.carousel';
@import 'owl-carousel/owl.theme';
@import 'owl-carousel/owl.transitions';
@import 'revo-slider/css/settings-ie8';
@import 'revo-slider/css/settings';
@import 'simple-line-icons/simple-line-icons';
@import 'slider-for-bootstrap/css/slider';
@import 'socicon/socicon';
@import 'fancybox';
// --------------Deseo Cumplido Custom CSS-------------------------
@import 'deseo_custom';
// --------------Datepicker Bootstrap 3------------------
@import 'bootstrap-datepicker';
@import 'bootstrap-datepicker3';
// --------------Bootstrap Slider------------------
@import 'bootstrap-slider';
【问题讨论】:
标签: ruby-on-rails-4 sass cloud9-ide sprockets