Skip to content

Commit 4defe5e

Browse files
authored
Merge pull request #26 from Shopify/make-repo-public
needed docs for making a repo public
2 parents b1011cf + 51d9888 commit 4defe5e

6 files changed

Lines changed: 329 additions & 24 deletions

File tree

.github/workflows/cla.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# .github/workflows/cla.yml
2+
name: Contributor License Agreement (CLA)
3+
4+
on:
5+
pull_request_target:
6+
types: [opened, synchronize]
7+
issue_comment:
8+
types: [created]
9+
10+
jobs:
11+
cla:
12+
runs-on: ubuntu-latest
13+
if: |
14+
(github.event.issue.pull_request
15+
&& !github.event.issue.pull_request.merged_at
16+
&& contains(github.event.comment.body, 'signed')
17+
)
18+
|| (github.event.pull_request && !github.event.pull_request.merged)
19+
steps:
20+
- uses: Shopify/shopify-cla-action@v1
21+
with:
22+
github-token: ${{ secrets.GITHUB_TOKEN }}
23+
cla-token: ${{ secrets.CLA_TOKEN }}

.gitignore

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,49 @@ build
33
.DS_Store
44
.eslintcache
55
*.tsbuildinfo
6+
7+
# Shopify specific
8+
.shopify
9+
.shopify-cache
10+
*.shopify.yml
11+
12+
# Environment variables
13+
.env
14+
.env.local
15+
.env.*.local
16+
17+
# IDE files
18+
.vscode/
19+
.idea/
20+
*.swp
21+
*.swo
22+
*~
23+
24+
# Logs
25+
logs
26+
*.log
27+
npm-debug.log*
28+
yarn-debug.log*
29+
yarn-error.log*
30+
31+
# Dependencies
32+
/vendor/
33+
bower_components/
34+
35+
# Testing
36+
coverage/
37+
.nyc_output
38+
39+
# Production
40+
dist/
41+
out/
42+
43+
# Misc
44+
.cache
45+
.temp
46+
.tmp
47+
*.bak
48+
*.orig
49+
50+
# OS files
51+
Thumbs.db

CODE_OF_CONDUCT.md

