Skip to content

Commit f4f7e92

Browse files
committed
feat: integrate Yalc
1 parent be548e8 commit f4f7e92

32 files changed

Lines changed: 11413 additions & 9005 deletions

.github/workflows/ci.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,22 @@ jobs:
4242
run: |
4343
cd packages/gatsby-theme-minimal
4444
npm ci
45+
- name: Test [packages/gatsby-theme-minimal]
46+
run: |
47+
cd packages/gatsby-theme-minimal
48+
npm test
49+
- name: Yalc Publish [packages/gatsby-theme-minimal]
50+
run: |
51+
cd packages/gatsby-theme-minimal
52+
npx yalc publish
53+
- name: Add Yalc Dependencies [examples/gatsby-starter-testing]
54+
run: |
55+
cd examples/gatsby-starter-testing
56+
npx yalc add gatsby-theme-minimal
4557
- name: Install Dependencies [examples/gatsby-starter-testing]
4658
run: |
4759
cd examples/gatsby-starter-testing
48-
npm ci
60+
npm install --force
4961
- name: Test [examples/gatsby-starter-testing]
5062
run: |
5163
cd examples/gatsby-starter-testing

README.md

Lines changed: 61 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@
3535

3636
## Installation
3737

38+
### Install dependencies
39+
40+
Navigate to repository root path and execute following:
41+
3842
```shell
3943
npm ci
4044

@@ -45,9 +49,65 @@ cd ../../examples/gatsby-starter-testing
4549
npm ci
4650
```
4751

52+
### Initialise [Yalc](https://github.com/wclr/yalc)
53+
54+
Navigate to repository root path and execute following:
55+
56+
- Navigate to `gatsby-theme-minimal` package and publish `gatsby-theme-minimal` package to local Yalc repository:
57+
58+
```shell
59+
cd packages/gatsby-theme-minimal
60+
npx yalc publish
61+
```
62+
63+
- Navigate to `gatsby-starter-testing` example and add `gatsby-theme-minimal` package dependency:
64+
65+
```shell
66+
cd ../../examples/gatsby-starter-testing
67+
npx yalc add gatsby-theme-minimal
68+
npm install
69+
```
70+
71+
## Update gatsby-theme-minimal changes
72+
73+
Once `gatsby-theme-minimal` package is changed and you would like to test it in `gatsby-starter-testing` example,
74+
you will need to update the dependencies and Yalc configuration.
75+
<br />
76+
Navigate to `gatsby-theme-minimal` package from the repository root path and publish `gatsby-theme-minimal` package with `--push` flag:
77+
78+
```shell
79+
cd packages/gatsby-theme-minimal
80+
npx yalc publish --push
81+
```
82+
83+
You can use `npx yalc push` shortcut instead of `npx yalc publish --push`.
84+
<br />
85+
86+
If `gatsby-theme-minimal` package changed its own dependencies you will need to execute `npm install` as well in the examples/gatsby-starter-testing:
87+
88+
```shell
89+
cd ../../examples/gatsby-starter-testing
90+
npm install --force
91+
```
92+
4893
## Directory structure
4994

