GulpTasks - Accuraty/AccuTheme-2021 GitHub Wiki
[WIP] Gulp Tasks for AccuTheme
Quick Overview
In brief, this is a task/steps breakdown of AccuTheme's Gulp processes: Start, Build, Favicons, Package, and Clean as defined in package.json and /gulpfileDir.
Notes:
- ordered lists will represent tasks running in series.
- unordered lists will represent tasks running in parallel (we don't control the order)
npm run build
is called automatically afternpm install
is finished runningnpm run build
does not finish in a Watch state likenpm run start
- the
npm run package
command is using Webpack
From package.json as of Jan 2022:
"scripts": {
"build": "cross-env NODE_ENV=production gulp build",
"clean": "gulp clean",
"favicons": "gulp favicons",
"start": "gulp",
"postinstall": "gulp build",
...
},
Gulp Start (default)
This launches the default gulp task, which includes the watcher
- base
- clean (Gulp Clean, see below)
- copy (/tasks/copy.js) - copies ./node_modules/bootstrap-icons/bootstrap-icons.svg to paths.svg.dist
- media (/tasks/media.js)
- fontsTask (/tasks/media.js) - copies paths.fonts.src to paths.fonts.dist
- svgTask (/tasks/media.js) - copies paths.svg.srv to paths.svg.dist
- imagesTask (/tasks/media.js) - copies paths.images.srv, runs through imagemin (gulp-imagemin), saves the results to paths.images.dist
- videosTask (/tasks/media.js) - copies paths.vdieos.srv to paths.videos.dist
- compile
- styles (/tasks/styles.js)
- skinStylesTask (/tasks/styles.js) - sass compile skin styles
- moduleStylesTask (/tasks/styles.js) - sass compile module styles
- containerStylesTask (/tasks/styles.js) - sass compile container styles
- scripts (/tasks/scripts.js) - webpack using config from /webpack.config.js
- styles (/tasks/styles.js)
- watch (/tasks/watch.js)
Gulp Build
- base - same as Gulp Start (above)
- lintStyles (/tasks/lint.js)
- compile - same as Gulp Start (above)
Gulp Clean
clean (/tasks/clean.js) - removes all css and *.map files from paths.skin, paths.container, everything from paths.dist, and real-favicon-generator.json
Gulp Favicons
favicons (/tasks/favicons.js)
- generateFavicons - calls generateFavicon from gulp-real-favicon and stores the results in real-favicon-generator.json
- injectFaviconsMarkup - finds the line in
meta.ascx
that starts withstring Favicons = "
and replace it with the stringified HTML of generateFavicons output as the variable's value