Skip to content

Commit

Permalink
Add proper builds with ng-annotate
Browse files Browse the repository at this point in the history
  • Loading branch information
gampleman committed Jan 11, 2016
1 parent 908fc76 commit 47b3df5
Show file tree
Hide file tree
Showing 7 changed files with 54 additions and 35 deletions.
31 changes: 22 additions & 9 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ module.exports = function(grunt) {
prod: {
files: {
'build/angular-keyboard.min.js': ['build/angular-keyboard.js'],
'build/angular-keyboard-minimal.js' : ['build/angular-keyboard-minimal.js']
'build/angular-keyboard-minimal.min.js' : ['build/angular-keyboard-minimal.js']
}
}
},
Expand Down Expand Up @@ -58,14 +58,26 @@ module.exports = function(grunt) {

ngdocs: {
options: {
scripts: ['bower_components/jquery/dist/jquery.min.js', 'bower_components/angular/angular.min.js', 'bower_components/angular-animate/angular-animate.min.js', 'build/angular-keyboard.js'],
startPage: '/api/angular-keyboard',
html5Mode: false
scripts: ['bower_components/jquery/dist/jquery.min.js', 'bower_components/angular/angular.min.js', 'bower_components/angular-animate/angular-animate.min.js', 'build/angular-keyboard.js'],
startPage: '/api/angular-keyboard',
html5Mode: false
},
all: {
src: ['src/**/*.js'],
title: 'angular-keyboard',
api: true
src: ['src/**/*.js'],
title: 'angular-keyboard',
api: true
}
},

ngAnnotate: {
options: {
singleQuotes: true
},
prod: {
files: {
'build/angular-keyboard.js': ['build/angular-keyboard.js'],
'build/angular-keyboard-minimal.js' : ['build/angular-keyboard-minimal.js']
}
}
},

Expand Down Expand Up @@ -94,8 +106,9 @@ module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-contrib-connect');
grunt.loadNpmTasks('grunt-gh-pages');
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-ng-annotate');

grunt.registerTask('default', ['git-describe:run', 'concat:prod', 'concat:minimal', 'uglify']);
grunt.registerTask('prod', ['git-describe:run', 'concat:prod', 'concat:minimal', 'uglify', 'ngdocs:all', 'gh-pages', 'clean']);
grunt.registerTask('default', ['git-describe:run', 'concat:prod', 'concat:minimal', 'ngAnnotate:prod', 'uglify']);
grunt.registerTask('prod', ['git-describe:run', 'concat:prod', 'concat:minimal', 'ngAnnotate:prod', 'uglify', 'ngdocs:all', 'gh-pages', 'clean']);
grunt.registerTask('show-docs', ['concat:prod', 'concat:minimal', 'ngdocs:all', 'connect'])
};
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "angular-keyboard",
"version": "0.1.1",
"version": "0.2.0",
"main": "build/angular-keyboard.min.js",
"dependencies": {
"angular": "^1.3"
Expand Down
8 changes: 4 additions & 4 deletions build/angular-keyboard-minimal.js
Original file line number Diff line number Diff line change
Expand Up @@ -1041,7 +1041,7 @@ angular.module('angular-keyboard', ['ng']);
</file>
</example>
*/
angular.module('angular-keyboard').service('KeyboardShortcuts', function ($timeout) {
angular.module('angular-keyboard').service('KeyboardShortcuts', ['$timeout', function ($timeout) {
var publicActions = [];
var actions = [];

Expand Down Expand Up @@ -1149,7 +1149,7 @@ angular.module('angular-keyboard').service('KeyboardShortcuts', function ($timeo
return publicActions;
}
}
});;/**
}]);;/**
* @ngdoc directive
* @name angular-keyboard.directive:keyboardShortcut
* @restrict EA
Expand Down Expand Up @@ -1204,7 +1204,7 @@ angular.module('angular-keyboard').service('KeyboardShortcuts', function ($timeo
</file>
</example>
*/
angular.module('angular-keyboard').directive('keyboardShortcut', function (KeyboardShortcuts, $filter) {
angular.module('angular-keyboard').directive('keyboardShortcut', ['KeyboardShortcuts', '$filter', function (KeyboardShortcuts, $filter) {
return {

restrict: 'AE',
Expand Down Expand Up @@ -1300,4 +1300,4 @@ angular.module('angular-keyboard').directive('keyboardShortcut', function (Keybo
});
}
};
});
}]);
5 changes: 5 additions & 0 deletions build/angular-keyboard-minimal.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 10 additions & 10 deletions build/angular-keyboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -1026,7 +1026,7 @@ angular.module('angular-keyboard', ['ng']);
</file>
</example>
*/
angular.module('angular-keyboard').filter('keybinding', function ($sce) {
angular.module('angular-keyboard').filter('keybinding', ['$sce', function ($sce) {

var map = function (arr, cb) {
var newArr = [];
Expand Down Expand Up @@ -1091,7 +1091,7 @@ angular.module('angular-keyboard').filter('keybinding', function ($sce) {
}).join(' › ');
}
};
});;/**
}]);;/**
* @ngdoc directive
* @name angular-keyboard.directive:keyboardHelp
* @restrict EA
Expand Down Expand Up @@ -1161,7 +1161,7 @@ angular.module('angular-keyboard').filter('keybinding', function ($sce) {
</file>
</example>
*/
angular.module('angular-keyboard').directive('keyboardHelp', function (KeyboardShortcuts) {
angular.module('angular-keyboard').directive('keyboardHelp', ['KeyboardShortcuts', function (KeyboardShortcuts) {

return {

Expand All @@ -1186,7 +1186,7 @@ angular.module('angular-keyboard').directive('keyboardHelp', function (KeyboardS

}

});;/**
}]);;/**
* @ngdoc directive
* @name angular-keyboard.directive:keyboardSelectable
* @restrict A
Expand Down Expand Up @@ -1231,7 +1231,7 @@ To trigger keyboard shortcuts only on the selected element, use {@link angular-k
</file>
</example>
*/
angular.module('angular-keyboard').directive('keyboardSelectable', function (KeyboardShortcuts, $timeout) {
angular.module('angular-keyboard').directive('keyboardSelectable', ['KeyboardShortcuts', '$timeout', function (KeyboardShortcuts, $timeout) {
var selectedIndex = 0
, elements = []
, selectedClass
Expand Down Expand Up @@ -1345,7 +1345,7 @@ angular.module('angular-keyboard').directive('keyboardSelectable', function (Key

};

});;/**
}]);;/**
* @ngdoc directive
* @name angular-keyboard.directive:keyboardShortcut
* @restrict EA
Expand Down Expand Up @@ -1400,7 +1400,7 @@ angular.module('angular-keyboard').directive('keyboardSelectable', function (Key
</file>
</example>
*/
angular.module('angular-keyboard').directive('keyboardShortcut', function (KeyboardShortcuts, $filter) {
angular.module('angular-keyboard').directive('keyboardShortcut', ['KeyboardShortcuts', '$filter', function (KeyboardShortcuts, $filter) {
return {

restrict: 'AE',
Expand Down Expand Up @@ -1496,7 +1496,7 @@ angular.module('angular-keyboard').directive('keyboardShortcut', function (Keybo
});
}
};
});
}]);
;/**
* @ngdoc object
* @name angular-keyboard.service:KeyboardShortcuts
Expand Down Expand Up @@ -1553,7 +1553,7 @@ angular.module('angular-keyboard').directive('keyboardShortcut', function (Keybo
</file>
</example>
*/
angular.module('angular-keyboard').service('KeyboardShortcuts', function ($timeout) {
angular.module('angular-keyboard').service('KeyboardShortcuts', ['$timeout', function ($timeout) {
var publicActions = [];
var actions = [];

Expand Down Expand Up @@ -1661,4 +1661,4 @@ angular.module('angular-keyboard').service('KeyboardShortcuts', function ($timeo
return publicActions;
}
}
});
}]);
Loading

0 comments on commit 47b3df5

Please sign in to comment.