Skip to content

Commit b1ea6db

Browse files
committed
0 parents  commit b1ea6db

30 files changed

+21053
-0
lines changed

.editorconfig

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# editorconfig.org
2+
3+
root = true
4+
5+
[*]
6+
indent_style = space
7+
indent_size = 2
8+
charset = utf-8
9+
trim_trailing_whitespace = true
10+
insert_final_newline = true
11+
12+
[*.py]
13+
indent_style = space
14+
indent_size = 4
15+
16+
[*.rb]
17+
indent_style = space
18+
indent_size = 4

.eslintrc

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"parser": "@typescript-eslint/parser",
3+
"extends": ["eslint-config-blvd/react", "prettier/@typescript-eslint", "prettier/react", "plugin:prettier/recommended"],
4+
"parserOptions": {
5+
"ecmaVersion": 2018,
6+
"sourceType": "module",
7+
"ecmaFeatures": {
8+
"jsx": true
9+
}
10+
},
11+
"settings": {
12+
"react": {
13+
"version": "detect"
14+
}
15+
},
16+
"rules": {
17+
"max-len": ["error", { "code": 140, "ignoreUrls": true }],
18+
"import/prefer-default-export": "off",
19+
"@typescript-eslint/explicit-function-return-type": "off",
20+
"react/no-unescaped-entities": [
21+
"error",
22+
{
23+
"forbid": [{ "char": ">", "alternatives": [">"] }, { "char": "}", "alternatives": ["}"] }]
24+
}
25+
]
26+
}
27+
}

.gitignore

Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
# =========================
2+
# Node.js-Specific Ignores
3+
# =========================
4+
5+
# Build directory
6+
public/
7+
8+
# Gatsby cache
9+
.cache/
10+
11+
# Logs
12+
logs
13+
*.log
14+
npm-debug.log*
15+
yarn-debug.log*
16+
yarn-error.log*
17+
18+
# Runtime data
19+
pids
20+
*.pid
21+
*.seed
22+
*.pid.lock
23+
24+
# Directory for instrumented libs generated by jscoverage/JSCover
25+
lib-cov
26+
27+
# Coverage directory used by tools like istanbul
28+
coverage
29+
30+
# nyc test coverage
31+
.nyc_output
32+
33+
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
34+
.grunt
35+
36+
# Bower dependency directory (https://bower.io/)
37+
bower_components
38+
39+
# node-waf configuration
40+
.lock-wscript
41+
42+
# Compiled binary addons (http://nodejs.org/api/addons.html)
43+
build/Release
44+
45+
# Dependency directories
46+
node_modules/
47+
jspm_packages/
48+
49+
# Typescript v1 declaration files
50+
typings/
51+
52+
# Optional npm cache directory
53+
.npm
54+
55+
# Optional eslint cache
56+
.eslintcache
57+
58+
# Optional REPL history
59+
.node_repl_history
60+
61+
# Output of 'npm pack'
62+
*.tgz
63+
64+
# Yarn Integrity file
65+
.yarn-integrity
66+
67+
# dotenv environment variables file
68+
.env
69+
70+
# =========================
71+
# Operating System Files
72+
# =========================
73+
74+
# OSX
75+
# =========================
76+
77+
.DS_Store
78+
.AppleDouble
79+
.LSOverride
80+
81+
# Thumbnails
82+
._*
83+
84+
# Files that might appear on external disk
85+
.Spotlight-V100
86+
.Trashes
87+
88+
# Directories potentially created on remote AFP share
89+
.AppleDB
90+
.AppleDesktop
91+
Network Trash Folder
92+
Temporary Items
93+
.apdisk
94+
95+
# Windows
96+
# =========================
97+
98+
# Windows image file caches
99+
Thumbs.db
100+
ehthumbs.db
101+
102+
# Folder config file
103+
Desktop.ini
104+
105+
# Recycle Bin used on file shares
106+
$RECYCLE.BIN/
107+
108+
# Windows Installer files
109+
*.cab
110+
*.msi
111+
*.msm
112+
*.msp
113+
114+
# Windows shortcuts
115+
*.lnk

.prettierrc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"semi": false,
3+
"tabWidth": 2,
4+
"printWidth": 140,
5+
"singleQuote": true,
6+
"trailingComma": "none"
7+
}

.vscode/settings.json

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"editor.tabSize": 2,
3+
"editor.insertSpaces": true,
4+
"editor.renderWhitespace": "boundary",
5+
"editor.rulers": [140],
6+
"editor.formatOnSave": true,
7+
"files.encoding": "utf8",
8+
"files.trimTrailingWhitespace": true,
9+
"files.insertFinalNewline": true,
10+
"search.exclude": {
11+
"public/**": true,
12+
"node_modules/**": true
13+
},
14+
"eslint.autoFixOnSave": true,
15+
"eslint.validate": [
16+
"javascript",
17+
"javascriptreact",
18+
{ "language": "typescript", "autoFix": true },
19+
{ "language": "typescriptreact", "autoFix": true }
20+
]
21+
}

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2018 Resi Respati
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in
13+
all copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21+
THE SOFTWARE.

