Automattic / _s

Hi. I'm a starter theme called _s, or underscores, if you like. I'm a theme meant for hacking so don't use me as a Parent Theme. Instead try turning me into the next, most awesome, WordPress theme out there. That's what I'm here for.
http://underscores.me/
GNU General Public License v2.0
10.95k stars 3.12k forks source link

Issue when running lint npm commands #1467

Closed celsomtrindade closed 2 years ago

celsomtrindade commented 3 years ago

After installing a blank new wordpress environment and installing this theme, I tried running the following commands:

npm run lint:js
npm run lint:scss

This was giving me errors like:

Error: No files matching the pattern "'./sass/*/.scss'" were found.

By removing the single quote on the command line, it worked.

// This
"lint:scss": "wp-scripts lint-style './sass/**/*.scss'"` 

// Becomes this
"lint:scss": "wp-scripts lint-style ./sass/**/*.scss"

Also, the package @wordpress/scripts can be updated.

Is it something within my specs or it's correct to remove the quotes?

--

Also, since we are in the package.json file, isn't it better to generate the .zip file within this theme folder instead of returning one folder and putting it on the wp-content/themes folder?

// This
"bundle": "dir-archiver --src . --dest ../_s.zip [...]"

// Becomes this
"bundle": "dir-archiver --src . --dest ./_s.zip [...]"
salsasanna commented 3 years ago

I had the same issue but with npm run compile:css, this fixed it, a big thank you!

Ismail-elkorchi commented 2 years ago

Hi, @celsomtrindade, @salsasanna ! I have just updated the npm packages (https://github.com/Automattic/_s/pull/1516), which seems to resolve the issues reported here.