1
0
mirror of https://github.com/locomotivemtl/locomotive-boilerplate.git synced 2026-01-15 00:55:08 +08:00
Commit Graph

690 Commits

Author SHA1 Message Date
Chauncey McAskill
89bb00790f Update postcss.js documentation 2023-03-03 13:04:22 -05:00
Chauncey McAskill
9db0c71a82 Move helpers/utils exports to end of file
Improves readability by always expecting exports at the end of the file.
2023-03-03 13:04:22 -05:00
Chauncey McAskill
7742bbb9d0 Add block comments to task iteratees 2023-03-03 13:04:22 -05:00
Chauncey McAskill
c9a9209b4b Refactor build utilities
Separated generic functions from build helpers.

Changed:
- Moved 'utils/*.js' to 'helpers/*.js'
- From 'utils/config.js':
  - Moved function `merge` to 'utils/index.js'.
  - Moved function `isObjectLike` to 'utils/index.js'.
- From 'utils/template.js':
  - Moved function `flatten` to 'utils/index.js'.
  - Moved function `escapeRegExp` to 'utils/index.js'.
- From 'tasks/styles.js':
  - Moved function `createPostCSSProcessor` to 'helpers/postcss.js' as `createProcessor`.
- Replaced function `Object.assign` with `merge` for task options parsing in all tasks.
2023-03-03 13:04:22 -05:00
Chauncey McAskill
9d758f3b2c Improve postcss.js
Added constant `supportsPostCSS` to provide a boolean to check if PostCSS is available.
2023-03-03 13:04:22 -05:00
Chauncey McAskill
0738dd6491 Improve glob.js
Added constant `supportsGlob` to provide a boolean to check if a glob function is available.
2023-03-03 13:04:22 -05:00
Chauncey McAskill
a4656f59ed Improve concats.js, scripts.js, svgs.js
Added:
- Condition to cast `includes` into an array.

Removed:
- Variable `files` in favour of reusing `includes` in 'concats.js'.
2023-03-03 13:04:20 -05:00
Deven Caron
7ff6094e40 Move sass to dev dependencies 2023-03-03 10:49:57 -05:00
Chauncey McAskill
3fee6f4888 Update NPM depdencies
Updated:
- browser-sync v2.27.5 → v2.27.11
- esbuild v0.16.17 → v0.17.6
- engine.io v3.5.0 → v6.4.0
- qs v6.2.3 → v6.11.0

Changed:
- Overrode ua-parser-js constraint in browser-sync from `1.0.2` to `~1.0.33` to fix security notice.
2023-02-09 10:52:26 -05:00
Deven Caron
f774482255 Update README node version 2023-02-09 10:21:39 -05:00
Deven Caron
b7d9311ac6 Remove container width; replace with padding 2023-02-09 10:18:47 -05:00
Deven Caron
c22a006079 Merge pull request #139 from locomotivemtl/feature/update-node-version
Update node version to v17.9 and switch from node-sass to sass
2023-02-09 10:15:42 -05:00
Deven Caron
af57ebd9cb Merge branch 'master' into feature/update-node-version 2023-02-09 10:11:24 -05:00
Deven Caron
c82e9916d0 Merge branch 'master' into feature/update-node-version 2023-02-09 10:05:25 -05:00
Deven Caron
943324220a Downgrade to node v17.9 2023-02-09 10:00:31 -05:00
Deven Caron
477cec7763 Merge pull request #141 from locomotivemtl/feature/optimize-grid
Optimise grid-column loops / Use css vars for grid columns
2023-02-09 09:08:35 -05:00
Deven Caron
5d38685460 Merge branch 'master' into feature/optimize-grid 2023-02-09 09:07:35 -05:00
Deven Caron
9079d735bc Merge pull request #138 from locomotivemtl/feature/css-variables
Feature / CSS Variables
2023-02-09 09:02:59 -05:00
Deven Caron
87238fcdd5 Merge branch 'master' into feature/css-variables 2023-02-09 09:01:24 -05:00
Deven Caron
2f75d8f3d2 Merge pull request #142 from locomotivemtl/dependabot/npm_and_yarn/http-cache-semantics-4.1.1
Bump http-cache-semantics from 4.1.0 to 4.1.1
2023-02-07 09:30:26 -05:00
dependabot[bot]
0346a15b57 Bump http-cache-semantics from 4.1.0 to 4.1.1
Bumps [http-cache-semantics](https://github.com/kornelski/http-cache-semantics) from 4.1.0 to 4.1.1.
- [Release notes](https://github.com/kornelski/http-cache-semantics/releases)
- [Commits](https://github.com/kornelski/http-cache-semantics/compare/v4.1.0...v4.1.1)

---
updated-dependencies:
- dependency-name: http-cache-semantics
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-04 05:43:43 +00:00
Deven Caron
a2d658bc13 Remove log to prevent throwing unwanted errors 2023-02-02 10:14:48 -05:00
Deven Caron
7c1b61eda9 Add build config dynamic import assertation type 2023-02-02 10:00:20 -05:00
Lucas Vallenet
1fe30a9837 Optimize grid-column loops / Use css vars for grid columns 2023-02-01 10:23:43 +01:00
Deven Caron
e4ae03a94c Remove unused sass env function 2023-01-31 15:37:40 -05:00
Deven Caron
3cde7d40ee Update readme 2023-01-31 14:15:56 -05:00
Deven Caron
d1d4fb5fe5 Bump node-version & upgrade node-sass to sass 2023-01-31 13:57:51 -05:00
Chauncey McAskill
3cd81bdb3e Improve asset versioning task
Improved logic for replacing the value to allow for simpler regular expression patterns. Lookbehinds and lookaheads are no longer required.
2023-01-13 16:42:47 -05:00
Chauncey McAskill
b6970832a3 Improve asset versioning task
Added support for replacing a string in a file using a regular expression.

The routine uses Node's Readline and Stream modules.

The `outfile` will be renamed with a `~` suffix, then stream each line, writing to a new `outfile`.

On success, the backup file (with `~`) is deleted.

On error, any new file is deleted, then the backup file is renamed without a `~` suffix.

Usage:

```json
"versions": [
    {
        "format": "timestamp",
        "key": "regexp:(?<=\bdefine\('ASSETS_VERSION', )[^\)]+(?=\);)",
        "outfile": "src/bootstrap.php"
    }
]
```

```php
<?php

define( 'ASSETS_VERSION', 1665071717350 );
```
2023-01-13 15:08:50 -05:00
Chauncey McAskill
b8f0a24cdc Update NPM dependencies
Updated:
- esbuild v0.16.13 → v0.16.17
- postcss v8.4.20 → v8.4.21
2023-01-13 14:55:01 -05:00
Chauncey McAskill
0c718a2644 Update Development documentation
Changed:
- Bumped NPM requirement.
- Added note about benefits of using NVM.
- Added note about support for PurgeCSS to Styles task.
- Added details about Versions task.
2023-01-05 10:37:52 -05:00
Lucas Vallenet
be71474633 Remove duplicate / Update functions descriptions 2023-01-05 09:58:01 +01:00
Chauncey McAskill
56d255eac8 Fix NPM dependency constraints on svg-mixer
Changed:
- Fixed svg-mixer constraint from `^2.3.14` to `~2.3.14` to stay within `2.3` range since `2.4.0` appears to be an anomaly.
- Overrode postcss constraint in svg-mixer from `^6.0.21` to `^8.4.20` to fix security notice.
2023-01-04 11:01:40 -05:00
Chauncey McAskill
e7e343e62c Bump NPM requirement to 8+
To take advantage of NPM dependency overrides.
2023-01-04 11:01:40 -05:00
Chauncey McAskill
590e06fc03 Update NPM dependencies
Updated:
- autoprefixer v10.4.12 → v10.4.13
- browser-sync v2.27.10 → v2.27.11
- esbuild v0.14.54 → v0.16.13
- node-sass v7.0.3 → v8.0.0
- postcss v8.4.17 → v8.4.20
2023-01-04 11:01:38 -05:00
Lucas Vallenet
810df92a61 Fix functions.scss error 2023-01-04 14:41:25 +01:00
Lucas Vallenet
4fd7968b86 Fix SCSS syntax error and duplicate 2023-01-04 11:26:56 +01:00
Lucas Vallenet
aba77ea2d9 Add default CSS Variables 2023-01-04 11:21:43 +01:00
Lucas Vallenet
bf28fe21a3 Strip breakpoint unit from responsive-type 2023-01-04 11:02:32 +01:00
Lucas Vallenet
7b3cefd8df Add usefull scss functions 2023-01-04 10:50:36 +01:00
Lucas Bigot
20b167da33 Invert grid-helper visibility condition 2022-11-22 14:51:37 -05:00
Deven Caron
f7ca837782 Disable browsersync ghostMode 2022-11-02 11:15:49 -04:00
Deven Caron
0c8ed9595f Merge pull request #112 from locomotivemtl/feature/grid-helper 2022-10-31 14:34:13 -04:00
arnvvd
eead1d27cd Move grid helper call to global.js 2022-10-31 14:27:18 -04:00
arnvvd
2e3db21ec8 Update dynamic imports condition 2022-10-31 14:25:22 -04:00
arnvvd
9c478f5f7d grid helper refactoring + prepare JS dynamic import + add app-env function for Sass conditions 2022-10-31 14:25:20 -04:00
Jérémy Minié
ebcbb6dc84 Only use GridHelper's margin setting for lateral grid spacing 2022-10-31 14:22:31 -04:00
Lucas Vallenet
b7c49086c9 Add custom grid helper based on CSS custom properties 2022-10-31 14:20:59 -04:00
Chauncey McAskill
9219a4cc0a Rename default function in versions.js task
Renamed from `bumpVersion` to `bumpVersions` for consistency with the default functions of other tasks.
2022-10-13 12:53:32 -04:00
Chauncey McAskill
14afe2295a Improve asset versioning task
Added:
- Support for writing multiple times to the same file.
- Support for random hexadecimal value instead of timestamp.

Usage:

```json
"versions": [
    {
        "format": "timestamp",
        "key": "now",
        "outfile": "./assets.json"
    },
    {
        "format": "hex:8",
        "key": "hex",
        "outfile": "./assets.json"
    }
]
```

```json
{
    "now": 1665071717350,
    "hex": "6ef54181c4ba"
}
```
2022-10-12 12:07:24 -04:00