Skip to content

Commit a44abcc

Browse files
committed
refactor(module): Rename module name from rzModule to rzSlider
Close #486
1 parent cba29cb commit a44abcc

File tree

8 files changed

+15
-16
lines changed

8 files changed

+15
-16
lines changed

Gruntfile.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ module.exports = function(grunt) {
5959
removeScriptTypeAttributes: true,
6060
removeStyleLinkTypeAttributes: true,
6161
},
62-
module: 'rzModule',
62+
module: 'rzSlider',
6363
url: function(url) {
6464
return url.replace('src/', '')
6565
},

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ Directly use (replace `X.X.X` by the version you want to use):
132132
### Module
133133

134134
```javascript
135-
angular.module('yourApp', ['rzModule'])
135+
angular.module('yourApp', ['rzSlider'])
136136
```
137137

138138
### Single slider
@@ -479,7 +479,7 @@ For custom scales:
479479
If you want the change the default options for all the sliders displayed in your application, you can set them using the `RzSliderOptions.options()` method:
480480

481481
```js
482-
angular.module('App', ['rzModule']).run(function(RzSliderOptions) {
482+
angular.module('App', ['rzSlider']).run(function(RzSliderOptions) {
483483
// show ticks for all sliders
484484
RzSliderOptions.options({ showTicks: true })
485485
})

demo/demo.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
var app = angular.module('rzSliderDemo', ['rzModule', 'ui.bootstrap'])
1+
var app = angular.module('rzSliderDemo', ['rzSlider', 'ui.bootstrap'])
22

33
app.controller('MainCtrl', function($scope, $rootScope, $timeout, $uibModal) {
44
//Minimal slider config

dist/rzslider.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
})(this, function(angular) {
2828
'use strict'
2929
var module = angular
30-
.module('rzModule', [])
30+
.module('rzSlider', [])
3131
.factory('RzSliderOptions', function() {
3232
var defaultOptions = {
3333
floor: 0,
@@ -97,7 +97,7 @@
9797
* `options({})` allows global configuration of all sliders in the
9898
* application.
9999
*
100-
* var app = angular.module( 'App', ['rzModule'], function( RzSliderOptions ) {
100+
* var app = angular.module( 'App', ['rzSlider'], function( RzSliderOptions ) {
101101
* // show ticks for all sliders
102102
* RzSliderOptions.options( { showTicks: true } );
103103
* });
@@ -1033,9 +1033,9 @@
10331033
if (this.options.rightToLeft) ticksArray.reverse()
10341034

10351035
this.scope.ticks = ticksArray.map(function(value) {
1036-
var legend = null;
1036+
var legend = null
10371037
if (angular.isObject(value)) {
1038-
legend = value.legend;
1038+
legend = value.legend
10391039
value = value.value
10401040
}
10411041

dist/rzslider.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,13 @@
1919
"test": "grunt test",
2020
"report-coverage": "cat ./tests/coverage/lcov.info | codecov",
2121
"format": "prettier --write \"{src,tests,demo}/{,!(lib)/**}/*.{js,less,css}\"",
22-
"precommit": "lint-staged",
22+
"precommit": "npm run build && git add dist && lint-staged",
2323
"e2e": "npm start & cypress run",
2424
"cypress:open": "cypress open"
2525
},
2626
"lint-staged": {
2727
"{src,tests,demo}/{,!(lib)/**}/*.{js,less,css}": [
2828
"prettier --write",
29-
"npm run build",
3029
"git add"
3130
]
3231
},

src/rzslider.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
})(this, function(angular) {
3232
'use strict'
3333
var module = angular
34-
.module('rzModule', [])
34+
.module('rzSlider', [])
3535
.factory('RzSliderOptions', function() {
3636
var defaultOptions = {
3737
floor: 0,
@@ -101,7 +101,7 @@
101101
* `options({})` allows global configuration of all sliders in the
102102
* application.
103103
*
104-
* var app = angular.module( 'App', ['rzModule'], function( RzSliderOptions ) {
104+
* var app = angular.module( 'App', ['rzSlider'], function( RzSliderOptions ) {
105105
* // show ticks for all sliders
106106
* RzSliderOptions.options( { showTicks: true } );
107107
* });
@@ -1037,9 +1037,9 @@
10371037
if (this.options.rightToLeft) ticksArray.reverse()
10381038

10391039
this.scope.ticks = ticksArray.map(function(value) {
1040-
var legend = null;
1040+
var legend = null
10411041
if (angular.isObject(value)) {
1042-
legend = value.legend;
1042+
legend = value.legend
10431043
value = value.value
10441044
}
10451045

tests/specs/helper.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
;(function() {
22
'use strict'
3-
var helperModule = angular.module('test-helper', ['rzModule', 'appTemplates'])
3+
var helperModule = angular.module('test-helper', ['rzSlider', 'appTemplates'])
44

55
helperModule.factory('TestHelper', function(
66
RzSlider,

0 commit comments

Comments
 (0)