Commit Graph

455 Commits

Author SHA1 Message Date
Chauncey McAskill
7df0481d05 Change writeFile promises in styles.js
Await results of `writeFile()` calls for easier readability of operations.
2021-10-12 12:52:36 -04:00
Chauncey McAskill
e53efd6ebc Update NPM dependencies
Updated:
- autoprefixer v10.3.6 → v10.3.7
- esbuild v0.13.3 → v0.13.4
- postcss v8.3.8 → v8.3.9

Added:
- npm v6.0
2021-10-12 12:52:35 -04:00
Chauncey McAskill
14ec69f26d Update NPM dependencies
Updated:
- autoprefixer v10.3.5 → v10.3.6
- esbuild v0.13.0 → v0.13.3
- postcss v8.3.7 → v8.3.8
2021-10-01 14:12:37 -04:00
Chauncey McAskill
fa8aa98595 Add missing constraints to NPM dependencies
Updated:
- locomotive-scroll v4.1.2
- normalize.css v8.0.1
- svg4everybody v2.1.9
2021-10-01 14:04:27 -04:00
Chauncey McAskill
b24b4e10c4 Update NPM manifest 2021-10-01 14:03:41 -04:00
Chauncey McAskill
21f6acf4a6 Update NPM dependencies
Updated:
- autoprefixer v10.3.4 → v10.3.5
- esbuild v0.12.28 → v0.13.0
- postcss v8.3.6 → v8.3.7
2021-09-22 13:26:28 -04:00
Chauncey McAskill
bbbb49f30b Merge pull request #95 from locomotivemtl/mcaskill-refactor-build
Refactor build tasks and config file
2021-09-21 17:58:47 -04:00
Chauncey McAskill
99e1b3fa93 Change tasks to be the default exports 2021-09-21 17:53:46 -04:00
Chauncey McAskill
548b2c604b Fix messages in styles.js
Fixed:
- Expected file extension from `outfile` for variable `name`.
- Expected structure of `err` in main catch (`err.formatted` is only available when thrown by node-sass).
- Context of error messages when writing final CSS and source map to disk.
2021-09-21 17:53:46 -04:00
Chauncey McAskill
ec9228a337 Refactor glob.js
Added function `importGlob()` to enclose operations and improve error handling.
2021-09-21 17:52:32 -04:00
Chauncey McAskill
8dec2c69fe Improve syntax of glob.js
Changed:
- Renamed variables for clarity.

Fixed:
- Block comment for `createArrayableGlob()`.
2021-09-21 17:52:17 -04:00
Chauncey McAskill
3a65683fd8 Compile assets 2021-09-21 17:52:17 -04:00
Chauncey McAskill
1a2cc7b6ac Fix bad paths in watch.js
Amends d4ded2a64e

Fixed:
- Invalid paths to watch.

Changed:
- Replaced risky string concatenation with Node.js' `path.join()` function.
2021-09-20 17:29:41 -04:00
Chauncey McAskill
e7935211cd Replace non-breaking space in JS imports 2021-09-20 10:54:56 -04:00
Chauncey McAskill
7e8a21f698 Update README and Boilerplate occurrences
Changed "Configuration" section to instruct developers on what occurrences to rename throughout the package.
2021-09-18 01:16:44 -04:00
Chauncey McAskill
7e30939b14 Update Node constraint in README
Amends 1203e54277
2021-09-18 01:16:44 -04:00
Chauncey McAskill
655031cd1b Clean-up README 2021-09-18 01:16:44 -04:00
Chauncey McAskill
d4ded2a64e Refactor build tasks and config file
Changed:
- Renamed 'mconfig.json' to 'loconfig.json'.
- Renamed 'concat.js' to 'concats.js' to represent flexible functionality.
- loconfig.json: Base paths are nested under "paths".
- loconfig.json: Paths for tasks are nested under "tasks".
- Refactored each task to process corresponding entries under "tasks" in 'loconfig.json'.
- watch.js: Changed concats watch to use task's includes.

