Update README after Gulp removal.

This commit is contained in:
Fredrik Jonsson 2021-06-21 20:43:31 +02:00
commit d4deb91f58

View file

@ -32,7 +32,7 @@ Sass is processed with Hugo pipes. To make using npm optional I have added the s
* [Shortcodes](#shortcodes) * [Shortcodes](#shortcodes)
* [Content security policy headers](#Content-security-policy-headers) * [Content security policy headers](#Content-security-policy-headers)
* [Choose between using jQuery or Umbrella JS](#choose-between-using-jquery-or-umbrella-js) * [Choose between using jQuery or Umbrella JS](#choose-between-using-jquery-or-umbrella-js)
* [Use Gulp to lint Sass and JavaScript](#use-gulp-to-lint-sass-and-javascript) * [Use npm to lint Sass and JavaScript](#use-npm-to-lint-sass-and-javascript)
* [Getting help](#getting-help) * [Getting help](#getting-help)
* [Credits](#credits) * [Credits](#credits)
@ -41,16 +41,14 @@ Sass is processed with Hugo pipes. To make using npm optional I have added the s
* A mobile menu * A mobile menu
* Analytics with Matamo (Piwik) * Analytics with Matamo (Piwik)
* Automatic linting of css and js
* Cookie consent * Cookie consent
* Commands for linting of css and js
* Contact form (PHP) * Contact form (PHP)
* CSS grid and flex for layout * CSS grid and flex for layout
* Gulp.js (only for sass/js lint)
* HTML5 * HTML5
* Hugo Pipes for js and sass * Hugo Pipes for js and sass
* jQuery 3 * jQuery 3
* Micro.blog * Micro.blog
* Minify css
* Meta tags and JSON-LD * Meta tags and JSON-LD
* Multilingual (i18n) * Multilingual (i18n)
* Normalize CSS * Normalize CSS
@ -586,41 +584,25 @@ This is the way I construct my JavaScript files.
``` ```
## Use Gulp to lint Sass and JavaScript ## Use npm to lint Sass and JavaScript
* Lint your Sass using sass-lint. * Lint your Sass using stylelint.
* Lint your JavaScript using eslint. * Lint your JavaScript using eslint.
* Will lint files in the theme as well as the root assets directory. * Can lint files in the theme as well as the project assets directory.
* Watch all of your files as you develop and re-build everything on the fly.
Set up your front-end development build tools: Set up your front-end development build tools:
1. Install Node.js and npm, the Node.js package manager. 1. Install Node.js and npm, the Node.js package manager.
Detailed instructions are available on the "npm quick start guide":
https://github.com/kss-node/kss-node/wiki/npm-quick-start-guide
2. The package.json file in your new sub-theme contains the versions of all the 2. The package.json file in your new sub-theme contains the versions of all the
Node.js software you need. To install them run: Node.js software you need. To install them run:
npm install npm install
3. Install the gulp-cli tool globally. Normally, installing a Node.js globally 3. Run the following commands to lint your theme and projects Sass and JavaScript code.
is not recommended, which is why both Gulp and Grunt have created wrapper
commands that will allow you to run "gulp" or "grunt" from anywhere, while
using the local version of gulp or grunt that is installed in your project.
To install gulp's global wrapper, run:
npm install -g gulp-cli npm run lint-theme
npm run lint-project
5. The default gulp task will lint your Sass and JavaScript. nmp run list (project + theme)
To run the default gulp task, type:
gulp
To watch all your files as you develop, type:
gulp watch
## Getting help ## Getting help