Skip to content

Commit

Permalink
[Blog] Add deprecating of global use of CLI
Browse files Browse the repository at this point in the history
  • Loading branch information
LoicPoullain committed Aug 3, 2024
1 parent ba8b5c7 commit a6ae74d
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions docs/blog/version-4.5-release-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,24 @@ Version 4.5 of [Foal](https://foalts.org/) is out!

<!--truncate-->

## Global use of CLI deprecated

In previous versions, the tutorial suggested installing the CLI globally to create a new application or generate files. However, it is considered bad practice to install a dependency globally for local use.

In addition, the CLI was also installed locally so that the build command would work when deploying the application to a CI or to production. This maintained two versions of the same CLI

To correct this, in the documentation and examples, the CLI is now always installed and used locally. To use it, simply add `npx` before each command (except for `createapp`).

```bash
# Before
foal createapp my-app

foal generate script foobar
foal createsecret

# After
npx @foal/cli createapp my-app

npx foal generate script foobar
npx foal createsecret
```

0 comments on commit a6ae74d

Please sign in to comment.