13 Commits

Author SHA1 Message Date
Steven
26abb0a85a [api] Update /api/examples/list to be static for vc init (#7596)
Previously, this API would download the entire git repository for each request. Instead, we can defer downloading to the `/download` API only and change the list API to be statically generated at build time.

This will improve the time to render the results from `vc init`.


## Before
- `https://vercel-lu6z5kf4s.vercel.sh/api/examples/list` responds in 6200 ms
- `https://vercel-lu6z5kf4s.vercel.sh/api/examples/list-all` responds in 800ms

## After
- `https://vercel-ctsxcwzgc.vercel.sh/api/examples/list` responds in 60 ms 
- `https://vercel-ctsxcwzgc.vercel.sh/api/examples/list-all` responds in 60 ms
2022-03-22 11:26:19 -04:00
Nathan Rajlich
8d96a57117 Update references of default branch to "main" (#6114) 2021-04-15 10:11:13 -04:00
Steven
f5f07c5d15 [all] Remove more "now" references (#5944)
Follow up to #5928 to remove a few more "now" references and replace with "vercel" where appropriate.
2021-03-08 10:08:09 -05:00
Steven
e5cc1d643a [frameworks][api] Add sort order (#4829)
This PR adds an optional property called `sort` to each framework so that we can change the order returned in the API. 
The reason this is necessary is because the order of the original array determines the precedence of framework detection. So we need another way to indicate the order of templates/examples returned from the API.

In particular, we need "Next.js" to be first and "Other" to be last.

I also updated the deprecated `@now/node` usage to `@vercel/node` in the API.
2020-07-10 18:09:14 +00:00
Steven
56c8af51b2 [all] Rename GitHub repo to vercel/vercel (#4506)
We renamed the GitHub repository from `zeit/now` to `vercel/vercel` so this PR updates all references to the repo URL.

There were also a few remaining references to Now CLI that have been updated to Vercel CLI.
2020-05-28 12:06:42 -04:00
Steven
e844a38286 [api] Fix download api (#4512)
The list examples api was updated in #4511 but we also need to update the download example api.
2020-05-27 17:49:46 -04:00
Andy
cfb84b5328 [api] Fix filename and update .vercelignore and vercel.json (#4511)
- Fix a filename in the examples API
- Rename .nowignore to .vercelignore
- Rename now.json to vercel.json
2020-05-27 17:19:15 -04:00
Leo Lamprecht
719d1ffba9 Adjusted old company names (#4507) 2020-05-27 20:54:58 +02:00
Andy
0c6c6677a7 [examples] Make -functions example the default (#3541)
* Remove now-examples references

* Adjust gatsby example

* Adjust svelte example

* Adjust vanilla example
2020-01-10 12:48:45 +01:00
Andy
2db627b79d Adds manifest.json to examples folder (#3536)
* Revert "Revert "[examples] Add manifest.json""

This reverts commit c65336e63b.

* Revert "Revert "Do not use now-examples anymore""

This reverts commit ac72e944a7.

* Update nowignore

* Fix join

* Fix JSON

* Fix header

* Replace manifest.json with @now/frameworks

* Adjust readmes

* Adjust .nowignore

* Update scully

* Fix description

* Update examples/create-react-app/src/App.js

Co-Authored-By: Shu Ding <ds303077135@gmail.com>

* Update readme

* Add websites

* Use https

* Adjust example URL

* Change order

Co-authored-by: Shu Ding <ds303077135@gmail.com>
2020-01-10 00:14:51 +01:00
Andy Bitz
ac72e944a7 Revert "Do not use now-examples anymore"
This reverts commit fdb74b7971.
2020-01-09 17:28:49 +01:00
Andy Bitz
fdb74b7971 Do not use now-examples anymore 2020-01-09 17:26:55 +01:00
Andy
890de6a625 Add API for frameworks and examples (#3514)
* Add API for frameworks and examples

* Adjust headers

* Update frameworks list

* Always use latest

* Add types

* Use now repo for downloading and listing

* Use .existsSync

* Remove unused packages

* Use 307 for redirect

* Add examples

* Update tsconfig.json

Co-Authored-By: Steven <steven@ceriously.com>

* Make examples unique

* Remove detectors from frameworks API

* Use /api instead of Next.js

* Install dependencies

* Rename project

* Change name

* Empty

* Change name

* Update api/tsconfig.json

Co-Authored-By: Steven <steven@ceriously.com>

* Update examples

Co-authored-by: Steven <steven@ceriously.com>
2020-01-07 23:55:39 +01:00