README.md

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
<p align="center">
2+
<a href="https://www.gatsbyjs.org">
3+
<img alt="Gatsby" src="https://www.gatsbyjs.org/monogram.svg" width="60" />
4+
</a>
5+
</p>
6+
<h1 align="center">
7+
gatsby-starter-typescript-plus
8+
</h1>
9+
10+
> A starter kit for TypeScript-based Gatsby projects with sensible defaults.
11+
12+
This is a starter kit for [Gatsby.js](https://www.gatsbyjs.org/) websites written in TypeScript. It includes the bare essentials for you to get started (styling, Markdown parsing, minimal toolset).
13+
14+
## 🗒️ Features
15+
16+
- TypeScript
17+
- ESLint (with custom ESLint rules)
18+
- Markdown rendering with Remark
19+
- Basic component structure
20+
- Styling with [emotion](https://emotion.sh/)
21+
22+
## 🚀 Quick start
23+
24+
> A nodejs >= 6.0.0 setup with [yarn](https://yarnpkg.com/) is recommended.
25+
26+
1. **Create a Gatsby site.**
27+
28+
Install `gatsby-cli` package globally on your machine.
29+
30+
```bash
31+
# using NPM
32+
npm install -g gatsby-cli
33+
34+
# using YARN
35+
yarn global add gatsby-cli
36+
```
37+
38+
Use the `gatsby-cli` to create a new site and install its dependencies.
39+
40+
```bash
41+
gatsby new project-name https://github.com/resir014/gatsby-starter-typescript-plus
42+
```
43+
44+
2. **Start developing.**
45+
46+
Move to project's directory.
47+
48+
```bash
49+
cd project-name/
50+
```
51+
52+
Start your site.
53+
54+
```bash
55+
# using npm
56+
npm start
57+
58+
# using yarn
59+
yarn start
60+
```
61+
62+
Open source code using your favorite IDE/Text editor and navigate to `src/` directory, this is where your application live.
63+
64+
3. **Build your application for production.**
65+
66+
Once you're finished, you can make production build of your app using:
67+
68+
```bash
69+
# using npm
70+
npm run build
71+
72+
# using yarn
73+
yarn build
74+
```
75+
76+
4. **Deploy your app to Github pages!**
77+
78+
After building your application in step 3, you're ready to publish your app and go online!
79+
80+
```bash
81+
# using npm
82+
npm run deploy
83+
84+
# using yarn
85+
yarn deploy
86+
```
87+
88+
## ❤️ Credits
89+
90+
Built with [Gatsby](https://www.gatsbyjs.org/) - the blazing-fast static site generator for [React](https://facebook.github.io/react/).
91+
92+
## 💫 Deploy
93+
94+
[![Deploy to Netlify](https://www.netlify.com/img/deploy/button.svg)](https://app.netlify.com/start/deploy?repository=https://github.com/resir014/gatsby-starter-typescript-plus)

gatsby-browser.js

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

gatsby-config.js

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
'use strict'
2+
3+
module.exports = {
4+
siteMetadata: {
5+
title: 'gatsby-starter-typescript-plus',
6+
description: 'A starter kit for TypeScript-based Gatsby projects with sensible defaults.',
7+
keywords: 'gatsbyjs, gatsby, javascript, sample, something',
8+
siteUrl: 'https://gatsby-starter-typescript-plus.netlify.com',
9+
author: {
10+
name: 'Resi Respati',
11+
url: 'https://twitter.com/resir014',
12+
email: 'resir014@gmail.com'
13+
}
14+
},
15+
plugins: [
16+
{
17+
resolve: 'gatsby-source-filesystem',
18+
options: {
19+
name: 'content',
20+
path: `${__dirname}/src/content`
21+
}
22+
},
23+
{
24+
resolve: 'gatsby-transformer-remark',
25+
options: {
26+
plugins: [
27+
{
28+
resolve: 'gatsby-remark-responsive-iframe',
29+
options: {
30+
wrapperStyle: 'margin-bottom: 1rem'
31+
}
32+
},
33+
'gatsby-remark-prismjs',
34+
'gatsby-remark-copy-linked-files',
35+
'gatsby-remark-smartypants',
36+
{
37+
resolve: 'gatsby-remark-images',
38+
options: {
39+
maxWidth: 1140,
40+
quality: 90,
41+
linkImagesToOriginal: false
42+
}
43+
}
44+
]
45+
}
46+
},
47+
'gatsby-transformer-json',
48+
{
49+
resolve: 'gatsby-plugin-canonical-urls',
50+
options: {
51+
siteUrl: 'https://gatsby-starter-typescript-plus.netlify.com'
52+
}
53+
},
54+
'gatsby-plugin-emotion',
55+
'gatsby-plugin-typescript',
56+
'gatsby-plugin-sharp',
57+
'gatsby-transformer-sharp',
58+
'gatsby-plugin-react-helmet'
59+
]
60+
}

0 commit comments

Comments
 (0)