Commit graph

26 commits

Author SHA1 Message Date
Luis Alvarez D
f10f3304fe Replace the deprecated Create Next App URL (#9032) 2019-10-10 23:34:14 -04:00
Chaitanya Reddy K
6421d68e01 Updated "firebase-admin" module and added "firebase-functions-t… (#8078) 2019-07-24 13:10:36 +02:00
Joe Haddad
f152c745da
Update remaining examples to latest Next.js 2019-07-08 19:37:58 -04: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
Corbin Crutchley
e03266008c form handler example: Update deps and fix build from dep update (#6732)
* form handler example: Update deps and fix build from dep update

* Ran lint error fixers

* Fixes errors that occur when commit occurs

* Commit linter fixes
2019-03-27 16:12:45 -04:00
Ariel Fuggini
5ab3f00441 Fixed missing next deployment directory bug (#6331)
Fixes https://github.com/zeit/next.js/issues/6201 
Fixes #5912
2019-02-21 00:45:07 +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
82c5cc38d5 Update/fix "examples/with-firebase-hosting" (#5853)
Hello! 
I was looking at the [`with-firebase-hosting`](/zeit/next.js/tree/canary/examples/with-firebase-hosting) example and was having some various issues running it:

* `npm run serve` will choke on windows because trying to set enviroment variables with `NODE_ENV=production`
* `npm run build-funcs` failing because of babeljs mismatches between `@babel/cli@^7.0.0-rc.1` and `next@^6.0.3`
* Not being able to deploy because `firebase-tools` being a deprecated version.

I remedied this and also improved some other factors:

* Use standard JSON formatting on `package.json` so that `npm install` doesn't cause changes on every run. (a83e930)
* Remove "prettier" as a devDependency as there is no use of it in the example and most other examples does not have it as a dependency. (6095663)
* Update all dependencies. The simple usecase in this example didn't really require any changes to the code. (ccde086)
  * [`firebase-admin@6`](https://github.com/firebase/firebase-admin-node/releases/tag/v6.0.0)
  * [`firebase-functions@2`](https://github.com/firebase/firebase-functions/releases/tag/v2.0.0) 
  * [`firebase-tools@4`](https://github.com/firebase/firebase-tools/releases/tag/v4.0.0)
  * [`firebase-tools@5`](https://github.com/firebase/firebase-tools/releases/tag/v5.0.0)
  * [`firebase-tools@6`](https://github.com/firebase/firebase-tools/releases/tag/v6.0.0)
* Make `npm run serve` runnable on windows using [`cross-env`](https://www.npmjs.com/package/cross-env). (b20dda7)
* Update `.gitignore` to ignore firebase cache (bf761b7)
* Remove `src/app/.babelrc` that seems to have been added as a previous bugfix but doesn't seem to do anything currently. (1b02045)
* Remove point from [`README.md`](https://github.com/zeit/next.js/blob/canary/examples/with-firebase-hosting/README.md) that was mentioning any `predeploy` hooks in `firebase.json` as they were removed in 4f4b7a1bce. (5636d9f)
* Use the possibility added by upgrading `firebase-tools` to [`>=4.0.0`](https://github.com/firebase/firebase-tools/releases/tag/v4.0.0) and `firebase-functions` to [`>=2.0.0`](https://github.com/firebase/firebase-functions/releases/tag/v2.0.0) to make the deployable functions use node 8 rather than node 6. Also make babel compile with node 8 as target for less polyfills etc. (c954cc2)
  * Added comment to [`README.md`](https://github.com/zeit/next.js/blob/canary/examples/with-firebase-hosting/README.md) explaining how firebase deploys to node 8 and that babel will compile code for node 8. (d8b2e65, 91953dc)

This was tested to `serve` on windows, linux(WSL) and on mac. Deploy was tested on linux(WSL) and mac.

---

This PR is a based on #5806 with correct base.

---

🔔 @jthegedus @timneutkens
2018-12-11 11:45:58 +01: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
James Hegedus
4f4b7a1bce with-firebase-hosting: fix npm scripts, remove firebase.json predeploy scripts (#4593)
* remove `predeploy` scripts from `firebase.json` in favour of `npm` `pre` scripts as they are consistent across `deploy` and `serve` commands. (to revisit once Firebase add support in the `firebase.json` for `preserve`)
* update deps
* workaround some bug where Babel could not resolve the standard `next/babel` config. Explicitly defining this seems to remove the issue.
* closes #4562
2018-06-12 17:37:13 +02:00
James Hegedus
57be892d02 with-firebase-hosting: update to work with next v6 (#4435)
* with-firebase-hosting: update next.js 6, readme about customization

* now next.js 6 is on Babel 7, remove conflicting babel deps
* update Next Server/Cloud Function .babelrc config
* update other deps: Cloud Functions to 1.x.x etc
* rm install-deps script as it is no longer used on deployment (firebase does not upload node_modules)
* make scripts consistent in their wrapping of dirs with \" (escaped double quotes)

* with-firebase-hosting: pin next to "latest" version

* with-firebase-hosting: fix lint errors
2018-05-21 10:28:09 +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
43fe9ace54 Merge branch 'canary' of github.com:zeit/next.js into canary 2018-03-31 16:07:16 +02:00
Tim Neutkens
c07cf5e83f Upgrade Next in with-firebase-hosting 2018-03-31 16:06:12 +02:00
Jonathan James
b39958e780 Fix serve command (#3989)
* Fix serve command

From the Firebase docs, you must use --only in order to run the local function emulator.
See https://firebase.google.com/docs/functions/local-emulator

* Add production env for firebase serve

Doesn't work without this

* Update text as suggested by @jthegedus
2018-03-31 15:59:24 +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
Saro Vindigni
d3518242a6 FIX deploy with-firebase-hosting (#3946)
* FIX deploy with-firebase-hosting

* add npm run command in place of yarn in firebase.json predeploy hooks

* Change yarn with npm

* firebase-hosting example: Add warning in examples README

* firebase-hosting example: clarify warning language

* firebase-hosting example: remove the warning and upgrade to canary

* firebase-hosting example: actually upgrade pkg.json
2018-03-08 13:54:32 +01:00
James Hegedus
b4b5b1fa6d with-firebase-hosting improvements & fixes (#3886)
* Next.js v5 update, _error & _document bugs fixes

* document clean script

* remove old build artefact

* add babelrc

* reset next.js version to 'latest' from '^5.0.0'

* typo in readme

* format code

* remove _files as they were a fix for a solved, but unreleased problem
2018-02-28 11:54:48 +01:00
Tim Neutkens
9a82ca4029 Update Next.js version on examples 2018-01-30 21:46:15 +01:00
Tim Neutkens
24c1ac6ca9
Use canary for all example downloads (#3411) 2017-12-06 18:12:42 -08:00
Fouad Matin
2528779394 examples: add create-next-app (#3377)
* examples: add create-next-app

* fix with-typescript readme
2017-12-02 20:30:17 -08:00
James Hegedus
594b214a23 Update with-firebase-hosting. (#3032)
Simplify scripts.
2017-10-05 08:28:46 +02:00
Alvin
65ff72aada renames misspelt placeholder.html (#2703) 2017-08-03 08:04:03 +02:00
James Hegedus
b27526b6ff with-firebase-hosting update (#2683)
* Fix link in with-firebase-hosting example

* with-firebase-hosting example

Update npm scripts & README
2017-07-30 14:02:16 +02:00
James Hegedus
84de7f9397 With Firebase Hosting Example (#2642)
* Rename Firebase Auth example

* Update gitignore to include npm5 lockfile

* Cloud Function

* Add Next app with two pages to demonstrate navigation

* Add Firebase Hosting and configuration to Host & Deploy

* Fix errors in rename for firebase-auth example

* Recommend pkg managers with caches for better perf

* Update with-firebase-hosting example

Fix code

* Update with-firebase-hosting example

Fix npm scripts and package.json files

* Update with-firebase-hosting example

Update README & install scripts

* Update with-firebase-hosting example

Update example package name

* Update with-firebase-hosting example

Fix to use single-quotes

* Update with-firebase-hosting example

VSCode did not like single-quotes! Sorry

* Fix gitignore file
2017-07-26 07:52:49 +02:00