Added:
- tiny-glob v0.2.9
- Utility 'glob.js' to use dynamic imports to fetch an available glob function from node modules.
- Utility 'template.js' to provide a function to render template tags (`{% ... %}`) in tasks.
- concats.js: Support for concatenating groupes of files.
- scripts.js: Support for ESBuild's "outdir" option.
2021-09-18 01:16:44 -04:00
Chauncey McAskill
589ec99135 Move tasks to a dedicated directory
Moved concat.js, scripts.js, styles.js, svgs.js to 'build/tasks/' directory.
2021-09-18 01:16:44 -04:00
Chauncey McAskill
84286fef66 Improve notification.js
Added:
- Block comment
- Support for additional node-notifier properties.
2021-09-18 01:16:44 -04:00
Chauncey McAskill
6e50bc202d Refactor styles.js
Changed:
- Replaced "fs" callback API with "fs/promises" promise API to centralize catching of errors and easier readability of file.
- Prefixed "fs/promises" with 'node:' URI scheme to target Node.js builtin modules.
- Promisified `sass.render`.
2021-09-18 01:16:44 -04:00
Chauncey McAskill
91109c5221 Refactor concat.js
Changed:
- Replaced "fs" callback API with "fs/promises" promise API to centralize catching of errors and easier readability of file.
- Prefixed "fs/promises" with 'node:' URI scheme to target Node.js builtin modules.
2021-09-18 01:16:44 -04:00
Chauncey McAskill
834c6165b0 Refactor postcss.js
Decoupled import routine from final export to provide a shared instance of the PostCSS processor and for easier readability of file.
2021-09-18 01:16:44 -04:00
Chauncey McAskill
ffece71aac Improve message.js
Added:
- Types "notice" and "warning".
- Support for all but the "waiting" message type to stop a timer.

Changed:
- Improved colors of message types.
- Improved handling of PostCSS errors in styles.js.
2021-09-18 01:16:44 -04:00
Chauncey McAskill
454ae64d07 Make postcss optional in styles.js
Added:
- Utility 'postcss.js' to use dynamic imports to fetch PostCSS and Autoprefixer, if available, and build the Processor object.
- Function `saveStylesheet()` in 'styles.js' to decouple the writing of CSS files and source maps.
- Condition to process with PostCSS if it's available.
2021-09-18 01:16:44 -04:00
Chauncey McAskill
7479444572 Change tasks to async functions 2021-09-18 01:16:44 -04:00
Chauncey McAskill
b46fb31dfe Fix logic for PostCSS processing
Amends 3874d9c451674a9b4f76239a17b4cbf50cbdb9d3

The `fs.access()` condition is unnecessary and won't work if a CSS stylesheet does not exist.
2021-09-18 01:16:44 -04:00
Chauncey McAskill
23e55d6340 Move notification.js to utils directory 2021-09-18 01:16:44 -04:00
Chauncey McAskill
70827b0a7d Add semi-colon to exported functions 2021-09-18 01:16:44 -04:00
Chauncey McAskill
8cff91aa68 Fix syntax typo in concat.js
Amends a55e6e523db4b4c932d214d3e204fa29d9c0e58f
2021-09-18 01:16:44 -04:00
Chauncey McAskill
b24014d8b1 Add autoprefixer and postcss
Added:
- autoprefixer v10.3.4
- postcss v8.3.6

Changed:
- Node Sass options to pass source map to PostCSS.
2021-09-18 01:16:44 -04:00
Chauncey McAskill
e9e0e5784e Refactor build tasks
Decouple static "main" keys in mconfig.json and refactor tasks to support many output files.

Added:
- scripts.js: Array of output files (such as 'app.js') to iterate over to bundle JS files.
- styles.js: Array of input files (such as 'main.css' and 'critical.css') to iterate over to compile Sass files.
- svgs.js: Array of output files (such as 'sprite.svg') to iterate over to compile SVG spritesheets.

Changed:
- mconfig.json: Decouple entry points to individual tasks to allow for more flexibility in projects.
- concat.js: Refactor function to use promises to build list of JS files to concatenate.
- message.js: Replace if statements with switch for improved readability.
- message.js: If timerID provided with "waiting" type, log time.
- watch.js: Change CSS and JS reload watch paths to include all files.
- Sorted imports by path.
2021-09-18 01:16:44 -04:00
Chauncey McAskill
8b4d758443 Fix comments and variable in watch.js
Amends 14d9f47fe0

