Skip to content

Commit afe2754

Browse files
committed
Finished configuration for Grunt
1 parent 833c564 commit afe2754

21 files changed

+1002
-55
lines changed

Gruntfile.js

Lines changed: 76 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
'use strict';
1+
'use strict';
22

33
module.exports = function(grunt) {
44

@@ -13,12 +13,15 @@ module.exports = function(grunt) {
1313
' * @link <%= pkg.homepage %>',
1414
' * @author <%= pkg.author %>',
1515
' * @license MIT License, http://www.opensource.org/licenses/MIT',
16-
' */'
16+
' */\n'
1717
].join('\n')
1818
},
1919
dirs: {
2020
dest: 'dist'
2121
},
22+
clean: [
23+
'<%= dirs.dest %>'
24+
],
2225
concat: {
2326
options: {
2427
banner: '<%= meta.banner %>'
@@ -28,43 +31,70 @@ module.exports = function(grunt) {
2831
dest: '<%= dirs.dest %>/<%= pkg.name %>.js'
2932
}
3033
},
34+
recess: {
35+
build: {
36+
src: [ 'src/angular-wizard.less' ],
37+
dest: '<%= dirs.dest %>/<%= pkg.name %>.css',
38+
options: {
39+
compile: true,
40+
compress: false,
41+
noUnderscores: false,
42+
noIDs: false,
43+
zeroUnits: false
44+
}
45+
},
46+
compile: {
47+
src: [ 'src/angular-wizard.less' ],
48+
dest: '<%= dirs.dest %>/<%= pkg.name %>.min.css',
49+
options: {
50+
compile: true,
51+
compress: true,
52+
noUnderscores: false,
53+
noIDs: false,
54+
zeroUnits: false
55+
}
56+
}
57+
},
58+
copy: {
59+
less_files: {
60+
files: [
61+
{
62+
src: [ 'src/angular-wizard.less' ],
63+
dest: '<%= dirs.dest %>',
64+
cwd: '.',
65+
expand: true,
66+
flatten: true
67+
}
68+
]
69+
}
70+
},
3171
zip: {
32-
'<%= dirs.dest %>/restangular.zip': ['<%= dirs.dest %>/<%= pkg.name %>.js', '<%= dirs.dest %>/<%= pkg.name %>.min.js']
72+
'<%= dirs.dest %>/<%= pkg.name %>.zip': ['<%= dirs.dest %>/*.js', '<%= dirs.dest %>/*.css', '<%= dirs.dest %>/*.less']
3373
},
3474
bowerInstall: {
3575
install: {
3676
}
3777
},
78+
html2js: {
79+
dist: {
80+
options: {
81+
base: 'src'
82+
},
83+
src: [ 'src/*.html' ],
84+
dest: '<%= dirs.dest %>/<%= pkg.name %>.tpls.js'
85+
},
86+
},
3887
uglify: {
3988
options: {
4089
banner: '<%= meta.banner %>'
4190
},
4291
dist: {
4392
src: ['<%= concat.dist.dest %>'],
4493
dest: '<%= dirs.dest %>/<%= pkg.name %>.min.js'
45-
}
46-
},
47-
jshint: {
48-
files: ['Gruntfile.js', 'src/*.js'],
49-
options: {
50-
curly: false,
51-
browser: true,
52-
eqeqeq: true,
53-
immed: true,
54-
latedef: true,
55-
newcap: true,
56-
noarg: true,
57-
sub: true,
58-
undef: true,
59-
boss: true,
60-
eqnull: true,
61-
expr: true,
62-
node: true,
63-
globals: {
64-
exports: true,
65-
angular: false,
66-
$: false
67-
}
94+
},
95+
templates: {
96+
src: ['<%= html2js.dist.dest %>'],
97+
dest: '<%= dirs.dest %>/<%= pkg.name %>.tpls.min.js'
6898
}
6999
},
70100
karma: {
@@ -80,17 +110,6 @@ module.exports = function(grunt) {
80110
autoWatch: false,
81111
browsers: ['Firefox']
82112
},
83-
travisUnderscore: {
84-
singleRun: true,
85-
autoWatch: false,
86-
browsers: ['Firefox'],
87-
configFile: 'karma.underscore.conf.js',
88-
},
89-
buildUnderscore: {
90-
configFile: 'karma.underscore.conf.js',
91-
singleRun: true,
92-
autoWatch: false
93-
},
94113
dev: {
95114
autoWatch: true
96115
}
@@ -102,9 +121,6 @@ module.exports = function(grunt) {
102121
}
103122
});
104123

105-
// Load the plugin that provides the "jshint" task.
106-
grunt.loadNpmTasks('grunt-contrib-jshint');
107-
108124
// Load the plugin that provides the "concat" task.
109125
grunt.loadNpmTasks('grunt-contrib-concat');
110126

