Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing sass compilation scripts and npm packages! #1306

Closed
hasnatbabur opened this issue Jul 13, 2018 · 6 comments
Closed

Missing sass compilation scripts and npm packages! #1306

hasnatbabur opened this issue Jul 13, 2018 · 6 comments

Comments

@hasnatbabur
Copy link

Missing sass compilation scripts and npm packages!

@Luc45
Copy link
Member

Luc45 commented Jul 23, 2018

I came here for this as well. First of all, thanks for all the effort everyone has put in this amazing theme. It's hard to find a non-opinionated theme to start things on.

But indeed, it would be nice to have files we need to compile SASS if we choose the _sassify version.

-- Edit --

Found a way that a user called @m-e-h has posted here.

  1. Create a file called "package.json" on the root folder of your theme.
  2. Paste this in it:
{
	"name": "_s",
	"version": "1.0.0",
	"scripts": {
		"scss": "node-sass --include-path scss sass/style.scss style.css --output-style=expanded --indent-type=tab --indent-width=1",
		"autoprefixer": "postcss style.css -u autoprefixer -o style.css --no-map",
		"stylelint": "stylelint 'style.css'",
		"stylefix": "stylelint 'style.css' --fix"
	},
	"devDependencies": {
		"autoprefixer": "^7.1.1",
		"browserslist": "^2.1.5",
		"node-sass": "^4.5.3",
		"postcss-cli": "^4.1.0",
		"stylelint": "^7.12.0",
		"stylelint-config-wordpress": "^11.0.0"
	},
	"stylelint": {
		"defaultSeverity": "warning",
		"extends": "stylelint-config-wordpress"
	},
	"browserslist": [
		"> 1%",
		"last 2 versions"
	]
}
  1. Save it
  2. Run npm install
  3. Run npm scss

That's it.

@cinghaman
Copy link

cinghaman commented Aug 6, 2019

Thanks, @Luc45 i ran the npm install but when I run npm scss i get error npm --key value
Config info can be viewed via: npm help config

@hasnatbabur
Copy link
Author

@cinghaman
Hi, I fall into similar error many times before and a possible solution for you may be running 'npm rebuild node-sass' script after installing packages.

Please have a look here also:
https://stackoverflow.com/questions/46515077/unable-to-install-node-sass-in-my-project?rq=1

Thanks.

@cinghaman
Copy link

Thanks @hasnatbabur I created my own package.json and grunt file all good

@Ismail-elkorchi
Copy link
Contributor

@hasnatbabur Thank you for reaching out!

I'm going to close this issue since it is a duplicate of #1149. You may want to subscribe there for updates.

@GoyalAnuj973
Copy link

Still not able to resolve the issue!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants