Installation and upgrading
To initiate a new Ontario.ca Frontend project without installing the CLI globally:
npx @ongov/ontario-frontend-cli create-ontario-app
To upgrade an Ontario.ca Frontend project:
npm install @ongov/ontario-frontend@3.0.0
Highlights
Breaking change: @ongov/ontario-frontend
as a development dependency
Ontario.ca Frontend introduces a new file structure that requires @ongov/ontario-frontend
to be added as a development dependency in your project. (This replaces the previous core
folders that existed in Ontario.ca Jamstack Toolkit projects.)
Make sure your package.json
is up to date with this dependency:
{
"devDependencies": {
"@ongov/ontario-frontend": "3.0.0",
}
}
create-ontario-app
to initialize a new project
Ontario.ca Frontend provides a new, one-command project initialization process via the command line. Using npx
, the create-ontario-app
command will set up everything automatically from the npm package registry.
npx @ongov/ontario-frontend-cli create-ontario-app
New code linting and styling packages
Ontario.ca Frontend breaks the previously-bundled ESLint and Prettier configurations into standalone packages (eslint-config-ontario-frontend and prettier-config-ontario-frontend) that can be optionally added to a project as development dependencies.
Make sure your package.json
is up to date with these dependencies:
{
"devDependencies": {
"@ongov/eslint-config-ontario-frontend": "1.0.0"
"@ongov/prettier-config-ontario-frontend": "1.0.0"
}
}
Other changes
- Fixes issue where CLI cursor was misaligned with prompts