Skip to content

Commit 2497673

Browse files
committed
docs: add gatsby example
1 parent b18aa73 commit 2497673

File tree

21 files changed

+15126
-0
lines changed

21 files changed

+15126
-0
lines changed

examples/gatsby/.gitignore

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
8+
# Runtime data
9+
pids
10+
*.pid
11+
*.seed
12+
*.pid.lock
13+
14+
# Directory for instrumented libs generated by jscoverage/JSCover
15+
lib-cov
16+
17+
# Coverage directory used by tools like istanbul
18+
coverage
19+
20+
# nyc test coverage
21+
.nyc_output
22+
23+
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
24+
.grunt
25+
26+
# Bower dependency directory (https://bower.io/)
27+
bower_components
28+
29+
# node-waf configuration
30+
.lock-wscript
31+
32+
# Compiled binary addons (http://nodejs.org/api/addons.html)
33+
build/Release
34+
35+
# Dependency directories
36+
node_modules/
37+
jspm_packages/
38+
39+
# Typescript v1 declaration files
40+
typings/
41+
42+
# Optional npm cache directory
43+
.npm
44+
45+
# Optional eslint cache
46+
.eslintcache
47+
48+
# Optional REPL history
49+
.node_repl_history
50+
51+
# Output of 'npm pack'
52+
*.tgz
53+
54+
# dotenv environment variable files
55+
.env*
56+
57+
# gatsby files
58+
.cache/
59+
public
60+
61+
# Mac files
62+
.DS_Store
63+
64+
# Yarn
65+
yarn-error.log
66+
.pnp/
67+
.pnp.js
68+
# Yarn Integrity file
69+
.yarn-integrity

examples/gatsby/.prettierignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
.cache
2+
package.json
3+
package-lock.json
4+
public

examples/gatsby/.prettierrc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"arrowParens": "always",
3+
"semi": true,
4+
"useTabs": false,
5+
"printWidth": 80
6+
}

examples/gatsby/LICENSE

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
The BSD Zero Clause License (0BSD)
2+
3+
Copyright (c) 2020 Gatsby Inc.
4+
5+
Permission to use, copy, modify, and/or distribute this software for any
6+
purpose with or without fee is hereby granted.
7+
8+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
9+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
10+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
11+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
12+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
13+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
14+
PERFORMANCE OF THIS SOFTWARE.

examples/gatsby/gatsby-browser.js

Whitespace-only changes.

examples/gatsby/gatsby-config.js

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
module.exports = {
2+
siteMetadata: {
3+
title: `Gatsby Default Starter`,
4+
description: `Kick off your next, great Gatsby project with this default starter. This barebones starter ships with the main Gatsby configuration files you might need.`,
5+
author: `@gatsbyjs`,
6+
},
7+
plugins: [
8+
`gatsby-plugin-react-helmet`,
9+
{
10+
resolve: `gatsby-source-filesystem`,
11+
options: {
12+
name: `images`,
13+
path: `${__dirname}/src/images`,
14+
},
15+
},
16+
`gatsby-transformer-sharp`,
17+
`gatsby-plugin-sharp`,
18+
{
19+
resolve: `gatsby-plugin-manifest`,
20+
options: {
21+
name: `gatsby-starter-default`,
22+
short_name: `starter`,
23+
start_url: `/`,
24+
background_color: `#663399`,
25+
theme_color: `#663399`,
26+
display: `minimal-ui`,
27+
icon: `src/images/gatsby-icon.png`, // This path is relative to the root of the site.
28+
},
29+
},
30+
// this (optional) plugin enables Progressive Web App + Offline functionality
31+
// To learn more, visit: https://gatsby.dev/offline
32+
// `gatsby-plugin-offline`,
33+
],
34+
};

examples/gatsby/gatsby-node.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
/**
2+
* Implement Gatsby's Node APIs in this file.
3+
*
4+
* See: https://www.gatsbyjs.com/docs/node-apis/
5+
*/
6+
7+
// You can delete this file if you're not using it

examples/gatsby/gatsby-ssr.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
/**
2+
* Implement Gatsby's SSR (Server Side Rendering) APIs in this file.
3+
*
4+
* See: https://www.gatsbyjs.com/docs/ssr-apis/
5+
*/
6+
7+
// You can delete this file if you're not using it

examples/gatsby/package.json

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
{
2+
"name": "gatsby-starter-default",
3+
"private": true,
4+
"description": "A simple starter to get up and developing quickly with Gatsby",
5+
"version": "0.1.0",
6+
"author": "Kyle Mathews <[email protected]>",
7+
"dependencies": {
8+
"gatsby": "^2.26.1",
9+
"gatsby-image": "^2.5.0",
10+
"gatsby-plugin-manifest": "^2.6.1",
11+
"gatsby-plugin-offline": "^3.4.0",
12+
"gatsby-plugin-react-helmet": "^3.4.0",
13+
"gatsby-plugin-sharp": "^2.8.0",
14+
"gatsby-source-filesystem": "^2.5.0",
15+
"gatsby-transformer-sharp": "^2.6.0",
16+
"prop-types": "^15.7.2",
17+
"react": "^16.12.0",
18+
"react-dom": "^16.12.0",
19+
"react-helmet": "^6.1.0",
20+
"react-use-wizard": "^0.2.0"
21+
},
22+
"devDependencies": {
23+
"prettier": "2.1.2"
24+
},
25+
"keywords": [
26+
"gatsby"
27+
],
28+
"license": "0BSD",
29+
"scripts": {
30+
"build": "gatsby build",
31+
"develop": "gatsby develop",
32+
"format": "prettier --write \"**/*.{js,jsx,ts,tsx,json,md}\"",
33+
"start": "npm run develop",
34+
"serve": "gatsby serve",
35+
"clean": "gatsby clean",
36+
"test": "echo \"Write tests! -> https://gatsby.dev/unit-testing\" && exit 1"
37+
},
38+
"repository": {
39+
"type": "git",
40+
"url": "https://github.com/gatsbyjs/gatsby-starter-default"
41+
},
42+
"bugs": {
43+
"url": "https://github.com/gatsbyjs/gatsby/issues"
44+
}
45+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"container": {
3+
"port": 8000
4+
}
5+
}

0 commit comments

Comments
 (0)