Lines changed: 134 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,134 @@
1+
2+
# Contributor Covenant Code of Conduct
3+
4+
## Our Pledge
5+
6+
We as members, contributors, and leaders pledge to make participation in our
7+
community a harassment-free experience for everyone, regardless of age, body
8+
size, visible or invisible disability, ethnicity, sex characteristics, gender
9+
identity and expression, level of experience, education, socio-economic status,
10+
nationality, personal appearance, race, caste, color, religion, or sexual
11+
identity and orientation.
12+
13+
We pledge to act and interact in ways that contribute to an open, welcoming,
14+
diverse, inclusive, and healthy community.
15+
16+
## Our Standards
17+
18+
Examples of behavior that contributes to a positive environment for our
19+
community include:
20+
21+
* Demonstrating empathy and kindness toward other people
22+
* Being respectful of differing opinions, viewpoints, and experiences
23+
* Giving and gracefully accepting constructive feedback
24+
* Accepting responsibility and apologizing to those affected by our mistakes,
25+
and learning from the experience
26+
* Focusing on what is best not just for us as individuals, but for the overall
27+
community
28+
29+
Examples of unacceptable behavior include:
30+
31+
* The use of sexualized language or imagery, and sexual attention or advances of
32+
any kind
33+
* Trolling, insulting or derogatory comments, and personal or political attacks
34+
* Public or private harassment
35+
* Publishing others' private information, such as a physical or email address,
36+
without their explicit permission
37+
* Other conduct which could reasonably be considered inappropriate in a
38+
professional setting
39+
40+
## Enforcement Responsibilities
41+
42+
Community leaders are responsible for clarifying and enforcing our standards of
43+
acceptable behavior and will take appropriate and fair corrective action in
44+
response to any behavior that they deem inappropriate, threatening, offensive,
45+
or harmful.
46+
47+
Community leaders have the right and responsibility to remove, edit, or reject
48+
comments, commits, code, wiki edits, issues, and other contributions that are
49+
not aligned to this Code of Conduct, and will communicate reasons for moderation
50+
decisions when appropriate.
51+
52+
## Scope
53+
54+
This Code of Conduct applies within all community spaces, and also applies when
55+
an individual is officially representing the community in public spaces.
56+
Examples of representing our community include using an official email address,
57+
posting via an official social media account, or acting as an appointed
58+
representative at an online or offline event.
59+
60+
## Enforcement
61+
62+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
63+
reported to the community leaders responsible for enforcement at
64+
opensource@shopify.com.
65+
All complaints will be reviewed and investigated promptly and fairly.
66+
67+
All community leaders are obligated to respect the privacy and security of the
68+
reporter of any incident.
69+
70+
## Enforcement Guidelines
71+
72+
Community leaders will follow these Community Impact Guidelines in determining
73+
the consequences for any action they deem in violation of this Code of Conduct:
74+
75+
### 1. Correction
76+
77+
**Community Impact**: Use of inappropriate language or other behavior deemed
78+
unprofessional or unwelcome in the community.
79+
80+
**Consequence**: A private, written warning from community leaders, providing
81+
clarity around the nature of the violation and an explanation of why the
82+
behavior was inappropriate. A public apology may be requested.
83+
84+
### 2. Warning
85+
86+
**Community Impact**: A violation through a single incident or series of
87+
actions.
88+
89+
**Consequence**: A warning with consequences for continued behavior. No
90+
interaction with the people involved, including unsolicited interaction with
91+
those enforcing the Code of Conduct, for a specified period of time. This
92+
includes avoiding interactions in community spaces as well as external channels
93+
like social media. Violating these terms may lead to a temporary or permanent
94+
ban.
95+
96+
### 3. Temporary Ban
97+
98+
**Community Impact**: A serious violation of community standards, including
99+
sustained inappropriate behavior.
100+
101+
**Consequence**: A temporary ban from any sort of interaction or public
102+
communication with the community for a specified period of time. No public or
103+
private interaction with the people involved, including unsolicited interaction
104+
with those enforcing the Code of Conduct, is allowed during this period.
105+
Violating these terms may lead to a permanent ban.
106+
107+
### 4. Permanent Ban
108+
109+
**Community Impact**: Demonstrating a pattern of violation of community
110+
standards, including sustained inappropriate behavior, harassment of an
111+
individual, or aggression toward or disparagement of classes of individuals.
112+
113+
**Consequence**: A permanent ban from any sort of public interaction within the
114+
community.
115+
116+
## Attribution
117+
118+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
119+
version 2.1, available at
120+
[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
121+
122+
Community Impact Guidelines were inspired by
123+
[Mozilla's code of conduct enforcement ladder][Mozilla CoC].
124+
125+
For answers to common questions about this code of conduct, see the FAQ at
126+
[https://www.contributor-covenant.org/faq][FAQ]. Translations are available at
127+
[https://www.contributor-covenant.org/translations][translations].
128+
129+
[homepage]: https://www.contributor-covenant.org
130+
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
131+
[Mozilla CoC]: https://github.com/mozilla/diversity
132+
[FAQ]: https://www.contributor-covenant.org/faq
133+
[translations]: https://www.contributor-covenant.org/translations
134+

CONTRIBUTING.md

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# Contributing to Shop Minis Examples
2+
3+
We welcome contributions to the Shop Minis Examples repository! This document provides guidelines for contributing to the project.
4+
5+
## Getting Started
6+
7+
1. Fork the repository
8+
2. Clone your fork locally
9+
3. Create a new branch for your feature or bug fix
10+
4. Make your changes
11+
5. Test your changes thoroughly
12+
6. Commit your changes with clear, descriptive commit messages
13+
7. Push your branch to your fork
14+
8. Submit a pull request
15+
16+
## Code of Conduct
17+
18+
Please note that this project is released with a [Contributor Code of Conduct](CODE_OF_CONDUCT.md). By participating in this project you agree to abide by its terms.
19+
20+
## Pull Request Process
21+
22+
1. Ensure any install or build dependencies are removed before the end of the layer when doing a build.
23+
2. Update the README.md with details of changes to the interface, this includes new environment variables, exposed ports, useful file locations, and container parameters.
24+
3. Increase the version numbers in any examples files and the README.md to the new version that this Pull Request would represent.
25+
4. Your pull request will be reviewed by maintainers, who may request changes or provide feedback.
26+
27+
## Reporting Issues
28+
29+
If you find a bug or have a feature request, please create an issue in the GitHub repository. When reporting issues, please include:
30+
31+
- A clear and descriptive title
32+
- A detailed description of the issue or feature request
33+
- Steps to reproduce the issue (if applicable)
34+
- Expected behavior
35+
- Actual behavior
36+
- Screenshots (if applicable)
37+
- Your environment (OS, browser, etc.)
38+
39+
## Code Style
40+
41+
Please follow the existing code style in the repository. We recommend:
42+
43+
- Using clear and descriptive variable names
44+
- Adding comments for complex logic
45+
- Following the language-specific conventions for the examples
46+
- Keeping functions small and focused
47+
48+
## Testing
49+
50+
Please ensure that all examples are tested and working before submitting a pull request. Include:
51+
52+
- Unit tests where applicable
53+
- Integration tests for full examples
54+
- Documentation on how to run the tests
55+
56+
## Documentation
57+
58+
- Update documentation for any changed functionality
59+
- Add inline comments for complex code
60+
- Update the README if you're adding new examples
61+
62+
## Questions?
63+
64+
If you have any questions about contributing, please open an issue and tag it with the "question" label.
65+
66+
Thank you for contributing to Shop Minis Examples!

LICENSE.md

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

README.md

Lines changed: 53 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,67 @@
1-
## This repo is deprecated
1+
# Shop Minis Examples
22

3-
shop-minis-runtime was moved to the monorepo in https://github.com/shopify/shop-client/
4-
This repository is no longer used and maintained.
3+
This repository showcases examples of Shop Minis.
54

6-
# shop-minis-runtime
5+
## About
76

8-
shop-minis-runtime is responsible for guaranteeing that the context of Minis in development matches the context provided by Shop in production.
7+
Shop Minis are lightweight, fast-loading components that enable rich shopping experiences. This repository contains various examples demonstrating how to build and integrate Shop Minis into your applications.
98

10-
## Dependencies
9+
## Getting Started
1110

12-
Dependencies are provided by Shop itself during production runtime, however, that's not the case when the Mini is executed in a remote setup during development. In those cases, shop-minis-runtime will be the source of truth for which dependencies are available (and which versions they have).
11+
### Prerequisites
1312

14-
## React context values
13+
- Node.js (v16 or higher)
14+
- npm or yarn
1515

16-
React context values are also missing when the Mini is executed in development mode. shop-minis-runtime will expose provider components that mimic the production environment of Shop.
16+
### Installation
1717

18-
## Metro config
18+
1. Clone the repository:
19+
```bash
20+
git clone https://github.com/Shopify/shop-minis-examples.git
21+
cd shop-minis-examples
22+
```
1923

20-
To use the metro config exposed in this package you can use this example `metro.config.js` file:
24+
2. Install dependencies:
25+
```bash
26+
npm install
27+
```
2128

22-
```js
23-
// metro.config.js
24-
const { getMinisMetroConfig } = require("@shopify/shop-minis-runtime/metro-config");
29+
3. Run the examples:
30+
```bash
31+
npm start
32+
```
2533

26-
module.exports = getMinisMetroConfig();
27-
```
34+
## Examples
2835

29-
## Babel preset
36+
This repository includes examples for:
3037

31-
To use the babel preset exposed in this package you can use this example `babel.config.js` file:
38+
- Basic Shop Mini implementation
39+
- Advanced customization options
40+
- Integration patterns
41+
- Best practices for performance
3242

33-
```js
34-
// babel.config.js
35-
module.exports = {
36-
presets: ["@shopify/shop-minis-runtime/babel-preset"],
37-
};
38-
```
43+
## Contributing
44+
45+
We welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md) for details on how to get started.
46+
47+
Before contributing, please read our [Code of Conduct](CODE_OF_CONDUCT.md).
48+
49+
## Support
50+
51+
If you encounter any issues or have questions, please:
52+
53+
1. Check the existing issues in the repository
54+
2. Create a new issue if your problem hasn't been reported
55+
3. Reach out to the maintainers
56+
57+
## License
58+
59+
This project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details.
60+
61+
## Acknowledgments
62+
63+
Thank you to all contributors who help make Shop Minis better!
64+
65+
---
66+
67+
Copyright 2024-present, Shopify Inc.

0 commit comments

Comments
 (0)