Skip to content

Commit 2e1fe52

Browse files
committed
use gulp-umd
1 parent e0ad40f commit 2e1fe52

File tree

6 files changed

+52
-58
lines changed

6 files changed

+52
-58
lines changed

dist/angular-wt-genius-min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/angular-wt-genius.js

+25-28
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
} else if (typeof exports === 'object') {
55
module.exports = factory(require('Notify'));
66
} else {
7-
root.$wtNotify = factory(root.Notify);
7+
root.wtGenius = factory(root.Notify);
88
}
99
}(this, function(Notify) {
10-
var $wtNotify = angular.module('wt.genius', []);
10+
var wtGenius = angular.module('wt.genius', []);
1111
/**
1212
* $wtNotify
1313
*
@@ -97,36 +97,33 @@ angular.module('wt.genius')
9797
* Version: 1.0.0 - 2015-10-19
9898
* Anthor: zhenshuai
9999
*/
100-
(function () {
101-
'use strict';
102-
angular.module('wt.genius')
103-
.provider('$wtRetina', [function () {
104-
var defaults = {
105-
onchange: function () {
106-
//console.log('dpi 切换事件');
107-
}
108-
};
109-
var configOptions = {};
110-
this.config = function (value) {
111-
configOptions = value;
112-
};
113-
this.$get = [
114-
function () {
115-
var mediaQuery = "(min--moz-device-pixel-ratio: 1.5),\
100+
angular.module('wt.genius')
101+
.provider('$wtRetina', [function () {
102+
var defaults = {
103+
onchange: function () {
104+
//console.log('dpi 切换事件');
105+
}
106+
};
107+
var configOptions = {};
108+
this.config = function (value) {
109+
configOptions = value;
110+
};
111+
this.$get = [
112+
function () {
113+
var mediaQuery = "(min--moz-device-pixel-ratio: 1.5),\
116114
(-o-min-device-pixel-ratio: 3/2),\
117115
(-webkit-min-device-pixel-ratio: 1.5),\
118116
(min-device-pixel-ratio: 1.5),\
119117
(min-resolution: 144dpi),\
120118
(min-resolution: 1.5dppx)";
121119

122-
var matchObj = window.matchMedia(mediaQuery);
123-
return {
124-
isRetina: matchObj.matches,
125-
media : matchObj.media
126-
};
127-
}
128-
];
129-
}]);
130-
})();
131-
return $wtNotify;
120+
var matchObj = window.matchMedia(mediaQuery);
121+
return {
122+
isRetina: matchObj.matches,
123+
media : matchObj.media
124+
};
125+
}
126+
];
127+
}]);
128+
return wtGenius;
132129
}));

gulpfile.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,10 @@ gulp.task('js', function () {
3535
.pipe(concat('angular-wt-genius.js'))
3636
.pipe(umd({
3737
exports: function(file) {
38-
return '$wtNotify';
38+
return 'wtGenius';
3939
},
4040
namespace: function(file) {
41-
return '$wtNotify';
41+
return 'wtGenius';
4242
},
4343
dependencies: function(file) {
4444
return [

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "angular-wt-genius",
3-
"version": "1.1.6",
3+
"version": "1.1.7",
44
"description": "Worktile/Lesschat front end util. ## wt-genius-notify ## wt-genius-localData ## wt-genius-validatorName",
55
"main": "gulpfile.js",
66
"scripts": {

src/main.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
var $wtNotify = angular.module('wt.genius', []);
1+
var wtGenius = angular.module('wt.genius', []);

src/wt-retina/wt-retina.js

+22-25
Original file line numberDiff line numberDiff line change
@@ -4,34 +4,31 @@
44
* Version: 1.0.0 - 2015-10-19
55
* Anthor: zhenshuai
66
*/
7-
(function () {
8-
'use strict';
9-
angular.module('wt.genius')
10-
.provider('$wtRetina', [function () {
11-
var defaults = {
12-
onchange: function () {
13-
//console.log('dpi 切换事件');
14-
}
15-
};
16-
var configOptions = {};
17-
this.config = function (value) {
18-
configOptions = value;
19-
};
20-
this.$get = [
21-
function () {
22-
var mediaQuery = "(min--moz-device-pixel-ratio: 1.5),\
7+
angular.module('wt.genius')
8+
.provider('$wtRetina', [function () {
9+
var defaults = {
10+
onchange: function () {
11+
//console.log('dpi 切换事件');
12+
}
13+
};
14+
var configOptions = {};
15+
this.config = function (value) {
16+
configOptions = value;
17+
};
18+
this.$get = [
19+
function () {
20+
var mediaQuery = "(min--moz-device-pixel-ratio: 1.5),\
2321
(-o-min-device-pixel-ratio: 3/2),\
2422
(-webkit-min-device-pixel-ratio: 1.5),\
2523
(min-device-pixel-ratio: 1.5),\
2624
(min-resolution: 144dpi),\
2725
(min-resolution: 1.5dppx)";
2826

29-
var matchObj = window.matchMedia(mediaQuery);
30-
return {
31-
isRetina: matchObj.matches,
32-
media : matchObj.media
33-
};
34-
}
35-
];
36-
}]);
37-
})();
27+
var matchObj = window.matchMedia(mediaQuery);
28+
return {
29+
isRetina: matchObj.matches,
30+
media : matchObj.media
31+
};
32+
}
33+
];
34+
}]);

0 commit comments

Comments
 (0)