Skip to content

Commit 6bb897c

Browse files
committed
First creation of Angular wizard with dist completed
1 parent afe2754 commit 6bb897c

File tree

8 files changed

+28
-43
lines changed

8 files changed

+28
-43
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,4 @@ node_modules
1515
components
1616
bower_components
1717
npm-debug.log
18+
src/*.tpls.js

Gruntfile.js

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -68,20 +68,17 @@ module.exports = function(grunt) {
6868
]
6969
}
7070
},
71-
zip: {
72-
'<%= dirs.dest %>/<%= pkg.name %>.zip': ['<%= dirs.dest %>/*.js', '<%= dirs.dest %>/*.css', '<%= dirs.dest %>/*.less']
73-
},
7471
bowerInstall: {
7572
install: {
7673
}
7774
},
7875
html2js: {
79-
dist: {
76+
angularwizard: {
8077
options: {
8178
base: 'src'
8279
},
8380
src: [ 'src/*.html' ],
84-
dest: '<%= dirs.dest %>/<%= pkg.name %>.tpls.js'
81+
dest: 'src/<%= pkg.name %>.tpls.js'
8582
},
8683
},
8784
uglify: {
@@ -91,10 +88,6 @@ module.exports = function(grunt) {
9188
dist: {
9289
src: ['<%= concat.dist.dest %>'],
9390
dest: '<%= dirs.dest %>/<%= pkg.name %>.min.js'
94-
},
95-
templates: {
96-
src: ['<%= html2js.dist.dest %>'],
97-
dest: '<%= dirs.dest %>/<%= pkg.name %>.tpls.min.js'
9891
}
9992
},
10093
karma: {
@@ -136,8 +129,6 @@ module.exports = function(grunt) {
136129

137130
grunt.loadNpmTasks('grunt-conventional-changelog');
138131

139-
grunt.loadNpmTasks('grunt-zip');
140-
141132
grunt.loadNpmTasks('grunt-recess');
142133
grunt.loadNpmTasks('grunt-contrib-clean');
143134
grunt.loadNpmTasks('grunt-contrib-copy');
@@ -154,11 +145,10 @@ module.exports = function(grunt) {
154145
'bowerInstall',
155146
'copy',
156147
'recess',
157-
'concat',
158148
'html2js',
149+
'concat',
159150
'uglify',
160-
'karma:build',
161-
'zip']);
151+
'karma:build']);
162152

163153
grunt.registerTask('test', ['build']);
164154

dist/angular-wizard.js

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,27 @@
44
* @author Martin Gontovnikas <martin@gon.to>
55
* @license MIT License, http://www.opensource.org/licenses/MIT
66
*/
7-
angular.module('mgo-angular-wizard', []);
7+
angular.module('templates-angularwizard', ['step.html', 'wizard.html']);
8+
9+
angular.module("step.html", []).run(["$templateCache", function($templateCache) {
10+
$templateCache.put("step.html",
11+
"<section ng-show=\"selected\" ng-class=\"{current: selected, done: completed}\" ng-transclude>\n" +
12+
"</section>");
13+
}]);
14+
15+
angular.module("wizard.html", []).run(["$templateCache", function($templateCache) {
16+
$templateCache.put("wizard.html",
17+
"<div>\n" +
18+
" <div class=\"steps\" ng-transclude></div>\n" +
19+
" <ul class=\"steps-indicator steps-{{steps.length}}\" ng-if=\"!hideIndicators\">\n" +
20+
" <li ng-class=\"{default: !step.completed && !step.selected, current: step.selected && !step.completed, done: step.completed && !step.selected, editing: step.selected && step.completed}\" ng-repeat=\"step in steps\">\n" +
21+
" <a ng-click=\"goTo(step)\">{{step.title}}</a>\n" +
22+
" </li>\n" +
23+
" </ul>\n" +
24+
"</div>");
25+
}]);
26+
27+
angular.module('mgo-angular-wizard', ['templates-angularwizard']);
828
angular.module('mgo-angular-wizard').directive('step', function() {
929
return {
1030
restrict: 'E',

dist/angular-wizard.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.

dist/angular-wizard.tpls.js

Lines changed: 0 additions & 19 deletions
This file was deleted.

dist/angular-wizard.tpls.min.js

Lines changed: 0 additions & 7 deletions
This file was deleted.

dist/angular-wizard.zip

-18.5 KB
Binary file not shown.

src/angularModule.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
angular.module('mgo-angular-wizard', []);
1+
angular.module('mgo-angular-wizard', ['templates-angularwizard']);

0 commit comments

Comments
 (0)