1. First set up the environment, download node.js, rubyinstaller, and install it. When installing rubyinstaller, select include system path, which will automatically add node.js execution to the windows system environment variables. , avoid the trouble of manual creation. Just click Next to install node.js
2. Win R cmd and then run gem install bootstrap-sass
3. Create a project cd and enter it In the project storage directory, run compass creat XXXXX (project name) in the command line window to create a project and generate the directory as shown below
4. Right-click to open config.rb in require 'compass/import-once/activate' Add a line below require 'bootstrap-sass'
5. Open { @import "compass/reset"; } in the sass directory or delete this comment, and then Add a line @import "bootstrap";
6. In the command window just now, compass compile. In this way, you can operate the .scss you want to operate in the sass directory, and then compass compile, of course. , if you don’t want to always enter compass compile, you can enter compass watch -p in the command window to monitor. In this case, the .scss or .sass file you changed will be automatically compiled and output to the corresponding .css file in stylesheets.
Okay, it’s done. Suitable for gardeners who know something about sass, compass, and bootstrap.