This repository has been archived by the owner on Feb 13, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
GulpTasks
Jeremy Farrance edited this page Jan 10, 2022
·
1 revision
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 running -
npm 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",
...
},
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)
- base - same as Gulp Start (above)
- lintStyles (/tasks/lint.js)
- compile - same as Gulp Start (above)
clean (/tasks/clean.js) - removes all css and *.map files from paths.skin, paths.container, everything from paths.dist, and real-favicon-generator.json
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