Skip to content

Commit 6e5de36

Browse files
committed
feat: initial commit
0 parents  commit 6e5de36

33 files changed

Lines changed: 25119 additions & 0 deletions

.circleci/config.yml

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
version: 2
2+
3+
aliases:
4+
# -------------------------
5+
# ALIASES: Caches
6+
# -------------------------
7+
- &restore-deps-cache
8+
key: deps-cache-{{ checksum "package.json" }}
9+
10+
- &save-deps-cache
11+
key: deps-cache-{{ checksum "package.json" }}
12+
paths:
13+
- ~/project/node_modules
14+
15+
# -------------------------
16+
# ALIASES: Branch Filters
17+
# -------------------------
18+
- &filter-only-master
19+
branches:
20+
only: master
21+
- &filter-only-semantic-pr
22+
branches:
23+
only: /^(pull|fix|feat|dependabot)\/.*$/
24+
25+
defaults: &defaults
26+
working_directory: ~/project
27+
28+
jobs:
29+
test:
30+
<<: *defaults
31+
docker:
32+
- image: circleci/node:10
33+
steps:
34+
- checkout
35+
- restore_cache: *restore-deps-cache
36+
- run: npm install
37+
- run: npm install codecov
38+
- run: npm test
39+
- run: ./node_modules/.bin/codecov
40+
- save_cache: *save-deps-cache
41+
42+
build:
43+
<<: *defaults
44+
docker:
45+
- image: circleci/node:10
46+
steps:
47+
- checkout
48+
- restore_cache: *restore-deps-cache
49+
- run: npm install
50+
- run: npm run build
51+
- save_cache: *save-deps-cache
52+
53+
release:
54+
<<: *defaults
55+
docker:
56+
- image: circleci/node:10
57+
steps:
58+
- checkout
59+
- restore_cache: *restore-deps-cache
60+
- run: npm install
61+
- run: npm run build
62+
- run: npm install semantic-release @semantic-release/changelog @semantic-release/git @semantic-release/github @semantic-release/npm @semantic-release/commit-analyzer @semantic-release/release-notes-generator @qiwi/semantic-release-gh-pages-plugin
63+
- run: git checkout .
64+
- run: ./node_modules/.bin/semantic-release
65+
- save_cache: *save-deps-cache
66+
67+
workflows:
68+
version: 2
69+
analysis:
70+
jobs:
71+
- test:
72+
filters: *filter-only-semantic-pr
73+
- build:
74+
filters: *filter-only-semantic-pr
75+
76+
release:
77+
jobs:
78+
- test:
79+
filters: *filter-only-master
80+
- build:
81+
filters: *filter-only-master
82+
- hold:
83+
filters: *filter-only-master
84+
type: approval
85+
requires:
86+
- test
87+
- build
88+
- release:
89+
filters: *filter-only-master
90+
requires:
91+
- hold

.editorconfig

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# EditorConfig is awesome: http://EditorConfig.org
2+
3+
# top-most EditorConfig file
4+
root = true
5+
6+
# Unix-style newlines with a newline ending every file
7+
[*]
8+
indent_style = space
9+
indent_size = 2
10+
tab_width = 2
11+
end_of_line = lf
12+
charset = utf-8
13+
trim_trailing_whitespace = true
14+
insert_final_newline = true
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Describe the bug**
11+
A clear and concise description of what the bug is.
12+
13+
**To Reproduce**
14+
Steps to reproduce the behavior:
15+
1. Go to '...'
16+
2. Click on '....'
17+
3. Scroll down to '....'
18+
4. See error
19+
20+
**Expected behavior**
21+
A clear and concise description of what you expected to happen.
22+
23+
**Screenshots**
24+
If applicable, add screenshots to help explain your problem.
25+
26+
**Desktop (please complete the following information):**
27+
- OS: [e.g. iOS]
28+
- Browser [e.g. chrome, safari]
29+
- Version [e.g. 22]
30+
31+
**Smartphone (please complete the following information):**
32+
- Device: [e.g. iPhone6]
33+
- OS: [e.g. iOS8.1]
34+
- Browser [e.g. stock browser, safari]
35+
- Version [e.g. 22]
36+
37+
**Additional context**
38+
Add any other context about the problem here.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Is your feature request related to a problem? Please describe.**
11+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12+
13+
**Describe the solution you'd like**
14+
A clear and concise description of what you want to happen.
15+
16+
**Describe alternatives you've considered**
17+
A clear and concise description of any alternative solutions or features you've considered.
18+
19+
**Additional context**
20+
Add any other context or screenshots about the feature request here.

.gitignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
node_modules
2+
coverage
3+
build
4+
docs
5+
.DS_Store
6+
dist
7+
/**/build
8+
*.tgz

.releaserc

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"tagFormat": "${version}",
3+
"branch": "master",
4+
"plugins": [
5+
"@semantic-release/commit-analyzer",
6+
"@semantic-release/release-notes-generator",
7+
"@semantic-release/changelog",
8+
"@semantic-release/github",
9+
"@semantic-release/git",
10+
],
11+
"verifyConditions": [
12+
"@semantic-release/changelog",
13+
"@semantic-release/git",
14+
"@semantic-release/github",
15+
"@qiwi/semantic-release-gh-pages-plugin"
16+
],
17+
"publish": [
18+
"@semantic-release/github",
19+
{
20+
"path": "@qiwi/semantic-release-gh-pages-plugin",
21+
"msg": "github pages release",
22+
"src": "build/",
23+
"branch": "gh-pages"
24+
}
25+
],
26+
"success": [
27+
"@semantic-release/github"
28+
],
29+
"fail": [
30+
"@semantic-release/github"
31+
]
32+
}

