Skip to content

Commit f9647e1

Browse files
authored
chore: oss compliance (#38)
Co-authored-by: Brian Buchanan <bpbuch@gmail.com>
1 parent c0ec1f7 commit f9647e1

2 files changed

Lines changed: 148 additions & 1 deletion

File tree

CONTRIBUTING.md

Lines changed: 147 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,147 @@
1+
# Contributing Guide For plugin-app-dev
2+
3+
This page lists the operational governance model of this project, as well as the recommendations and requirements for how to best contribute to plugin-app-dev. We strive to obey these as best as possible. As always, thanks for contributing – we hope these guidelines make it easier and shed some light on our approach and processes.
4+
5+
# Governance Model
6+
7+
## Salesforce Sponsored
8+
9+
The intent and goal of open sourcing this project is to increase the contributor and user base. However, only Salesforce employees will be given `admin` rights and will be the final arbiters of what contributions are accepted or not.
10+
11+
# Getting started
12+
13+
Please join the community on the [Salesforce Trailblazer Community](https://trailhead.salesforce.com/trailblazer-community/groups). Also please make sure to review the [Salesforce CLI documentation](https://developer.salesforce.com/docs/atlas.en-us.sfdx_cli_reference.meta/sfdx_cli_reference/cli_reference.htm).
14+
15+
# Issues, requests & ideas
16+
17+
Use GitHub Issues page to submit issues, enhancement requests and discuss ideas.
18+
19+
### Bug Reports and Fixes
20+
21+
- If you find a bug, please search for it in the [Issues](https://github.com/salesforcecli/plugin-app-dev/issues), and if it isn't already tracked,
22+
[create a new issue](https://github.com/salesforcecli/plugin-app-dev/issues/new). Fill out the "Bug Report" section of the issue template. Even if an Issue is closed, feel free to comment and add details, it will still
23+
be reviewed.
24+
- Issues that have already been identified as a bug (note: able to reproduce) will be labelled `bug`.
25+
- If you'd like to submit a fix for a bug, [send a Pull Request](#creating_a_pull_request) and mention the Issue number.
26+
- Include tests that isolate the bug and verifies that it was fixed.
27+
28+
### New Features
29+
30+
- If you'd like to add new functionality to this project, describe the problem you want to solve in a [new Issue](https://github.com/salesforcecli/plugin-app-dev/issues/new).
31+
- Issues that have been identified as a feature request will be labelled `enhancement`.
32+
- If you'd like to implement the new feature, please wait for feedback from the project
33+
maintainers before spending too much time writing the code. In some cases, `enhancement`s may
34+
not align well with the project objectives at the time.
35+
36+
### Tests, Documentation, Miscellaneous
37+
38+
- If you'd like to improve the tests, you want to make the documentation clearer, you have an
39+
alternative implementation of something that may have advantages over the way its currently
40+
done, or you have any other change, we would be happy to hear about it!
41+
- If its a trivial change, go ahead and [send a Pull Request](#creating_a_pull_request) with the changes you have in mind.
42+
- If not, [open an Issue](https://github.com/salesforcecli/plugin-app-dev/issues/new) to discuss the idea first.
43+
44+
If you're new to our project and looking for some way to make your first contribution, look for
45+
Issues labelled `good first contribution`.
46+
47+
# Contribution Checklist
48+
49+
- [x] Clean, simple, well styled code
50+
- [x] Commits should be atomic and messages must be descriptive. Related issues should be mentioned by Issue number.
51+
- [x] Comments
52+
- Module-level & function-level comments.
53+
- Comments on complex blocks of code or algorithms (include references to sources).
54+
- [x] Tests
55+
- The test suite must be complete and pass
56+
- Increase code coverage, not versa.
57+
- Try to achieve at least 95% code coverage on any new code.
58+
- [x] Dependencies
59+
- Minimize number of dependencies.
60+
- Prefer Apache 2.0, BSD3, MIT, ISC and MPL licenses.
61+
- [x] Reviews
62+
- Changes must be approved via peer code review
63+
64+
# Creating a Pull Request
65+
66+
1. **Ensure the bug/feature was not already reported** by searching on GitHub under Issues. If none exists, create a new issue so that other contributors can keep track of what you are trying to add/fix and offer suggestions (or let you know if there is already an effort in progress).
67+
2. **Fork** this repository.
68+
3. **Clone** the forked repo to your machine.
69+
4. **Create** a new branch to contain your work (e.g. `git checkout -b fix-issue-11`)
70+
5. **Make your changes** and commit them with descriptive messages.
71+
6. **Build and test** your changes locally:
72+
```bash
73+
yarn && yarn build
74+
yarn test
75+
```
76+
7. **Push** your work back up to your fork. (e.g. `git push origin fix-issue-11`)
77+
8. **Submit** a Pull Request against the `main` branch and refer to the issue(s) you are fixing. Try not to pollute your pull request with unintended changes. Keep it simple and small.
78+
9. **Sign** the Salesforce CLA (you will be prompted to do so when submitting the Pull Request)
79+
80+
> **NOTE**: Be sure to [sync your fork](https://help.github.com/articles/syncing-a-fork/) before making a pull request.
81+
82+
# Building the Plugin
83+
84+
To build the plugin locally, make sure to have [Node.js](https://nodejs.org/) (>=18.0.0) and [Yarn](https://yarnpkg.com/) installed and run the following commands:
85+
86+
```bash
87+
# Clone the repository
88+
git clone git@github.com:salesforcecli/plugin-app-dev.git
89+
cd plugin-app-dev
90+
91+
# Install the dependencies and compile
92+
yarn && yarn build
93+
```
94+
95+
To use your plugin, run using the local `./bin/dev` or `./bin/dev.cmd` file.
96+
97+
```bash
98+
# Run using local run file
99+
./bin/dev webapp dev --help
100+
```
101+
102+
There should be no differences when running via the Salesforce CLI or using the local run file. However, it can be useful to link the plugin to do some additional testing or run your commands from anywhere on your machine.
103+
104+
```bash
105+
# Link your plugin to the sf cli
106+
sf plugins link .
107+
# To verify
108+
sf plugins
109+
```
110+
111+
# Testing
112+
113+
All code changes should include appropriate tests. The project uses:
114+
115+
- **Unit tests**: Mocha and NYC for code coverage
116+
- **NUT tests**: Integration tests for end-to-end scenarios
117+
118+
```bash
119+
# Run unit tests
120+
yarn test
121+
122+
# Run integration tests
123+
yarn test:nuts
124+
125+
# Run a specific test file
126+
yarn test:only
127+
```
128+
129+
# Contributor License Agreement ("CLA")
130+
131+
In order to accept your pull request, we need you to submit a CLA. You only need
132+
to do this once to work on any of Salesforce's open source projects.
133+
134+
Complete your CLA here: <https://cla.salesforce.com/sign-cla>
135+
136+
# Issues
137+
138+
We use GitHub issues to track public bugs. Please ensure your description is
139+
clear and has sufficient instructions to be able to reproduce the issue. Please also report any issues at https://github.com/forcedotcom/cli/issues.
140+
141+
# Code of Conduct
142+
143+
Please follow our [Code of Conduct](CODE_OF_CONDUCT.md).
144+
145+
# License
146+
147+
By contributing your code, you agree to license your contribution under the terms of our project [LICENSE](LICENSE.txt) and to sign the [Salesforce CLA](https://cla.salesforce.com/sign-cla)

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@salesforce/plugin-app-dev",
3-
"description": "",
3+
"description": "A CLI plugin for building UI that integrates with Salesforce",
44
"version": "1.2.0",
55
"author": "Salesforce",
66
"bugs": "https://github.com/forcedotcom/cli/issues",

0 commit comments

Comments
 (0)