我在使用webpack而不是Codekit v1.9.3时遇到了麻烦.我开始努力从CodeKit转移到Grunt和Gulp,然后了解webpack哪些听起来非常酷.我似乎无法让它正常工作.
javascript用coffeescript语法写bootstrap-sass根据需要选择性地包括(scss)框架的组件$brand-primarywebpack --watch在更改脚本和样式时自动编译它们凉亭资源:
我目前正在全球范围内存储这些项目:
~/bower_components/twbs-bootstrap-sass/vendor/assets/stylesheets
Run Code Online (Sandbox Code Playgroud)
因为CodeKit支持指南针,我在我的config.rb文件中有这个:
add_import_path "~/bower_components/twbs-bootstrap-sass/vendor/assets/stylesheets"
Run Code Online (Sandbox Code Playgroud)
项目结构
js/fancybox.js
js/main.js <-- currently the compiled js 'output' file
js/main.coffee
css/styles.css <-- currently the compiled css 'output' file
scss/styles.scss
scss/modules/_bootstrap-customizations.scss
scss/modules/_typography.scss
scss/partials/_header.scss
scss/partials/_footer.scss
Run Code Online (Sandbox Code Playgroud)
styles.scss的内容
@import "modules/bootstrap-customizations"; # local customizations
@import "bootstrap/variables";
@import "bootstrap/mixins";
... # load bootstrap files as required
@import "bootstrap/wells";
Run Code Online (Sandbox Code Playgroud)