UNPKG

9.23 kBMarkdownView Raw
1# Getting Involved
2
3There are many ways to contribute to the project, you can fix issues,
4improve documentation or work on any of the features on the
5[wish list](https://github.com/ember-cli/ember-cli/wiki/Wish-List).
6
7
8# Development
9
10Start by cloning the Git project to your local hard drive:
11
12```
13git clone https://github.com/ember-cli/ember-cli.git
14```
15
16## Link `ember` to your development version
17
18If you want to use the `ember` or `ember-cli` development versions you are working on, run the following command to link the global `ember` utility to your local development version:
19
20```
21npm link
22```
23
24Note that the global `ember` CLI utility will automatically relay to any
25project-local ember-cli installation. If you want to use your development
26version there instead run the following command from your Ember.js
27project folder:
28
29```
30npm link ember-cli
31```
32
33Read the official [npm-link documentation](https://docs.npmjs.com/cli/link.html)
34for more information.
35
36
37## Run the test suite
38
39```
40npm test
41```
42
43will run ESLint and the "fast" subset of the test suite. Run
44`npm run test:all` for the full test suite which will currently take quite a
45few minutes due to heavy IO and network usage.
46
47ember-cli is using [Mocha](https://mochajs.org/) for its internal tests. If
48you want to run a specific subset of tests have a look at their
49[documentation](https://mochajs.org/#exclusive-tests).
50
51
52## Build the documentation
53
54Use `npm run docs` to build HTML and JSON documentation with YUIDoc and place
55it in `docs/build/`. Please help by improving this documentation.
56
57# Questions
58
59This is the issue tracker for `ember-cli`. The community uses this site
60to collect and track bugs and discussions of new features. If you are
61having difficulties using `ember-cli` or have a question about usage
62please ask a question on Stack Overflow: https://stackoverflow.com/questions/ask?tags=ember-cli
63
64# Issues
65
66Think you've found a bug or have a new feature to suggest? Let us know!
67
68## Slow builds?
69
70Please be sure to review [The Perf Guide](https://github.com/ember-cli/ember-cli/blob/master/docs/perf-guide.md) (and implement its recommendations) before posting an issue.
71
72## Reporting a Bug
73
741. Update to the most recent master release if possible. We may have already
75 fixed your bug.
76
772. Search for similar issues. It's possible somebody has encountered this bug
78 already.
79
803. Provide a demo that specifically shows the problem. This demo should be fully
81 operational with the exception of the bug you want to demonstrate. The more
82 pared down, the better. Issues with demos are prioritized.
83
844. Your issue will be verified. The provided demo will be tested for
85 correctness. The ember-cli team will work with you until your issue can be
86 verified.
87
885. Keep up to date with feedback from the ember-cli team on your ticket. Your
89 ticket may be closed if it becomes stale.
90
916. If possible, submit a Pull Request with a failing test. Better yet, take
92 a stab at fixing the bug yourself if you can!
93
94The more information you provide, the easier it is for us to validate that
95there is a bug and the faster we'll be able to take action.
96
97Be sure to include (At the very least):
98
99* OS
100* npm version
101* ember version
102* clear steps to reproduction
103
104And ideally
105
106* an isolated demonstration of this issue as a github repo
107
108## Requesting a Feature
109
110Feature requests are handled via https://github.com/ember-cli/rfcs
111
112* issues are eargley stage requests/proposals
113* rfcs as pull requests are for fleshing out details
114
1151. Search Issues for similar feature requests. It's possible somebody has
116 already asked for this feature or provided a pull request that we're still
117 discussing.
118
1192. Provide a clear and detailed explanation of the feature you want and why it's
120 important to add. Keep in mind that we want features that will be useful to
121 the majority of our users and not just a small subset. If you're just
122 targeting a minority of users, consider writing an addon library for
123 `ember-cli`.
124
1253. If the feature is complex, consider writing some initial documentation for
126 it. If we do end up accepting the feature it will need to be documented and
127 this will also help us to understand it better ourselves.
128
1294. Attempt a Pull Request. If you are willing to help the project out, you can
130 submit a Pull Request. We always have more work to do than time to do it. If
131 you can write some code then that will speed the process along.
132
133# Pull Requests
134
135We love pull requests. Here's a quick guide:
136
1371. Fork the repo.
138
1392. Ensure you have the development requirements:
140
141 * node (latest LTS recommended) -- *do not install node using sudo*
142 * npm (3.x)
143 * google chrome
144
1453. Run the tests. We only take pull requests with passing tests, and it's great
146 to know that you have a clean slate: `npm install && npm run test:all`.
147
1484. Add a test for your change. Only refactoring and documentation changes
149 require no new tests. If you are adding functionality or fixing a bug, we
150 need a test!
151
1525. Make the test pass.
153
1546. Commit your changes. If your pull request fixes an issue specify it in the
155 commit message. Here's an example: `git commit - m "Close #52 Fix
156 generators"`
157
1587. Push to your fork and submit a pull request. In the pull-request title,
159 please prefix it with one of our tags: BUGFIX, FEATURE, ENHANCEMENT or
160 INTERNAL
161
162 * FEATURE and ENHANCEMENT tags are for things that users are interested in.
163 Avoid super technical talk. Craft a concise description of the change.
164 - FEATURE tag is a standalone new addition, an example of this would be
165 adding a new command
166 - ENHANCEMENT tag is an improvement on an existing feature
167 * BUGFIX tag is a link to a bug + a link to a patch.
168 * INTERNAL tag is an internal log of changes.
169
170 In the description, please provide us with some explanation of why you made
171 the changes you made. For new features make sure to explain a standard use
172 case to us.
173
174 If a change requires a user to change their configuration, `bower.json`,
175 `package.json` or `Brocfile.js` also add a BREAKING tag within the brackets
176 before any other tags (example [BREAKING BUGFIX]).
177
178We try to be quick about responding to tickets but sometimes we get a bit
179backlogged. If the response is slow, try to find someone on IRC(#ember-cli) to
180give the ticket a review.
181
182Some things that will increase the chance that your pull request is accepted,
183taken straight from the Ruby on Rails guide:
184
185* Use Node idioms and helpers.
186* Include tests that fail without your code, and pass with it.
187* Update the documentation, the surrounding one, examples elsewhere, guides,
188 whatever is affected by your contribution.
189
190#### Syntax
191
192* Two spaces, no tabs.
193* No trailing whitespace. Blank lines should not have any space.
194* Follow the conventions you see used in the source already.
195
196#### Inline Documentation Guidelines
197
198All inline documentation is written using YUIDoc. Follow these rules when
199updating or writing new documentation:
200
2011. All code blocks must be fenced.
2022. All code blocks must have a language declared.
2033. All code blocks must be valid code for syntax highlighting.
2044. All examples in code blocks must be aligned.
2055. Use two spaces between the code and the example: `foo(); // result`.
2066. All references to code words must be enclosed in backticks.
2077. Prefer a single space between sentences.
2088. Wrap long markdown blocks > 80 characters.
2099. Don't include blank lines after `@param` definitions.
210
211#### Website
212
213The codebase for the website [ember-cli.com](https://ember-cli.com) is located
214at: https://github.com/ember-cli/ember-cli.github.io
215
216#### Code Words
217
218* `thisPropertyName`
219* `Global.Class.attribute`
220* `thisFunction()`
221* `Global.CONSTANT_NAME`
222* `true`, `false`, `null`, `undefined` (when referring to programming values)
223
224And in case we didn't emphasize it enough: **we love tests!**
225
226#### Testing
227
228Testing is done with mocha. You can invoke the tests by running `npm test` or `npm run test:all`. Both scripts are running `node tests/runner` may be with additional params. To contribute
229with a test, write your test and add `.only` to it's `describe` or `it` block. E.g.
230
231```javascript
232describe.only("My new feature", function() {
233 it("is neat", function() {
234 //...
235 });
236});
237```
238
239Then simply run `npm test` for your test to run. If the test(s) pass and you are happy with the
240result, remove the `.only` and run the whole suite again, in order to make sure that you didn't
241break anything.
242
243NOTE: Partially copied from https://raw.githubusercontent.com/emberjs/ember.js/master/CONTRIBUTING.md
244
245#### Experiments
246
247A new feature may require putting the changes behind an experiment. More
248information can be found at
249[Experiments](https://github.com/ember-cli/ember-cli/blob/master/docs/experiments.md).
250
251# Code Climate
252
253We can always use help improving our [Code Climate](https://codeclimate.com/github/ember-cli/ember-cli) score.
254
255# Docs
256
257Have you got enough knowledge in a specific feature and want to help with docs?
258Ember-cli documentation lives at the repository
259[ember-learn/cli-guides](https://github.com/ember-learn/cli-guides).
260
261Feel free to contribute and help us to keep an updated, clear and complete
262documentation.