Skip to content

Commit 2b3da1a

Browse files
committed
feat: first commit
0 parents  commit 2b3da1a

29 files changed

+9848
-0
lines changed

.circleci/config.yml

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
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:latest
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:latest
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:latest
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 package.json package-lock.json
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+
- release:
83+
filters: *filter-only-master
84+
context: sem-rel-json-schema-tools
85+
requires:
86+
- test
87+
- build

.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

.eslintrc.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
module.exports = {
2+
root: true,
3+
parser: '@typescript-eslint/parser',
4+
plugins: [
5+
'@typescript-eslint',
6+
],
7+
extends: [
8+
'eslint:recommended',
9+
'plugin:@typescript-eslint/eslint-recommended',
10+
'plugin:@typescript-eslint/recommended',
11+
]
12+
};

.gitignore

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

.node-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
12.18.2

.releaserc

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
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+
"@semantic-release/npm",
11+
"@qiwi/semantic-release-gh-pages-plugin"
12+
],
13+
"verifyConditions": [
14+
"@semantic-release/changelog",
15+
"@semantic-release/npm",
16+
"@semantic-release/git",
17+
"@semantic-release/github",
18+
"@qiwi/semantic-release-gh-pages-plugin"
19+
],
20+
"publish": [
21+
"@semantic-release/github",
22+
{
23+
"path": "@qiwi/semantic-release-gh-pages-plugin",
24+
"msg": "github pages release",
25+
"src": "docs/",
26+
"branch": "gh-pages"
27+
},
28+
"@semantic-release/npm"
29+
],
30+
"success": [
31+
"@semantic-release/github"
32+
],
33+
"fail": [
34+
"@semantic-release/github"
35+
]
36+
}

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+
```

0 commit comments

Comments
 (0)