You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit ec83e99
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: .github/CONTRIBUTING.md
+56-42Lines changed: 56 additions & 42 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,11 +16,11 @@ Please see our [Contributor Code of Conduct](https://github.com/ionic-team/ionic
16
16
17
17
* The issue list of this repository is exclusively for bug reports and feature requests. Non-conforming issues will be closed immediately.
18
18
19
-
* Issues with no clear steps to reproduce will not be triaged. If an issue is labeled with "needs reply" and receives no further replies from the author of the issue for more than 5 days, it will be closed.
19
+
* Issues with no clear steps to reproduce will not be triaged. If an issue is labeled with "needs: reply" and receives no further replies from the author of the issue for more than 30 days, it will be closed.
20
20
21
21
* If you think you have found a bug, or have a new feature idea, please start by making sure it hasn't already been [reported](https://github.com/ionic-team/ionic/issues?utf8=%E2%9C%93&q=is%3Aissue). You can search through existing issues to see if there is a similar one reported. Include closed issues as it may have been closed with a solution.
22
22
23
-
* Next, [create a new issue](https://github.com/ionic-team/ionic/issues/new) that thoroughly explains the problem. Please fill out the populated issue form before submitting the issue.
23
+
* Next, [create a new issue](https://github.com/ionic-team/ionic/issues/new/choose) that thoroughly explains the problem. Please fill out the populated issue form before submitting the issue.
24
24
25
25
26
26
## Creating a Pull Request
@@ -29,66 +29,80 @@ Please see our [Contributor Code of Conduct](https://github.com/ionic-team/ionic
29
29
30
30
* Looking for an issue to fix? Make sure to look through our issues with the [help wanted](https://github.com/ionic-team/ionic/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22) label!
31
31
32
+
32
33
### Setup
33
34
34
-
1. Fork the repo.
35
-
2. Clone your fork.
36
-
3. Make a branch for your change.
37
-
4. Run `npm install` (make sure you have [node](https://nodejs.org/en/) and [npm](http://blog.npmjs.org/post/85484771375/how-to-install-npm) installed first)
35
+
1.[Download the installer](https://nodejs.org/) for the LTS version of Node.js. This is the best way to also [install npm](https://blog.npmjs.org/post/85484771375/how-to-install-npm#_=_).
36
+
2. Fork this repository.
37
+
3. Clone your fork.
38
+
4. Create a new branch from master for your change.
39
+
5. Navigate into the directory of the package you wish to modify (core, angular, etc.).
40
+
6. Run `npm install` to install dependencies for this package.
41
+
7. Follow the steps for the specific package below.
42
+
43
+
44
+
### Core
45
+
46
+
#### Modifying Components
47
+
48
+
1. Locate the component(s) to modify inside `/core/src/components/`.
49
+
2. Take a look at the [Stencil Documentation](https://stenciljs.com/docs/introduction/) and other components to understand the implementation of these components.
50
+
3. Make your changes to the component. If the change is overly complex or out of the ordinary, add comments so we can understand the changes.
51
+
4.[Preview your changes](#preview-changes) locally.
52
+
5.[Modify the documentation](#modifying-documentation) if needed.
53
+
6.[Run lint](#lint-changes) on the directory and make sure there are no errors.
54
+
7.[Build the project](#building-changes).
55
+
8. After the build is finished, commit the changes. Please follow the [commit message format](#commit-message-format) for every commit.
56
+
9.[Submit a Pull Request](#submit-pull-request) of your changes.
38
57
39
58
40
-
###Modifying Components
59
+
#### Preview Changes
41
60
42
-
1. Make any changes to the component.
43
-
2. Modify the e2e test in the `test/` directory under the component directory, if possible. If the test does not exist and it is possible to show the change, please create a new test in a directory called `basic/`.
61
+
1. Run `npm start` from within the `core` directory.
62
+
2. A browser should open at `http://localhost:3333/`.
63
+
3. From here, navigate to one of the component's tests to preview your changes.
64
+
4. If a test showing your change doesn't exist, [add a new test or update an existing one](#modifying-tests).
44
65
45
66
46
-
#### TypeScript Changes
67
+
#### Lint Changes
47
68
48
-
1. If there is a `*.spec.ts` file located in the `test/` folder, update it to include a karma test for your change, if needed. If this file doesn't exist, please notify us.
49
-
2. Run `gulp test` to make sure all tests are working, regardless if a test was added.
50
-
3. Run `gulp lint.ts` and fix any linter errors.
69
+
1. Run `npm run lint` to lint the TypeScript and Sass.
70
+
2. If there are lint errors, run `npm run lint.fix` to automatically fix any errors. Repeat step 1 to ensure the errors have been fixed, and manually fix them if not.
71
+
3. To lint and fix only TypeScript errors, run `npm run lint.ts` and `npm run lint.ts.fix`, respectively.
72
+
4. To lint and fix only Sass errors, run `npm run lint.sass` and `npm run lint.sass.fix`, respectively.
51
73
52
74
53
-
#### Sass Changes
75
+
#### Modifying Documentation
54
76
55
-
1. After any changes to the Sass files run [stylelint](https://stylelint.io/):
56
-
- Switch to the `core` directory
57
-
- Run `npm run lint.sass` and manually fix the errors or `npm run lint.fix` to autofix the errors
77
+
1. Locate the `readme.md` file in the component's directory.
78
+
2. Modify the documentation **above** the line that says `<!-- Auto Generated Below -->` in this file.
79
+
3. To update any of the auto generated documentation below that line, make the relevant changes in the following places:
80
+
-`Usage`: update the component's usage examples in the component's `usage/` directory
81
+
-`Properties`, `Events`, or `Methods`: update the component's TypeScript file (`*.tsx`)
82
+
-`CSS Custom Properties`: update the component's main Sass file (`*.scss`)
58
83
59
-
#### Viewing Changes
60
84
61
-
1. Run the gulp e2e task to build all tests: `gulp e2e`
62
-
2. Run the gulp e2e.watch task to watch your specific test (replace `button` with the component you are modifying and `basic` with the test folder): `gulp e2e.watch --f=button/basic`
63
-
3. A browser should open at `http://localhost:8080/dist/e2e`. From here, navigate to the component you are changing.
64
-
4. If your changes look good, you're ready to [commit](#commit-message-format)!
85
+
#### Modifying Tests
65
86
87
+
1. Locate the test to modify inside the `test/` folder in the component's directory.
88
+
2. If a test exists, modify the test by adding an example to reproduce the problem fixed or feature added.
89
+
3. If a new test is needed, the easiest way is to copy the `basic/` directory from the component's `test/` directory, rename it, and edit the content in both the `index.html` and `e2e.ts` file (if it exists).
90
+
4. The `preview/` directory is used in the documentation as a demo. Only update this test if there is a bug in the test or if the API has a change that hasn't been updated in the test.
66
91
67
-
#### Adding Documentation
68
92
69
-
1. To add or modify API Documentation for a component, it should be added/changed in the `readme.md` file in the component's directory. If the updates are to a specific `@Prop`, `@Event` or `@Method`, then please make the changes to the component's TypeScript (`*.ts`). Properties, events and methods information within the `readme.md` file are auto generated directly from the JSDoc comments within the TypeScript file.
70
-
2. In order to run API documentation locally, you will need to clone the `ionic-site` repo as a sibling to the `ionic` repo and then run it: https://github.com/ionic-team/ionic-site#local-build
71
-
3. Then, run `gulp docs` in the `ionic` repo every time you make a change and the site will update.
72
-
4. If the change affects the component documentation, create an issue on the `ionic-site` repo: https://github.com/ionic-team/ionic-site/issues
93
+
#### Building Changes
73
94
95
+
1. Once all changes have been made and the documentation has been updated, run `npm run build` inside of the `core` directory. This will add your changes to any auto-generated files, if necessary.
96
+
2. Review the changes and, if everything looks correct, [commit](#commit-message-format) the changes.
97
+
3. Make sure the build has finished before committing. If you made changes to the documentation, properties, methods, or anything else that requires an update to a generate file, this needs to be committed.
98
+
4. After the changes have been pushed, publish the branch and [create a pull request](#creating-a-pull-request).
74
99
75
-
#### Adding Demos
76
100
77
-
1. Create or modify the demo in the `demos/` folder.
78
-
2. If it is new, link to the demo in the component's TypeScript (`*.ts`) file (under `src/components`) by adding a link to it in the documentation using `@demo`, for example:
101
+
### Submit Pull Request
79
102
80
-
```
81
-
/**
82
-
* @name Badge
83
-
*
84
-
* ...
85
-
*
86
-
* @demo /docs/v2/demos/src/badge/
87
-
**/
88
-
```
89
-
3. Run `gulp watch.demos` to watch for changes to the demo
90
-
4. Navigate to `http://localhost:8000/dist/demos/` and then to your component's demo to view it.
91
-
5. If the change affects the component demos, create an issue on the `ionic-site` repo: https://github.com/ionic-team/ionic-site/issues
103
+
1.[Create a new pull request](https://github.com/ionic-team/ionic/compare) with the `master` branch as the `base`. You may need to click on `compare across forks` to find your changes.
104
+
2. See the [Creating a pull request from a fork](https://help.github.com/articles/creating-a-pull-request-from-a-fork/) GitHub help article for more information.
105
+
3. Please fill out the provided Pull Request template to the best of your ability and include any issues that are related.
0 commit comments