Commit Graph

57 Commits

Author SHA1 Message Date
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
Michel Descoteaux
14d9f47fe0 Remove default proxy 2021-06-28 21:33:10 -04:00
Quentin Hocdé
e687e52cd2 Update build/styles.js
Co-authored-by: Chauncey McAskill <chauncey@locomotive.ca>
2021-03-05 09:27:47 -05:00
Quentin Hocdé
3cf62e80f7 Update build/styles.js
Co-authored-by: Chauncey McAskill <chauncey@locomotive.ca>
2021-03-05 09:27:37 -05:00
Quentin Hocdé
a6efa6bcb1 Update build/styles.js
Co-authored-by: Chauncey McAskill <chauncey@locomotive.ca>
2021-03-05 09:27:25 -05:00
Quentin Hocdé
85a2784a11 Update build/styles.js
Co-authored-by: Chauncey McAskill <chauncey@locomotive.ca>
2021-03-05 09:27:17 -05:00
Quentin Hocdé
65a2e64474 Update build/styles.js
Co-authored-by: Chauncey McAskill <chauncey@locomotive.ca>
2021-03-05 09:27:06 -05:00
Quentin Hocdé
2cfe06ea1d Update build/scripts.js
Co-authored-by: Chauncey McAskill <chauncey@locomotive.ca>
2021-03-05 09:26:58 -05:00
Quentin Hocdé
b1d90327a3 Update build/scripts.js
Co-authored-by: Chauncey McAskill <chauncey@locomotive.ca>
2021-03-05 09:26:50 -05:00
Quentin Hocdé
41b8030d9e Update build/scripts.js
Co-authored-by: Chauncey McAskill <chauncey@locomotive.ca>
2021-03-05 09:26:42 -05:00
Quentin Hocdé
d2d294e145 Update build/notification.js
Co-authored-by: Chauncey McAskill <chauncey@locomotive.ca>
2021-03-05 09:26:34 -05:00
Quentin Hocdé
f39a5f0a75 Update build/concat.js
Co-authored-by: Chauncey McAskill <chauncey@locomotive.ca>
2021-03-05 09:26:25 -05:00
Quentin Hocdé
6a6f2cfa21 Update build/concat.js
Co-authored-by: Chauncey McAskill <chauncey@locomotive.ca>
2021-03-05 09:26:18 -05:00
Quentin Hocdé
0e8134629a Update build/concat.js
Co-authored-by: Chauncey McAskill <chauncey@locomotive.ca>
2021-03-05 09:26:10 -05:00
Quentin Hocdé
5ab2d41525 Update build/utils/message.js
Co-authored-by: Chauncey McAskill <chauncey@locomotive.ca>
2021-03-05 09:25:55 -05:00
Quentin Hocdé
2d095ef973 Update build/svgs.js
Co-authored-by: Chauncey McAskill <chauncey@locomotive.ca>
2021-03-05 09:25:50 -05:00
Quentin Hocdé
bddbaaed1c Update build/utils/message.js
Co-authored-by: Chauncey McAskill <chauncey@locomotive.ca>
2021-03-05 09:24:18 -05:00
Quentin Hocdé
5f20fe0e43 Update build/svgs.js
Co-authored-by: Chauncey McAskill <chauncey@locomotive.ca>
2021-03-05 09:24:04 -05:00
Quentin Hocdé
718feed2c7 Update build/concat.js
Co-authored-by: Chauncey McAskill <chauncey@locomotive.ca>
2021-03-05 09:23:55 -05:00
Quentin Hocdé
5bd1ca268f Update notification 2021-01-18 14:31:41 -05:00
Quentin Hocdé
f67d4c0c41 Add error notification for styles 2020-12-11 16:00:36 -05:00
Quentin Hocdé
f15ec08784 Update notification + add built time + add nvmrc 2020-12-11 10:41:07 -05:00
Quentin Hocdé
8e5c4e5c83 Update comments 2020-11-27 16:15:36 -05:00
Quentin Hocdé
2e7bb3b482 Update tasks - remove gulp (replaced by node scripts, working with mconfig) + esbuild (no more es5 support) + add critical css in config file 2020-11-27 16:01:54 -05:00
Deven Caron
80e1614508 Remove browser-sync new window & ghostMode 2020-10-26 15:28:31 -04:00
Antoine Boulanger
9836c462b2 Update locomotive-scroll to v3: update scroll.js, add scrollbar css, remove copy task 2019-07-19 15:57:34 -04:00
Antoine Boulanger
d8d79180fe Open project url instead of localhost when running gulp 2018-10-18 11:23:27 -04:00
Deven Caron
c7c22d8e8e added locomotive-scroll as dependencies, gulp-copy task WIP 2018-10-16 17:20:21 -04:00
Antoine Boulanger
f577e7aa92 Change grunt for gulp 2018-09-05 14:21:37 -04:00
Quentin Hocdé
75817d77f4 (WIP) : rewrite TransitionManager, init pjax, manage no-transition class, manage wrapper&container like barba, defaultTransition (interface?), add @todo. 2018-02-01 09:58:18 -05:00
Quentin Hocdé
43f887cb3a update babel-preset to -env 2018-01-08 11:11:36 -05:00
Dominic Lord
3483e1530b Barba as a service 2017-03-02 09:43:20 -05:00
Antoine Boulanger
0c748984aa Same 2016-11-10 11:38:11 -05:00
Antoine Boulanger
1be5a4c99d Fix watch svg for sprite 2016-11-10 11:31:01 -05:00