Fixed:
- Location of comments.
- Variable `serverConfig` to `const`.
2021-09-16 14:01:21 -04:00
Chauncey McAskill
e51c717a3c Renamed BrowserSync variable "bs" to "server" 2021-09-16 13:55:29 -04:00
Chauncey McAskill
0267bc6ebd Revert "proxy" back to "url" for BrowserSync
Amends 14d9f47fe0
2021-09-16 13:54:49 -04:00
Chauncey McAskill
4a5d821965 Merge pull request #90 from MouseEatsCat/master
Remove default proxy
2021-09-16 13:48:38 -04:00
Chauncey McAskill
5cc8a75866 Update NPM dependencies
Added:
- esbuild v0.8.16 → v0.12.28
- kleur v4.1.3 → v4.1.4
- locomotive-scroll v4.0.4 → v4.1.2
- node-notifier v8.0.1 → v10.0.0
- node-sass v5.0.0 → v6.0.1

Removed:
- fs
2021-09-14 18:27:03 -04:00
Chauncey McAskill
1203e54277 Constrain Node to v14.17 2021-09-14 18:20:45 -04:00
Michel Descoteaux
14d9f47fe0 Remove default proxy 2021-06-28 21:33:10 -04:00
Jérémy Minié
72eaf582a5 Tweak spacing classes to use rem straight away 2021-05-06 17:04:43 -04:00
Jérémy Minié
e4d1c0058a Nuke templates unused style folder 💥 2021-05-06 17:04:27 -04:00
Jérémy Minié
bcb7525019 Tweak o-layout gutters to match $unit & $unit-small 2021-05-06 17:03:55 -04:00
Jérémy Minié
03b3d211c8 Add a catalog of easing variables 2021-05-06 17:03:45 -04:00
Chauncey McAskill
0d42f65ff6 Skip init function if stylesheet not found
Instead of throwing an error about a member not being defined or accessed on NULL.
2021-04-09 15:23:45 -04:00
Chauncey McAskill
b62385c4e0 Change Sass $assets-path value for critical.css 2021-03-23 12:29:09 -04:00
Quentin Hocdé
53653b2111 Merge pull request #82 from locomotivemtl/dependabot/npm_and_yarn/ini-1.3.8
Bump ini from 1.3.5 to 1.3.8
2021-03-05 09:57:25 -05:00
Quentin Hocdé
26821492a7 Merge pull request #81 from locomotivemtl/dependabot/npm_and_yarn/urijs-1.19.6
Bump urijs from 1.19.2 to 1.19.6
2021-03-05 09:57:15 -05:00
Quentin Hocdé
5d1c5a17f5 Merge pull request #80 from locomotivemtl/dependabot/npm_and_yarn/node-notifier-8.0.1
Bump node-notifier from 8.0.0 to 8.0.1
2021-03-05 09:57:04 -05:00
dependabot[bot]
0071b9d790 Bump ini from 1.3.5 to 1.3.8
Bumps [ini](https://github.com/isaacs/ini) from 1.3.5 to 1.3.8.
- [Release notes](https://github.com/isaacs/ini/releases)
- [Commits](https://github.com/isaacs/ini/compare/v1.3.5...v1.3.8)

Signed-off-by: dependabot[bot] <support@github.com>
2021-03-05 14:45:35 +00:00
dependabot[bot]
ebda397455 Bump urijs from 1.19.2 to 1.19.6
Bumps [urijs](https://github.com/medialize/URI.js) from 1.19.2 to 1.19.6.
- [Release notes](https://github.com/medialize/URI.js/releases)
- [Changelog](https://github.com/medialize/URI.js/blob/gh-pages/CHANGELOG.md)
- [Commits](https://github.com/medialize/URI.js/compare/v1.19.2...v1.19.6)

Signed-off-by: dependabot[bot] <support@github.com>
2021-03-05 14:45:29 +00:00