Add a SASS watcher command (#1427)
* Add a SASS watcher command * Simplify the compile:css command
This commit is contained in:
parent
301248d5e7
commit
27fc314b55
4 changed files with 5 additions and 1 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -2,3 +2,4 @@
|
||||||
/vendor
|
/vendor
|
||||||
package-lock.json
|
package-lock.json
|
||||||
composer.lock
|
composer.lock
|
||||||
|
style.css.map
|
|
@ -60,6 +60,7 @@ $ npm install
|
||||||
- `composer make-pot` : generates a .pot file in the `language/` directory.
|
- `composer make-pot` : generates a .pot file in the `language/` directory.
|
||||||
- `npm run compile:css` : compiles SASS files to css.
|
- `npm run compile:css` : compiles SASS files to css.
|
||||||
- `npm run compile:rtl` : generates an RTL stylesheet.
|
- `npm run compile:rtl` : generates an RTL stylesheet.
|
||||||
|
- `npm run watch` : watches all SASS files and recompiles them to css when they change.
|
||||||
- `npm run lint:scss` : checks all SASS files against [CSS Coding Standards](https://developer.wordpress.org/coding-standards/wordpress-coding-standards/css/).
|
- `npm run lint:scss` : checks all SASS files against [CSS Coding Standards](https://developer.wordpress.org/coding-standards/wordpress-coding-standards/css/).
|
||||||
- `npm run lint:js` : checks all JavaScript files against [JavaScript Coding Standards](https://developer.wordpress.org/coding-standards/wordpress-coding-standards/javascript/).
|
- `npm run lint:js` : checks all JavaScript files against [JavaScript Coding Standards](https://developer.wordpress.org/coding-standards/wordpress-coding-standards/javascript/).
|
||||||
- `npm run bundle` : generates a .zip archive for distribution, excluding development and system files.
|
- `npm run bundle` : generates a .zip archive for distribution, excluding development and system files.
|
||||||
|
|
|
@ -24,6 +24,7 @@ const excludes = [
|
||||||
'.travis.yml',
|
'.travis.yml',
|
||||||
'phpcs.xml.dist',
|
'phpcs.xml.dist',
|
||||||
'sass',
|
'sass',
|
||||||
|
'style.css.map',
|
||||||
];
|
];
|
||||||
|
|
||||||
// The path of the zip file.
|
// The path of the zip file.
|
||||||
|
|
|
@ -36,7 +36,8 @@
|
||||||
"map": false
|
"map": false
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"compile:css": "node-sass sass/style.scss style.css && node-sass sass/woocommerce.scss woocommerce.css && stylelint '*.css' --fix || true && stylelint '*.css' --fix",
|
"watch": "node-sass sass/ -o ./ --source-map true --output-style expanded --indent-type tab --indent-width 1 -w",
|
||||||
|
"compile:css": "node-sass sass/ -o ./ && stylelint '*.css' --fix || true && stylelint '*.css' --fix",
|
||||||
"compile:rtl": "rtlcss style.css style-rtl.css",
|
"compile:rtl": "rtlcss style.css style-rtl.css",
|
||||||
"lint:scss": "wp-scripts lint-style 'sass/**/*.scss'",
|
"lint:scss": "wp-scripts lint-style 'sass/**/*.scss'",
|
||||||
"lint:js": "wp-scripts lint-js 'js/*.js'",
|
"lint:js": "wp-scripts lint-js 'js/*.js'",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue