Add support for "increment" format to increment an integer version number with support for "increment:semver" to increment the build or patch of a SemVer version number.
Usage:
```json
"versions": [
{
"format": "increment",
"key": "version",
"outfile": "assets.json"
}
]
```
```jsonc
{
"version": 16 // → 17
}
```
```json
"versions": [
{
"format": "increment:semver",
"key": "version",
"outfile": "assets.json"
}
]
```
```jsonc
{
"version": "1.0.0" // → 1.0.1
}
```
```jsonc
{
"version": "1.0.0+1" // → 1.0.0+2
}
```
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 );
```
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.
Changed:
- Features, Installation, and Development sections in README.
- Introduction, Configuration, and Tasks in Development.
- Heading levels in Technologies.
Fixed:
- Anchors to option sections in Development.
And split sections from README into dedicated documentation files.
Added:
- "Features" section to summarize the boilerplate's architecture.
- "Getting Started" section to describe how to create a project from the boilerplate.
- "Development" documentation to describe how NPM dependencies, configuring assets and tasks.
- "Technologies" documentation to describe CSS, JS, Locomotive Scroll, ModularLoad, ModularJS.
Changed:
- Moved section "Configuration" to 'docs/development.md'.
- Moved sections "Styles", "Scripts", "Page transitions", and "Scroll detection" to 'docs/technologies.md'.
TODO:
- Move "Environment configuration" section from "Development" to 'feature/local-config' branch.