Skip to content

Commit 89dfc00

Browse files
committed
docs(contributions): Improve contributing docs and add grunt-cli
1 parent cbb0c68 commit 89dfc00

File tree

3 files changed

+53
-46
lines changed

3 files changed

+53
-46
lines changed

CONTRIBUTING.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,16 @@ This project use [Prettier](https://github.com/prettier/prettier) for its code f
1010

1111
To contribute to the project, please follow these steps:
1212

13-
1. Get approval for the idea by filing an issue and talking with me about the changes
14-
2. Fork the repo
15-
3. Make a branch for your change
16-
4. Run `npm install`
17-
5. Run `npm run test`
18-
6. Make your changes
19-
7. Test your changes (if you need a new test file, please copy the `test-template.js` file in the tests/specs folder.)
20-
8. Run `npm run build` to generate the dist files
21-
9. Run `git add -A` to add your changes
22-
10. Run `npm run commit` (**Do not** use `git commit`) - follow the prompts to create your git message
13+
1. Get approval for the idea by filing an issue and talking with me about the changes
14+
2. Fork the repo
15+
3. Make a branch for your change
16+
4. Run `yarn`
17+
5. Run `yarn test`
18+
6. Make your changes
19+
7. Test your changes (if you need a new test file, please copy the `test-template.js` file in the tests/specs folder.)
20+
8. Run `yarn build` to generate the dist files
21+
9. Run `git add -A` to add your changes
22+
10. Run `yarn commit` (**Do not** use `git commit`) - follow the prompts to create your git message
2323
11. Push your changes with `git push`
2424
12. Create the Pull Request (a demo showing what the PR does is always good so you can fork [this fiddle](http://jsfiddle.net/cwhgLcjv/))
2525
13. If there are several commits, please [rebase](https://github.com/edx/edx-platform/wiki/How-to-Rebase-a-Pull-Request) and [squash](https://github.com/edx/edx-platform/wiki/How-to-Rebase-a-Pull-Request#squash-your-changes) everything to only get one commit.

README.md

Lines changed: 42 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@ Links:
1616
1717
Slider directive implementation for AngularJS 1.X, without any dependencies: [http://angular-slider.github.io/angularjs-slider](http://angular-slider.github.io/angularjs-slider/index.html).
1818

19-
* Mobile friendly
20-
* Fast
21-
* Well documented
22-
* Customizable
23-
* Simple to use
24-
* Keyboard support
25-
* Compatibility with jQuery Lite, ie. with full jQuery ( Thanks Jusas! https://github.com/Jusas)
26-
* Supports right to left
19+
- Mobile friendly
20+
- Fast
21+
- Well documented
22+
- Customizable
23+
- Simple to use
24+
- Keyboard support
25+
- Compatibility with jQuery Lite, ie. with full jQuery ( Thanks Jusas! https://github.com/Jusas)
26+
- Supports right to left
2727

2828
**Horizontal**
2929

@@ -38,10 +38,10 @@ Slider directive implementation for AngularJS 1.X, without any dependencies: [ht
3838

3939
## Examples
4040

41-
* **Simple example for single slider:** [http://jsfiddle.net/cwhgLcjv](http://jsfiddle.net/cwhgLcjv/)
42-
* **Simple example for double slider:** [http://jsfiddle.net/ye1kpfrj](http://jsfiddle.net/ye1kpfrj/)
43-
* **Various examples:** [http://angular-slider.github.io/angularjs-slider](http://angular-slider.github.io/angularjs-slider/index.html)
44-
* **Same examples with live code:** https://jsfiddle.net/ValentinH/954eve2L/
41+
- **Simple example for single slider:** [http://jsfiddle.net/cwhgLcjv](http://jsfiddle.net/cwhgLcjv/)
42+
- **Simple example for double slider:** [http://jsfiddle.net/ye1kpfrj](http://jsfiddle.net/ye1kpfrj/)
43+
- **Various examples:** [http://angular-slider.github.io/angularjs-slider](http://angular-slider.github.io/angularjs-slider/index.html)
44+
- **Same examples with live code:** https://jsfiddle.net/ValentinH/954eve2L/
4545

4646
## Reporting issues
4747

@@ -84,6 +84,12 @@ By default, the slider value is always rounded to the nearest step. A side effec
8484
npm i angularjs-slider
8585
```
8686

87+
or
88+
89+
```
90+
yarn add angularjs-slider
91+
```
92+
8793
#### Typescript Support
8894

8995
Typescript definition files are provided with this project. To use them, be sure you have the angular type definition peer dependency installed.
@@ -106,8 +112,8 @@ or
106112

107113
Directly use (replace `X.X.X` by the version you want to use):
108114

109-
* `https://cdnjs.cloudflare.com/ajax/libs/angularjs-slider/X.X.X/rzslider.min.js`
110-
* `https://cdnjs.cloudflare.com/ajax/libs/angularjs-slider/X.X.X/rzslider.min.css`
115+
- `https://cdnjs.cloudflare.com/ajax/libs/angularjs-slider/X.X.X/rzslider.min.js`
116+
- `https://cdnjs.cloudflare.com/ajax/libs/angularjs-slider/X.X.X/rzslider.min.css`
111117

112118
## Project integration
113119

@@ -209,11 +215,11 @@ $scope.slider = {
209215
210216
The following variables are available in the template as scope variables.
211217

212-
* `floorLabel`: The value set to `floor` in `rz-slider-options`
213-
* `ceilLabel`: The value set to `ceil` in `rz-slider-options`
214-
* `modelLabel`: The value set to `rz-slider-model`
215-
* `highLabel`: The value set to `rz-slider-high`
216-
* `cmbLabel`: The text shown when the two handlers are close to each other. (e.g. "30-40")
218+
- `floorLabel`: The value set to `floor` in `rz-slider-options`
219+
- `ceilLabel`: The value set to `ceil` in `rz-slider-options`
220+
- `modelLabel`: The value set to `rz-slider-model`
221+
- `highLabel`: The value set to `rz-slider-high`
222+
- `cmbLabel`: The text shown when the two handlers are close to each other. (e.g. "30-40")
217223

218224
The library replaces the HTML contents of label elements in the template by default, if you want to stop this behaviour and tweak label HTML on your own, you need to set `no-label-injection` class on the elements you're customizing.
219225

@@ -312,11 +318,11 @@ The default options are:
312318
**translate** - _Function(value, sliderId, label)_: Custom translate function. Use this if you want to translate values displayed on the slider.
313319
`sliderId` can be used to determine the slider for which we are translating the value. `label` is a string that can take the following values:
314320

315-
* _'model'_: the model label
316-
* _'high'_: the high label
317-
* _'floor'_: the floor label
318-
* _'ceil'_: the ceil label
319-
* _'tick-value'_: the ticks labels
321+
- _'model'_: the model label
322+
- _'high'_: the high label
323+
- _'floor'_: the floor label
324+
- _'ceil'_: the ceil label
325+
- _'tick-value'_: the ticks labels
320326

321327
For example if you want to display dollar amounts instead of just numbers:
322328

@@ -432,21 +438,21 @@ _Changing this value at runtime is not currently supported._
432438

433439
**keyboardSupport** - _Boolean (defaults to true)_: Handles are focusable (on click or with tab) and can be modified using the following keyboard controls:
434440

435-
* Left/bottom arrows: -1
436-
* Right/top arrows: +1
437-
* Page-down: -10%
438-
* Page-up: +10%
439-
* Home: minimum value
440-
* End: maximum value
441+
- Left/bottom arrows: -1
442+
- Right/top arrows: +1
443+
- Page-down: -10%
444+
- Page-up: +10%
445+
- Home: minimum value
446+
- End: maximum value
441447

442448
**reversedControls** - _Boolean (defaults to false)_: Set to true to reverse keyboard navigation:
443449

444-
* Right/top arrows: -1
445-
* Left/bottom arrows: +1
446-
* Page-up: -10%
447-
* Page-down: +10%
448-
* End: minimum value
449-
* Home: maximum value
450+
- Right/top arrows: -1
451+
- Left/bottom arrows: +1
452+
- Page-up: -10%
453+
- Page-down: +10%
454+
- End: minimum value
455+
- Home: maximum value
450456

451457
**customTemplateScope** - _Object (default to null)_: The properties defined in this object will be exposed in the slider template under `custom.X`.
452458

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
"cz-conventional-changelog": "^1.1.5",
4444
"grunt": "~0.4.2",
4545
"grunt-angular-templates": "^0.5.7",
46+
"grunt-cli": "^1.2.0",
4647
"grunt-contrib-concat": "^0.5.1",
4748
"grunt-contrib-copy": "^1.0.0",
4849
"grunt-contrib-mincss": "~0.3.2",

0 commit comments

Comments
 (0)