Commit Graph

3 Commits

Author SHA1 Message Date
Brandon Bayer
3d40e343ac [frameworks][examples] Add Blitz.js (#4465)
This adds [Blitz.js](https://github.com/blitz-js/blitz) to the zero-config frameworks.

Blitz compiles to a Next.js app, so it uses the same `@vercel/next` builder.

The change in `packages/now-build-utils/src/detect-builders.ts` was made according to @styfle's suggestion in Slack.

---

**This is a rerun of #4219 which had to be reverted because of this:**

> It looks like the @vercel/next package still requires next in the dependencies.
>
> When I've deployed the example I've got only a file listing, but when I added next to the dependencies it worked. I'll revert for now.

This new PR fixes that problem with a small refactor to `@vercel/next`.

`@vercel/next` was getting the Next version two different ways:

1. By checking project root package.json for `next` in deps or devDeps
2. By trying to resolve the installed next version and get `version` from its package.json

My refactor consolidates those two approaches by changing the existing `getNextVersion()` function to first try and resolve the real next version. If that fails, fall back to checking the project root.

Blitz bundles Next, so the real next package version should always be resolved.
2020-07-08 13:18:01 -04:00
Andy
5fa8ed56a9 Revert "[frameworks][examples] Add Blitz.js (#4219)" (#4464)
This reverts commit 65446b73da.
2020-05-23 03:40:20 +02:00
Brandon Bayer
65446b73da [frameworks][examples] Add Blitz.js (#4219)
* Add Blitz.js to Frameworks

* update blitz example to latest version

* change blitz dependency to be `latest`

* Update packages/frameworks/frameworks.json

Co-authored-by: Andy <AndyBitz@users.noreply.github.com>

* update logo

Co-authored-by: Andy <AndyBitz@users.noreply.github.com>
Co-authored-by: Steven <steven@ceriously.com>
2020-05-23 01:55:03 +02:00