Commit graph

41 commits

Author SHA1 Message Date
Tim Neutkens
6679694a1e
Update Custom Server README's (#10843)
* update custom server readmes

* remove deploy buttons
2020-03-05 16:30:48 +01:00
Shu Uesugi
c57cdbb31d
Rename zeit.co/new → zeit.co/import (#10674)
* Replace zeit.co/new → zeit.co/import

* Update deployment.md
2020-02-24 19:08:34 -05:00
Rafael Almeida
ee7ea03a59
Remove deprecated static folder (#10632) 2020-02-21 19:09:23 +01:00
Shu Uesugi
5f041447bc
Remove Now CLI reference from examples (#10501)
* Find/Replace "Deploy it to the cloud..."

* Find/Replace "Deploy it to the cloud..." (no colon)

* Find/Replace "Deploy it to the cloud..." for firebase

* Convert remaining ones

* Storybook deployment

* Update with-stripe-typescript

* Update contributing.md

* Remove `now`

* Update examples/with-stripe-typescript/README.md

Co-Authored-By: Luis Alvarez D. <luis@zeit.co>
2020-02-12 17:14:57 -05:00
Shu Uesugi
6804039e94 Make example READMEs more consistent (#10124)
* npx create → npm init

* Fix inconsistent instructions

* Update amp-first

* Update with-graphql-react

* with-firebase-cloud-messaging

* Update with-higher-order-component

* change create-next-app url

* Update create-next-app instruction

* Update instructions to use npm instead of npx

* Move "the idea behind the example" to top

* Rename

* Rename

* Update contributing.md with a README template
2020-01-16 23:23:56 +01:00
C. T. Lin
0e1f2f36a3 Move cross-env from devDependencies to dependencies (#9580) 2019-12-01 10:36:27 +01:00
Luis Alvarez D
f10f3304fe Replace the deprecated Create Next App URL (#9032) 2019-10-10 23:34:14 -04:00
Lukáš Huvar
7863b60ef6 Prettier fix (#8754) 2019-09-16 15:24:42 +02:00
Joe Haddad
aac5121466
Apply missing formatting (#8079)
* Reapply missing formatting

* Fix lint
2019-07-23 14:33:49 -04:00
Junyoung Choi
9c8d34d551 Upgrade next.js version in custom-typescript-server example (#7772)
* Upgrade next.js version of custom-typescript-server example

* Update examples/custom-server-typescript/package.json

Co-Authored-By: Resi Respati <resir014@gmail.com>

* Format package.json
2019-07-09 13:24:14 -04:00
Joe Haddad
f152c745da
Update remaining examples to latest Next.js 2019-07-08 19:37:58 -04:00
jsmirandaiii
5f269d7c88 Added nodemon config to watch for .ts and .js files in the server folder (#7592) 2019-06-17 16:36:13 -05:00
Joe Haddad
b3170d2648
Format missed files (#7464)
* Format missed files

* Remove unnecessary rule

* Fix type error
2019-05-29 18:19:32 -07:00
Tim Neutkens
3e51ddb8af
Move syntax formatting to prettier (#7454)
* Run prettier over packages/**/*.js

* Run prettier over packages/**/*.ts

* Run prettier over examples

* Remove tslint

* Run prettier over examples

* Run prettier over all markdown files

* Run prettier over json files
2019-05-29 13:57:26 +02:00
Resi Respati
ed0e17503e [custom-server-typescript] fixed custom server build issues (#7385) 2019-05-23 14:08:03 -05:00
Mike Rispoli
69ef5d43d6 [custom-server-typescript] remove outdir line from tsconfig.server.json (#7362) 2019-05-16 12:28:53 -05:00
Connor Davis
3fa04620e7 Remove Deploy To Now buttons (#7126)
* Remove Deploy To Now buttons

* Remove remaining buttons
2019-04-24 10:53:58 +02:00
Tim Neutkens
1a53ca7474
Add x-powered-by (#7029)
* Add x-powered-by

* Remove ampEnabled type
2019-04-15 16:48:14 +09:00
Javier Alcala
8a326345b9 Enable strict type checking on custom-server-typescript example (#7025) 2019-04-13 19:56:12 +02:00
Corbin Crutchley
9504a389c0 Update dependencies of various examples (#6731)
Minor changes to examples. Updating major semver updates with only `package.json` changes. 
I've done my best to make sure that these packages.json files all have `latest` for the `nextjs` package, `cross-env` for those with `server.js` files, etc.
I also added a `package.json` to `with-dynamic-app-layout` (it was missing one previously)

Made sure to test all of these packages post-upgrade to ensure maintained functionality
2019-03-27 01:42:49 +01:00
Kyle Gallagher
05ddf3e4e0 Small fix to example custom-server-typescript (#6695)
I noticed that the nodemon.json file was not watching for all file changes in the correct location for filetype .ts (typescript). After some research I found that the "ext" option in the nodemon.json fixes the issue and should work across all operating systems.
2019-03-18 11:57:39 +01:00
Brent Ertz
4c4459f931 Update custom-server-typescript example (#6627)
* Typecheck server vs. client code independently, ensuring that each respects its own tsconfig.
* Use nextjs default distDir in tsconfig
* Update packages
* Fix type error in server.listen callback
2019-03-16 16:42:22 +01:00
Juan Olvera
7e12997af6 Test updater script on examples folder (#5993)
I wrote a [script](https://github.com/j0lv3r4/dependency-version-updater) to update dependencies recursively in `package.json` files, e.g.:

```
$ node index.js --path="./examples" --dependencies="react=^16.7.0,react-dom=^16.7.0"
```

This PR contains the result against the examples folder.
2019-01-05 12:19:27 +01:00
Oscar Busk
71d1d363ad Fix/update "examples/custom-server-typescript" (#5865)
* Update all dependencies and remove redundant ones from package.json. (60f9ee5)
* Fixes #5596 by adjusting nodemon scripts (d4b7d3a)
* Fixes `npm start` on windows by using `cross-env` (9555217)
* Move compiled server out from `.next`. Compiling other JS into `.next` seems incorrect. (79fce02, 
9ce7086)
* Partly fixes #5753 by making sure typescript compiles with `es2017` as target, at least ensuring code is runnable on node 8. Previously it was compiled with `esnext`. (9176e92)

--- 

I tried improving the structure by keeping source in `src/app` and `src/server` and then building to `dist/server` and `dist/app` but I didn't really get it to work and made most configs more complicated. Moved the built server out from `.next` anyway.
2018-12-12 11:04:39 +01:00
Matt Jewell
7076727d3e Fix location of production server file (#5731)
(At least with my set up, mac osx, node 10.13.0, yarn 1.12.1)

Couldn't get the server to start with `npm start`, this appears to fix that
2018-11-22 16:55:47 +01:00
Davide Curletti
819efed2c0 Fix incorrect path for ts server example (#5612)
The customer-server-typescript example has a bug where the `yarn start` command has the incorrect path to the server entry point file.
2018-11-07 14:33:33 +01:00
Duncan L
6d5389ef2d Examples: Update custom-server-typescript examples packages (#5411) 2018-10-09 12:48:05 +02:00
Emmanuel Letallieur
82bdd43285 Fix custom-server-typescript not typechecking (#3954)
Hi

In the current version of the example __custom-server-typescript__, types are never checked.
For instance, change the following line :
```
const dev = process.env.NODE_ENV !== 'production'
```
by :
```
const dev: number = process.env.NODE_ENV !== 'production'
```
then run `npm run dev`. The application launches perfectly, no error is thrown.

In dev environnement, it is preferable to check types all the time, to get immediate feedback. This PR activates type checking. Only when using nodemon, so no impact on production.


Now the above code will (rightfully) refuse to compile : 
```
TSError: ⨯ Unable to compile TypeScript
server/index.ts (6,7): Type 'boolean' is not assignable to type 'number'
```
2018-09-04 17:35:34 +02:00
Alexander Kachkaev
9319c158a5 Upgrade Babel to 7.0.0-rc.1 (major) (#4937)
Fixes #4691
Fixes #4614

This PR gives path to https://github.com/zeit/next-plugins/pull/242

I did not add or remove `^` near dependency versions in package.json files. However, I don't exclude that some changes can be made given that rc is more stable than beta.
2018-08-13 10:34:08 -07:00
Michael Herold
5b3578e58f #4751 - Explicitly mention install when cloning examples (#4758)
Preferably this installation wouldn't be necessary, but in lieu of a fix...

#4751
2018-07-11 23:56:15 +02:00
Vinicius Pacheco Furtado
de6bf4e75f Fix typescript examples (#4704)
Update @zeit/next-typescript version on examples using it
2018-06-30 22:23:38 +02:00
Luke Barton
cbfdcce32d Update typescript examples to use 1.0.1 of next-typescript (#4472)
* Update typescript examples to use 1.0.1 of next-typescript

* Add .babelrc modifications to upgraded typescript examples
2018-05-25 11:28:35 +02:00
Rob Brennan
0330962618 Improve custom server typescript example v2 (#4470) 2018-05-25 11:03:59 +02:00
Seth Etter
769d8e3a84 Update next-typescript version in custom-typescript-server example (#4130) 2018-04-09 18:41:41 +02:00
James Hegedus
f2e56609cd Examples: stabalise README format and create-next-app usage (#4009)
* Examples: clarify language around Yarn create & npx

* add missing READMEs and create-next-app usage

* suggest people tag jthegedus in firebase related issues

* add yarn alt instructions

* cerebraljs example readme & fixes
2018-04-03 14:19:05 +02:00
Tim Neutkens
069f45d74e Upgrade @zeit/next-typescript in custom-server-typescript example (patch) fixes #4071 2018-03-29 21:06:53 +02:00
James Hegedus
b1d8b839dd Examples: use npx and yarn create to run create-next-app on examples (#4002)
* remove global npm install of create-next-app

* add npx to create-next-app command in examples

* add bash to shell snippets

* add yarn create to next-app command in examples

* fix READMEs named with lowercase

* change READMEs to use UPPERCASE
2018-03-14 09:09:46 +01:00
Wagner Camarao
0eb5bab452 Fix a/b typo in custom-server-typescript routing (#4003) 2018-03-14 09:06:53 +01:00
Alexander Kachkaev
2e641e9e8c Use separate tsconfig for server in custom-server-typescript example (#3963) 2018-03-07 09:13:12 +01:00
Alexander Kachkaev
39be7183a5 Update custom-server-typescript example (#3936)
- Add "jsx": "preserve" to tsconfig.json
- Rename lib to production-server to remove incompatibility with other examples

Context: https://github.com/zeit/next.js/pull/3838#issuecomment-370189242 and below
2018-03-05 09:49:48 +01:00
Ibrahim Ansari
99fb191286 Add custom-server-typescript example (see #3694) (#3838)
* Add custom-server-typescript example (see #3694)

* Fix linting errors in custom-server-typescript

* Provide proper arguments to ts-node.

* Fix import and fix all linting errors.

* Use import in server as well.

* Update nodemon.json
2018-02-22 16:29:47 +01:00