BUILDING.md

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
# Building
2+
3+
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in [BCP 14](https://tools.ietf.org/html/bcp14) [RFC2119](https://tools.ietf.org/html/rfc2119) [RFC8174](https://tools.ietf.org/html/rfc8174) when, and only when, they appear in all capitals, as shown here.
4+
5+
This document is licensed under [The Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0.html).
6+
7+
## Introduction
8+
9+
This document is to describe the functionality a project MUST provide in terms of creating build artifacts. It also describes the structure in which project's MUST write build artifacts in.
10+
11+
A project MUST provide:
12+
13+
- a folder name convention for build artifacts
14+
- a folder structure for the above-mentioned build artifacts folder
15+
- a list of targets
16+
- a file called `bin/build.{target}.{ext}` to target each of the build targets
17+
- a build pipeline given the above pretext
18+
19+
The purpose of having a uniform way of producing a build is that we may ALL produce builds for any of the projects, making the onramp for new developers less steep, while still maintaining an exceptionally high level of quality.
20+
21+
The projects should follow the 'architecture as code' principle - and should require a very minimal set of dependencies.
22+
23+
It is the responsibilty of the build tooling to write artifacts to the appropriate location as outlined in this specification.
24+
25+
## Build Folder Name
26+
27+
The cannonical folder for builds SHALL be named `build` and be located at the root of the project repository.
28+
Each project MUST `git ignore` the `build` folder.
29+
30+
## Build Folder Structure
31+
32+
Files and folder names MUST be lowercase.
33+
The result of the build process should create a folder structure as follows:
34+
35+
```
36+
.
37+
└── build
38+
└── {target}
39+
└── {project-name}.{ext}
40+
```
41+
42+
43+
Below is an example:
44+
```
45+
.
46+
└── build
47+
└── windows
48+
└── my-build.exe
49+
```
50+
51+
## Build Targets
52+
53+
Below is a list of suggested targets for a project
54+
1. windows
55+
2. linux
56+
3. macos
57+
58+
## Build script
59+
60+
Each release target MUST have a `bin/build.{target}.{ext}` file.
61+
62+
The result of this is that every project MUST produce a build for each target when the following command is invoked:
63+
64+
```
65+
bin/build.{target}.{ext}
66+
```
67+
68+
The file MUST be placed in the project's `bin` directory.
69+
70+
## Build Pipeline
71+
72+
### Building targets
73+
74+
`bin/build.{target}.{ext}` should create builds for each of the targets, and place the build artifacts in a folder structure outlined above.
75+
76+
### Windows
77+
78+
```
79+
bin/build.windows.bat
80+
```
81+
82+
### Linux
83+
84+
```
85+
bin/build.linux.sh
86+
```
87+
88+
### Macos
89+
90+
```
91+
bin/build.macos.sh
92+
```

CHANGELOG.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
## [1.0.2](https://github.com/etclabscore/pristine-typescript-react/compare/1.0.1...1.0.2) (2019-07-02)
2+
3+
4+
### Bug Fixes
5+
6+
* add homepage to fix gh-pages ([dcb2099](https://github.com/etclabscore/pristine-typescript-react/commit/dcb2099))
7+
8+
## [1.0.1](https://github.com/etclabscore/pristine-typescript-react/compare/1.0.0...1.0.1) (2019-07-02)
9+
10+
11+
### Bug Fixes
12+
13+
* **.releaserc:** remove npm publish ([2ee1fce](https://github.com/etclabscore/pristine-typescript-react/commit/2ee1fce))
14+
15+
# 1.0.0 (2019-07-02)
16+
17+
18+
### Bug Fixes
19+
20+
* **jest:** use passWithNoTests ([f7fdd6c](https://github.com/etclabscore/pristine-typescript-react/commit/f7fdd6c))
21+
22+
23+
### Features
24+
25+
* initial commit ([2cf2f38](https://github.com/etclabscore/pristine-typescript-react/commit/2cf2f38))

CIRCLECI.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# CircleCI
2+
3+
## Deploying
4+
5+
Deploy by signing into [circleci.com](http://circleci.com/) with github. Add and set up your project.
6+
7+
You can add your github token by clicking on a projects `settings` icon and going to `Environment Variables` and adding:
8+
9+
### `GH_TOKEN`
10+
`
11+
[create a personal access token for a public github here](https://github.com/settings/tokens/new?scopes=public_repo).
12+
13+
When creating the token, the minimum required scopes are:
14+
15+
- repo for a private repository
16+
- public_repo for a public repository
17+
18+
## HOLD
19+
20+
Once set up properly it will be building a `workflow` that puts your `release` job `ON HOLD` until manually approved. This lets you batch up fixes and features into 1 release and still have the convenience of a 1 button deploy.
21+
22+
## Github Releases
23+
On successfull release, it will create release notes and a new release and publish to github and github pages.
24+
25+
## Github Pages
26+
27+
You can view your deployed react site at the `homepage` url required to be changed in the `package.json` mentioned in the [README.md](README.md)

0 commit comments

Comments
 (0)