简体   繁体   中英

How to install Susy 2 using npm for use with gulp

According to the Susy 2.1.2 documentation , installing Susy is as simple as running npm install susy --save-dev then altering your Gulpfile in accordance with the afore-mentioned doc. You might suspect this would install 2.1.2.

However, this operation installs Susy 3. Susy 3 introduced breaking changes compared to Susy 2, which is preventing my client's SASS code from compiling. There is no documentation for how to install Susy 2 in the Susy 3 docs.

How can I install Susy 2 using npm for use with Gulp?

to force susy to stay in 2.x you can run

npm install --save susy@2.x

this will install the latest version of 2.x but not 3.x+

The answer was quite obvious in hindsight. In package.json, change "susy": "^3.1.6" to "Susy": "2.2.14" . Remove the susy directory in node_modules, then run npm install again.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM