Introducing WPSass: Use Sass with WordPress via Node NPM Scripts


WPSass is a simple way to use Sass with WordPress via Node NPM Scripts in SCSS flavor. So, I am working on a WP REST API product launch, for which I had to build several simple HTML pages inside WordPress. All I had to do was compile Sass to CSS. Where I found WPGulp to be an overkill.
So, I went ahead and wrote a very simple package for just one thing. Sass to CSS conversion in WordPress development. It doesn’t even use Gulp. Use Sass with WordPress via Node NPM Scripts in SCSS flavor.
Use Sass with WordPress, Node Script in SCSS flavor.
Make sure you have node installed. If not download and install node.
→ STEP #1: Install NodeJS & NPM
After installing NodeJS you can verify the install of both NodeJS and Node Package Manager by typing the following commands. This step needs to be followed only once i.e. if you don’t have NodeJS installed. No need to repeat it ever again.
node -v
# v7.10.0

npm -v
# 4.2.0
→ Step #2. Download package.json
Download package.json file inside the root folder of your WordPress plugin or WordPress theme
If you have cURL installed then you can run the following command to download it in one go (just make sure you open the root folder
Source: https://managewp.org/articles/15229/introducing-wpsass-use-sass-with-wordpress-via-node-npm-scripts


Source: https://williechiu40.wordpress.com/2017/05/29/introducing-wpsass-use-sass-with-wordpress-via-node-npm-scripts/

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s