50-
TODO
95+
### packages/gatsby-theme-minimal
96+
97+
The Gatsby theme is located in `packages/gatsby-theme-minimal` and it is used in the example app.
98+
99+
### examples/gatsby-starter-testing
100+
101+
The example Gatsby app which is using the Gatsby theme is located in `examples/gatsby-starter-testing`.
102+
103+
This example app is based on [Gatsby Testing Starter](https://github.com/DanailMinchev/gatsby-starter-testing) and
104+
it has configured `packages/gatsby-theme-minimal` dependency using Yalc.
105+
106+
The `packages/gatsby-theme-minimal` dependency is stored in `.yalc` directory and it is managed by Yalc using `yalc.lock` file.
107+
108+
## GitHub Actions CI pipeline
109+
110+
This repostiory is intergared with GitHub Actions and has CI pipeline defined in [.github/workflows/ci.yml](.github/workflows/ci.yml).
51111

52112
## Repository configuration
53113

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Auto detect text files and perform LF normalization
2+
* text=auto
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
v16.1.0
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
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
70+
71+
# JetBrains
72+
.idea
73+
74+
# Cypress files
75+
cypress/videos
76+
cypress/screenshots
77+
78+
# Storybook files
79+
storybook-static
80+
81+
# Storybook and jest-image-snapshot files
82+
__diff_output__
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"arrowParens": "avoid",
3+
"semi": false
4+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"preset": "conventionalcommits"
3+
}
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
In the interest of fostering an open and welcoming environment, we as
6+
contributors and maintainers pledge to making participation in our project and
7+
our community a harassment-free experience for everyone, regardless of age, body
8+
size, disability, ethnicity, sex characteristics, gender identity and expression,
9+
level of experience, education, socio-economic status, nationality, personal
10+
appearance, race, religion, or sexual identity and orientation.
11+
12+
## Our Standards
13+
14+
Examples of behavior that contributes to creating a positive environment
15+
include:
16+
17+
- Using welcoming and inclusive language
18+
- Being respectful of differing viewpoints and experiences
19+
- Gracefully accepting constructive criticism
20+
- Focusing on what is best for the community
21+
- Showing empathy towards other community members
22+
23+
Examples of unacceptable behavior by participants include:
24+
25+
- The use of sexualized language or imagery and unwelcome sexual attention or
26+
advances
27+
- Trolling, insulting/derogatory comments, and personal or political attacks
28+
- Public or private harassment
29+
- Publishing others' private information, such as a physical or electronic
30+
address, without explicit permission
31+
- Other conduct which could reasonably be considered inappropriate in a
32+
professional setting
33+
34+
## Our Responsibilities
35+
36+
Project maintainers are responsible for clarifying the standards of acceptable
37+
behavior and are expected to take appropriate and fair corrective action in
38+
response to any instances of unacceptable behavior.
39+
40+
Project maintainers have the right and responsibility to remove, edit, or
41+
reject comments, commits, code, wiki edits, issues, and other contributions
42+
that are not aligned to this Code of Conduct, or to ban temporarily or
43+
permanently any contributor for other behaviors that they deem inappropriate,
44+
threatening, offensive, or harmful.
45+
46+
## Scope
47+
48+
This Code of Conduct applies both within project spaces and in public spaces
49+
when an individual is representing the project or its community. Examples of
50+
representing a project or community include using an official project e-mail
51+
address, posting via an official social media account, or acting as an appointed
52+
representative at an online or offline event. Representation of a project may be
53+
further defined and clarified by project maintainers.
54+
55+
## Enforcement
56+
57+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
58+
reported by contacting the project team at danail.dev@gmail.com. All
59+
complaints will be reviewed and investigated and will result in a response that
60+
is deemed necessary and appropriate to the circumstances. The project team is
61+
obligated to maintain confidentiality with regard to the reporter of an incident.
62+
Further details of specific enforcement policies may be posted separately.
63+
64+
Project maintainers who do not follow or enforce the Code of Conduct in good
65+
faith may face temporary or permanent repercussions as determined by other
66+
members of the project's leadership.
67+
68+
## Attribution
69+
70+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71+
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
72+
73+
[homepage]: https://www.contributor-covenant.org
74+
75+
For answers to common questions about this code of conduct, see
76+
https://www.contributor-covenant.org/faq
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Contributing
2+
3+
Please note that this project is released with a [Contributor Code of Conduct](CODE_OF_CONDUCT.md).
4+
By participating in this project you agree to abide by its terms.
5+
6+
---
7+
8+
Ensure your pull request adheres to the following guidelines:
9+
10+
- Search previous suggestions before making a new one, as yours may be a duplicate.
11+
- Make an individual pull request for each suggestion.
12+
- Check your spelling and grammar.
13+
- The pull request and commit should have a useful title.
14+
- The commit messages must be compatible with [Conventional Commits](https://www.conventionalcommits.org/) specification.
15+
16+
## Updating your Pull Request
17+
18+
A lot of times, making a PR adhere to the standards above can be difficult.
19+
If the maintainers notice anything that we'd like changed, we'll ask you to edit your PR before we merge it.
20+
There's no need to open a new PR, just edit the existing one.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) Danail Minchev
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 all
13+
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 THE
21+
SOFTWARE.

0 commit comments

Comments
 (0)