@@ -115,22 +131,38 @@ module.exports = function(grunt) {
115131

116132
grunt.renameTask("bower", "bowerInstall");
117133

134+
grunt.loadNpmTasks('grunt-karma');
118135
grunt.loadNpmTasks('grunt-karma');
119136

120137
grunt.loadNpmTasks('grunt-conventional-changelog');
121138

122139
grunt.loadNpmTasks('grunt-zip');
123140

141+
grunt.loadNpmTasks('grunt-recess');
142+
grunt.loadNpmTasks('grunt-contrib-clean');
143+
grunt.loadNpmTasks('grunt-contrib-copy');
144+
grunt.loadNpmTasks('grunt-ngmin');
145+
grunt.loadNpmTasks('grunt-html2js');
146+
124147

125148
// Default task.
126149
grunt.registerTask('default', ['build']);
127150

128151
// Build task.
129-
grunt.registerTask('build', ['bowerInstall', 'karma:build', 'karma:buildUnderscore', 'concat', 'uglify', 'zip']);
130-
131-
grunt.registerTask('test', ['karma:build', 'karma:buildUnderscore']);
152+
grunt.registerTask('build', [
153+
'clean',
154+
'bowerInstall',
155+
'copy',
156+
'recess',
157+
'concat',
158+
'html2js',
159+
'uglify',
160+
'karma:build',
161+
'zip']);
162+
163+
grunt.registerTask('test', ['build']);
132164

133-
grunt.registerTask('travis', ['karma:travis', 'karma:travisUnderscore']);
165+
grunt.registerTask('travis', ['build']);
134166

135167
// Provides the "bump" task.
136168
grunt.registerTask('bump', 'Increment version number', function() {

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "angular-wizard",
3-
"version": "0.1",
3+
"version": "0.1.0",
44
"main": "./dist/angular-wizard.js",
55
"description": "Easy to use Wizard library for AngularJS",
66
"repository": {

dist/angular-wizard.css

Lines changed: 163 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,163 @@
1+
.steps-indicator {
2+
position: absolute;
3+
right: 0;
4+
bottom: 0;
5+
left: 0;
6+
height: 30px;
7+
padding: 0;
8+
margin: 0;
9+
list-style: none;
10+
}
11+
12+
.steps-indicator:before {
13+
position: absolute;
14+
height: 1px;
15+
background-color: #e6e6e6;
16+
content: '';
17+
}
18+
19+
.steps-indicator.steps-2:before {
20+
right: calc(25%);
21+
left: calc(25%);
22+
}
23+
24+
.steps-indicator.steps-3:before {
25+
right: calc(16.666666666666668%);
26+
left: calc(16.666666666666668%);
27+
}
28+
29+
.steps-indicator.steps-4:before {
30+
right: calc(12.5%);
31+
left: calc(12.5%);
32+
}
33+
34+
.steps-indicator.steps-5:before {
35+
right: calc(10%);
36+
left: calc(10%);
37+
}
38+
39+
.steps-indicator.steps-6:before {
40+
right: calc(8.333333333333334%);
41+
left: calc(8.333333333333334%);
42+
}
43+
44+
.steps-indicator.steps-7:before {
45+
right: calc(7.142857142857143%);
46+
left: calc(7.142857142857143%);
47+
}
48+
49+
.steps-indicator.steps-8:before {
50+
right: calc(6.25%);
51+
left: calc(6.25%);
52+
}
53+
54+
.steps-indicator.steps-9:before {
55+
right: calc(5.555555555555555%);
56+
left: calc(5.555555555555555%);
57+
}
58+
59+
.steps-indicator.steps-10:before {
60+
right: calc(5%);
61+
left: calc(5%);
62+
}
63+
64+
.steps-indicator * {
65+
-webkit-box-sizing: border-box;
66+
-moz-box-sizing: border-box;
67+
box-sizing: border-box;
68+
}
69+
70+
.steps-indicator li {
71+
position: relative;
72+
float: left;
73+
padding: 0;
74+
padding-top: 10px;
75+
margin: 0;
76+
line-height: 15px;
77+
text-align: center;
78+
}
79+
80+
.steps-indicator li a {
81+
font-weight: bold;
82+
color: #808080;
83+
text-decoration: none;
84+
text-transform: uppercase;
85+
transition: 0.25s;
86+
}
87+
88+
.steps-indicator li a:before {
89+
position: absolute;
90+
top: -7px;
91+
left: calc(43%);
92+
width: 14px;
93+
height: 14px;
94+
background-color: #e6e6e6;
95+
border-radius: 100%;
96+
content: '';
97+
transition: 0.25s;
98+
}
99+
100+
.steps-indicator li a:hover {
101+
color: #4d4d4d;
102+
}
103+
104+
.steps-indicator.steps-2 li {
105+
width: calc(50%);
106+
}
107+
108+
.steps-indicator.steps-3 li {
109+
width: calc(33.333333333333336%);
110+
}
111+
112+
.steps-indicator.steps-4 li {
113+
width: calc(25%);
114+
}
115+
116+
.steps-indicator.steps-5 li {
117+
width: calc(20%);
118+
}
119+
120+
.steps-indicator.steps-6 li {
121+
width: calc(16.666666666666668%);
122+
}
123+
124+
.steps-indicator.steps-7 li {
125+
width: calc(14.285714285714286%);
126+
}
127+
128+
.steps-indicator.steps-8 li {
129+
width: calc(12.5%);
130+
}
131+
132+
.steps-indicator.steps-9 li {
133+
width: calc(11.11111111111111%);
134+
}
135+
136+
.steps-indicator.steps-10 li {
137+
width: calc(10%);
138+
}
139+
140+
.steps-indicator li.default {
141+
pointer-events: none;
142+
}
143+
144+
.steps-indicator li.default a:hover {
145+
color: #808080;
146+
}
147+
148+
.steps-indicator li.current,
149+
.steps-indicator li.editing {
150+
pointer-events: none;
151+
}
152+
153+
.steps-indicator li.current a:before {
154+
background-color: #808080;
155+
}
156+
157+
.steps-indicator li.done a:before {
158+
background-color: #339933;
159+
}
160+
161+
.steps-indicator li.editing a:before {
162+
background-color: #ff0000;
163+
}

0 commit comments

Comments
 (0)