Skip to content

Commit 27458c7

Browse files
committed
first step
1 parent bee204b commit 27458c7

File tree

8 files changed

+79
-177
lines changed

8 files changed

+79
-177
lines changed
File renamed without changes.

.jshintrc

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"bitwise": true,
3+
"laxcomma": true,
4+
"curly": true,
5+
"eqeqeq": true,
6+
"forin": true,
7+
"freeze": true,
8+
"futurehostile": true,
9+
"latedef": true,
10+
"noarg": true,
11+
"nocomma": true,
12+
"nonbsp": true,
13+
"nonew": true,
14+
"notypeof": true,
15+
"singleGroups": true,
16+
"strict": true,
17+
"undef": true,
18+
"unused": true,
19+
"plusplus": true
20+
}

Gruntfile.js

+36-9
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,13 @@
2020
'pkg': grunt.file.readJSON('package.json'),
2121
'confs': {
2222
'dist': 'dist',
23-
'config': 'config',
2423
'css': 'src/css',
2524
'js': 'src/js',
2625
'serverPort': 8000
2726
},
2827
'csslint': {
2928
'options': {
30-
'csslintrc': '<%= confs.config %>/csslintrc.json'
29+
'csslintrc': '.csslintrc'
3130
},
3231
'strict': {
3332
'src': [
@@ -37,13 +36,35 @@
3736
},
3837
'eslint': {
3938
'options': {
40-
'config': '<%= confs.config %>/eslint.json'
39+
'config': '.eslintrc'
4140
},
4241
'target': [
4342
'Gruntfile.js',
4443
'<%= confs.js %>/**/*.js'
4544
]
4645
},
46+
'jshint': {
47+
'options': {
48+
'jshintrc': true
49+
},
50+
'files': {
51+
'src': [
52+
'Gruntfile.js',
53+
'<%= confs.js %>/**/*.js'
54+
]
55+
}
56+
},
57+
'jscs': {
58+
'options': {
59+
'config': '.jscsrc'
60+
},
61+
'files': {
62+
'src': [
63+
'Gruntfile.js',
64+
'<%= confs.js %>/**/*.js'
65+
]
66+
}
67+
},
4768
'uglify': {
4869
'options': {
4970
'sourceMap': true,
@@ -90,11 +111,11 @@
90111
options.base = [options.base];
91112
}
92113
options.base.forEach(function forEachOption(base) {
93-
// Serve static files.
114+
// serve static files.
94115
middlewares.push(connect.static(base));
95116
});
96117

97-
// Make directory browse-able.
118+
// make directory browse-able.
98119
middlewares.push(connect.directory(directory));
99120

100121
return middlewares;
@@ -136,21 +157,27 @@
136157
grunt.loadNpmTasks('grunt-eslint');
137158
grunt.loadNpmTasks('grunt-contrib-uglify');
138159
grunt.loadNpmTasks('grunt-contrib-cssmin');
160+
grunt.loadNpmTasks('grunt-contrib-jshint');
161+
grunt.loadNpmTasks('grunt-jscs');
139162

140163
grunt.loadNpmTasks('grunt-concurrent');
141164
grunt.loadNpmTasks('grunt-contrib-connect');
142165
grunt.loadNpmTasks('grunt-contrib-watch');
143166

144167
grunt.registerTask('default', [
145-
'csslint',
146-
'eslint',
168+
'lint',
147169
'concurrent:dev'
148170
]);
149171

150-
grunt.registerTask('prod', [
172+
grunt.registerTask('lint', [
151173
'csslint',
152174
'eslint',
153-
'cssmin',
175+
'jshint',
176+
'jscs'
177+
]);
178+
179+
grunt.registerTask('prod', [
180+
'lint',
154181
'uglify'
155182
]);
156183
};

config/eslint.json

-153
This file was deleted.

index.js

-2
This file was deleted.

package.json

+12-10
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"version": "0.1.24",
44
"description": "Angular.js tooltips module.",
55
"homepage": "http://720kb.github.io/angular-tooltips",
6-
"main": "index.js",
6+
"main": "src/index.js",
77
"keywords": [
88
"tiptip",
99
"tooltip",
@@ -18,15 +18,17 @@
1818
},
1919
"license": "MIT",
2020
"devDependencies": {
21-
"connect-modrewrite": "*",
22-
"grunt": "*",
23-
"grunt-concurrent": "*",
24-
"grunt-contrib-connect": "*",
25-
"grunt-contrib-csslint": "*",
26-
"grunt-contrib-cssmin": "*",
27-
"grunt-contrib-uglify": "*",
28-
"grunt-contrib-watch": "*",
29-
"grunt-eslint": "*"
21+
"connect-modrewrite": "^0.8.2",
22+
"grunt": "^0.4.5",
23+
"grunt-concurrent": "^2.0.3",
24+
"grunt-contrib-connect": "^0.11.2",
25+
"grunt-contrib-csslint": "^0.5.0",
26+
"grunt-contrib-cssmin": "^0.14.0",
27+
"grunt-contrib-jshint": "^0.11.3",
28+
"grunt-contrib-uglify": "^0.9.2",
29+
"grunt-contrib-watch": "^0.6.1",
30+
"grunt-eslint": "^17.3.1",
31+
"grunt-jscs": "^2.2.0"
3032
},
3133
"author": {
3234
"name": "Filippo Oretti",

src/index.js

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
/*global require,module*/
2+
(function commonJS(require, module) {
3+
'use strict';
4+
5+
require('./src/js/angular-tooltips');
6+
7+
module.exports = '720kb.tooltips';
8+
}(require, module));

src/js/angular-tooltips.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@
4444

4545
return {
4646
'restrict': 'A',
47-
'scope': {
48-
'tooltipViewModel': '='
49-
},
47+
'scope': {
48+
'tooltipViewModel': '='
49+
},
5050
'link': function linkingFunction($scope, element, attr) {
5151

5252
var initialized = false

0 commit comments

Comments
 (0)