Skip to content
Permalink
Browse files

Update examples to remove configuration (#423)

* Use no config

* Removed useless data

* Removed more

* Removed lock

* Removed target

* Change build command

* Added next.config.js

* Stop the nonsense

* Renamed monorepo

* Fixed utils dir

* Fixed command

* Added dev command

* Renamed example

* Removed garbage

* Remove now.json

* Removed unused stuff

* Removed now.json

* remove now.json from charge

* remove redundant builds

* remove now.json from vue

* remove now.json from umijs

* remove now.json from vuepress

* remove now.json from nuxt

* remove now.json from docz

* remove now.json from create-react-app

* remove now.json from create-elm-app

* Update nextjs version

* add further nextjs examples

* add missing builds for root now.json

* update output folders

* updated nextjs-node example

* correct hook and use res.send

* add nextjs go and bash examples

* add nextjs php example

* add nextjs ruby python and rust examples

* update links

* add create-react-app examples

* add vue.js examples

* add nuxt.js examples

* add gatsby examples

* add gridsome examples

* add umijs examples

* add vuepress examples

* add jekyll examples

* update ignore files

* update ignore files

* update ignore files

* add typescript examples, fix jekyll examples

* add typescript examples

* remove api file extensions

* amend vuepress & vue scripts

* update umijs scripts

* add svelte examples

* add aurelia examples

* add angular examples

* add preact examples

* add hugo examples

* correct nextjs package.json names

* remove hugo examples

* add hugo examples

* update jekyll to use install script

* update hugo to use install script

* update to nextjs9 and amend build command for preact

* updated framework build scripts

* add hexo examples

* add polymer examples

* add files to .gitignore

* remove manifest.json

* update readme, contributing, code of conduct, license

* add root now.json

* update contributing document

* Added docusaurus example

* Updated umijs-node example

* remove root now.json

* update gatsby and docz examples

* fix preact for now dev

* fix svelte for now dev

* fix vue for now dev

* remove script from umijs

* fix gatsby build script for now dev

* fix docz build script

* update CRA scripts

* simplify hexo example

* add hexo

* remove bash examples

* update Hugo scripts

* update dev scripts

* update angular + hexo scripts

* update aurelia dev script

* updatee nuxtjs deev scripts

* update dev scripts and add manifest

* update manifest descriptions

* update svelte dev scripts

* update jekyll scripts

* update jekyll gemfiles

* update  examples

* remove submodules

* remove hugo

* add hugo

* add vue

* change folder names

* update readme/contributing

* add charge + README.md for each example

* add brunch example

* update manifest

* update manifest

* update manifest

* correct typo

* remove now dev from readme

* fix hugo

* update cli links

* Fixed vuepress example

* remove elm

* how to initialize -> how we created

* add vanilla example

* typo

* add vanilla example

* add custom build example

* typo

* update custom-build script
  • Loading branch information...
msweeneydev committed Jul 19, 2019
1 parent 7c7b27e commit bdc40cc49eb36ca3a2e07402684ce3659bb7d9ba
Showing 1,023 changed files with 37,848 additions and 44,747 deletions.
@@ -1,14 +1,6 @@
# Learn how to add code owners here:
# https://help.github.com/en/articles/about-code-owners

* @timothyis
* @msweeneydev @timothyis
/create-react-app/ @Timer
/go/ @matheuss @timothyis
/html-minifier/ @leo @timothyis
/mdx-deck/ @timneutkens @timothyis
/nextjs/ @timneutkens @timothyis
/nextjs-static/ @timneutkens @timothyis
/nextjs-news/ @timneutkens @timothyis
/puppeteer-screenshot/ @styfle @timothyis
/typescript/ @TejasQ @timothyis
/zola/ @TejasQ @timothyis
/nextjs/ @timneutkens
@@ -1,35 +1,19 @@
# <Project>
Description
# [Name] Example

### Getting started with <Project>
This directory is a brief example of a [Name](site-link) site that can be deployed to ZEIT Now with zero configuration.

- Step 1
- Step 2
- Step N
## How we created this example

### Deploy with Now
To get started with [Name] on Now, you can use the [CLI Tool Used](CLI-link) to initialize the project:

First we need to create a `now.json` configuration file to instruct Now how to build the project.

For this example we will be using our newest version [Now 2.0](https://zeit.co/now).

By adding the `version` key to the `now.json` file, we can specify which Now Platform version to use.

We also need to define each builders we would like to use. [Builders](https://zeit.co/docs/v2/deployments/builders/overview/) are modules that take a deployment's source and return an output, consisting of [either static files or dynamic Lambdas](https://zeit.co/docs/v2/deployments/builds/#sources-and-outputs).

In this case we are going to use `@now/go` to build and deploy the date.go file. By default all other files will be statically served.

```
{
"version": 2,
"builds": []
}
```shell
$ now init charge
```

Visit our [documentation](https://zeit.co/docs/v2/deployments/configuration) for more information on the `now.json` configuration file.
## Deploying this Example

We are now ready to deploy the app.
Once initialized, you can deploy the [Name] example with just a single command:

```shell
$ now
```
now
```
@@ -1,11 +1,5 @@
main.dwarf
node_modules
.bundle
.next
vendor
target
yarn-error.log
.env

.DS_Store
build/
node_modules/
.DS_STORE
**/yarn.lock
**/.now
@@ -0,0 +1,3 @@
[submodule "hugo/hugo/themes/ananke"]
path = hugo/hugo/themes/ananke
url = https://github.com/budparr/gohugo-theme-ananke.git

This file was deleted.

@@ -0,0 +1,74 @@
## Code of Conduct

### Our Pledge

In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, gender identity and expression, level of experience,
nationality, personal appearance, race, religion, or sexual identity and
orientation.

### Our Standards

Examples of behavior that contributes to creating a positive environment
include:

- Using welcoming and inclusive language
- Being respectful of differing viewpoints and experiences
- Gracefully accepting constructive criticism
- Focusing on what is best for the community
- Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

- The use of sexualized language or imagery and unwelcome sexual attention or
advances
- Trolling, insulting/derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or electronic
address, without explicit permission
- Other conduct which could reasonably be considered inappropriate in a
professional setting

### Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.

### Scope

This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.

### Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at [abuse@zeit.co](mailto:abuse@zeit.co). All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.

### Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at [http://contributor-covenant.org/version/1/4][version]

[homepage]: http://contributor-covenant.org
[version]: http://contributor-covenant.org/version/1/4/
@@ -1,90 +1,121 @@
# Contributing

When contributing to this repository, make sure your example fits the purpose of the repository.
When in doubt, create an issue to discuss the change you wish to make.
Thank you for your interest in contributing to the ZEIT Now Examples!

Please note we have a code of conduct, please follow it in all your interactions with the project.
The following describes how to contribute to the Now Examples repository.

## General Guidelines
## What Does this Document Contain?

1. Make sure your example is deployable and works perfectly.
2. A good `README.md` is the best "welcome mat" for your example. This repository has many examples,
it is advised to copy & paste a `README.md` from another example and adapt to your contribution,
for better navigation across examples.
3. `now.json` should always be present. Developers expect the code to be as ready as possible,
which means having a correct `now.json` is expected.
This document contains all the required information and links to resources needed to contribute to the ZEIT documentation:

- [Code of Conduct](#code-of-conduct) - our Code of Conduct, adapted from the [Contributor Covenant](http://contributor-covenant.org)
- [Reporting an Issue](#reporting-issues) - guidance on how to raise an issue or provide feedback on examples
- [Contributing Content](#contributing-content) - a collection of all information required for contributing
- [Forking Workflow](#forking-workflow) - a guide on how to keep your fork in sync with `master`
- [Documentation](#documentation) - information on contributing to the [ZEIT Now Documentation](https://github.com/zeit/docs) repository

## Code of Conduct

### Our Pledge
We provide a [Code of Conduct](https://github.com/zeit/docs/blob/master/CONTRIBUTING.md) to make clear the behavior we expect from contributors and maintainers alike. We are committed to providing a welcoming and supportive environment and kindly request that you participate in these values also.

Our Code of Conduct is adapted from the [Contributor Covenant](http://contributor-covenant.org), version 1.4, available at [http://contributor-covenant.org/version/1/4](http://contributor-covenant.org/version/1/4/).

## Reporting Issues

If you have found a bug, spelling mistake, or anything related to an example that you feel could be improved, please create a new issue here on GitHub. For issues relating to documentation, please [create an issue in the documentation repository](https://github.com/zeit/docs/issues/new).

An issue can be raised by clicking the 'Issues' tab at the top of the repository, followed by the Green 'New issue' button. When submitting an issue, please thoroughly and concisely describe the problem you are experiencing, or improvement you feel could be made, so that we may easily understand and resolve the issue in a timely manner.

## Contributing Content

All of these ready to deploy examples feature a frontend framework or static site, created using the CLI tools they provide with zero configuration required. We welcome contributions of new examples that use the 'hello world' template of the particular framework or static site you want to add.

When contributing a new example, we kindly ask that you follow the steps below:

- Add an example that uses the default theme or template of the generator
- Add a README.md file using the same format as existing examples
- Test the example by deploying it with `now` to ensure it is working correctly

When contributing an example, please fork this repository and then add your example before submitting a pull request. If you are not sure how to do this then please take a look at the [Forking Workflow](#forking-workflow) below.

We appreciate all contributions and are more than happy to provide assistance wherever it is needed. You can get help with your contribution either by discussing it on a pull request or by reaching out to us in the [ZEIT Spectrum](https://spectrum.chat/zeit).

## Forking Workflow

To contribute to this repository, you will need to fork it, make changes and submit a pull request. This section is a brief guide on how to do this whilst making sure your forked repository stays up to date the with the official one.

The first step is to fork the repository, creating a copy of it under your own account. To do this, click the 'fork' button at the top right of the page.

A few seconds later you should be redirected. Now, if you look at the top left of the page it should show your GitHub username before the repository, confirming the fork has been successful.

Next you need to clone your fork your local environment so you can make changes to it. To do this you can click the Green 'Clone or download' button which will give you a URL to copy. Once copied, enter `git clone` in your terminal followed by the URL and hit enter, the command should look like this:

`git clone git@github.com:<your username here>/docs.git`

If successful, you should see the forked repository being cloned to your local environment.

Once you've cloned the forked repository to your local environment, it's a good idea to install the project dependencies. We use [Yarn](https://yarnpkg.com/en/) as our package manager, if you do not have it installed currently, their documentation provides a set of [instructions](https://yarnpkg.com/en/docs/install#mac-stable).

To install the project dependencies, simply enter:

`yarn`

With the dependencies installed, you should now add a remote path to the official repository. This will allow you to pull the most recent changes from the official repository into your local fork at any time, ensuring things are kept up to date and in sync.

To add the remote path for the official git repository, enter the following:

`git remote add upstream git@github.com:zeit/docs.git`

This command adds a new remote branch, with the name 'upstream'. If you ever want to pull the recent changes to update your local fork you can use the following command:

`git pull upstream master`

So far you've managed to fork, clone, install dependencies and add a remote, not bad going! Now you want to start making our changes, to do this you should create a new branch. Creating a branch for each change you make will keep things simpler for everyone and allow you to work on multiple changes at once if you like.

You can create a branch by using:

`git checkout -b <your branch name>`

Remember to use a descriptive and meaningful name when creating your branch, this will help you remember what its purpose is!

Now you're working on a branch you are a free to make the changes needed, further help with this can be found [below](#platform-and-usage-documentation). After you've finished making changes, commit them and push them to your new branch, you will need to create a new upstream remote to do this.

To create a new upstream remote, enter:

`git push --set-upstream origin <your branch name>`

In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, gender identity and expression, level of experience,
nationality, personal appearance, race, religion, or sexual identity and
orientation.
Your new branch should now appear on your remote repository. It can be viewed by visiting your remote repository and clicking 'Branches'. On this page you will see multiple sections, the most important one being 'Your branches'.

### Our Standards
To the right of the branch you will see a button that says 'New pull request', click this to begin the process of submitting your changes for review. You will now be prompted to enter a relevant title and a description of the changes made. When entering this information try to be concise but make sure to include the following information:

Examples of behavior that contributes to creating a positive environment
include:
- What changes you've made
- Your reason for making them
- A request for feedback if required (add [WIP] to your title)

- Using welcoming and inclusive language
- Being respectful of differing viewpoints and experiences
- Gracefully accepting constructive criticism
- Focusing on what is best for the community
- Showing empathy towards other community members
Congratulations, you've just made your first pull request to the ZEIT Documentation!

Examples of unacceptable behavior by participants include:
The rest of this section relates to other scenarios you may encounter whilst contributing and may not be applicable just yet, so feel free to [read ahead](#platform-and-usage-documentation). If you want to know what you should do in the event changes are requested to your pull request, or your master branch becomes out of sync with the official repository, read on below:

- The use of sexualized language or imagery and unwelcome sexual attention or
advances
- Trolling, insulting/derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or electronic
address, without explicit permission
- Other conduct which could reasonably be considered inappropriate in a
professional setting
### Master Branch out of Sync

### Our Responsibilities
This is very common and happens when changes are made to the official repository, meaning your fork is suddenly out of date. The only time you need to consider this is before you create a new branch, this means that whenever you start working on changes, your branch will always be up to date as of that moment.

Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.
When pulling changes from the official repository, it is always a good idea to do so from your master branch. Providing you've followed the advice above about adding a remote upstream, your command should look like this:

Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.
`git pull upstream master`

### Scope
This will get the most recent changes and bring your local fork up to date, at this point it is a good idea to have your remote fork reflect this, all this requires is to use:

This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.
`git push`

### Enforcement
Now, both your local and remote fork are up to date with the official repository, you are ready to create branches and make changes!

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at [abuse@zeit.co](mailto:abuse@zeit.co). All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.
### Pull Request Changes Requested

Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.
When you submit a pull request, a reviewer may request that you make further changes before merging with the master branch. This situation might seem difficult at first but is extremely straightforward.

### Attribution
All you need to do is make the changes on the same branch locally, commit and push them. Because you already have a pull request set up to track that branch, GitHub will automatically update it with your most recent changes. At this point it's a good idea to tag the original reviewer in the pull request using `@<reviewers username>`, to let them know you've made the requested changes.

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at [http://contributor-covenant.org/version/1/4][version]
## Documentation

[homepage]: http://contributor-covenant.org
[version]: http://contributor-covenant.org/version/1/4/
This repository contains only examples to be used with the Now platform. The [ZEIT Now Documentation](https://github.com/zeit/docs) is a separate repository. If you would like to contribute to the documentation, please read the [contributing guidelines](https://github.com/zeit/docs/blob/master/CONTRIBUTING.md) to find more information on doing so.

1 comment on commit bdc40cc

@now

This comment has been minimized.

Copy link

commented on bdc40cc Jul 19, 2019

Please sign in to comment.
You can’t perform that action at this time.