Update config action
This action updates an existing project's configuration files to match the current version of the build tools. Run it after you upgrade the @aptuitiv/website-build-tools package to pick up the latest configuration.
aptuitiv-build update-config
Or use the package.json script:
npm run update-config
This action only updates configuration files. It doesn't build the site or upload any files.
What gets updated
Each file is updated in place. If a file doesn't exist then it's created. No files are removed.
- Formatting configuration: The
.editorconfig,.prettierignore, and.prettierrc.cjsfiles are overwritten with the versions from the build tools. If the project has another Prettier configuration file, like.prettierrc.json, it's left in place and you'll see a warning. Prettier uses those files before.prettierrc.cjs, so remove them to use the build tools configuration. Also see the Update formatting config action. package.json: The file is formatted the same way as the package-json format action. This reorders the contents, updates the scripts, removes outdated dependencies, and sets the build tools version in the dev dependencies..gitignore: Any missing patterns from the default.gitignorefile are added to the end of the file. Your existing patterns aren't changed.LICENSE: If the project uses theApache-2.0license then theLICENSEfile is updated with the current license text. Other licenses are left alone.
After the files are updated, npm install runs to install the updated packages.
Options
--licenseor-l: The license for the project. Defaults to thelicensevalue in thepackage.jsonfile.--themeor-t: The theme name to use in thepackage.jsonscripts. Defaults to the theme folder name from thebuild.themeconfiguration value. For example,dist/theme/carmineusescarmine. If the theme name can't be found thencustomis used.--no-install: Don't runnpm installafter the files are updated.--configor-c: Specify a different name for the configuration file.