Permalink
Browse files

Even more jsDoc

  • Loading branch information...
1 parent cba0b70 commit 1da6cc84e3bf81798cc74c6602624dd5ad6a545d @mistic100 committed Feb 13, 2017
View
@@ -2,9 +2,6 @@ var initConfig = require('./build/initConfig');
var processLang = require('./build/processLang');
var removeJshint = require('./build/removeJshint');
var cleanLn = require('./build/cleanLn');
-var taskDescribeTriggers = require('./build/tasks/describeTriggers');
-var taskDescribeErrors = require('./build/tasks/describeErrors');
-var taskListModules = require('./build/tasks/listModules');
module.exports = function(grunt) {
require('time-grunt')(grunt);
@@ -377,12 +374,6 @@ module.exports = function(grunt) {
});
- // custom tasks
- taskDescribeTriggers(grunt, config);
- taskDescribeErrors(grunt, config);
- taskListModules(grunt, config);
-
-
grunt.registerTask('build_js', [
'concat:lang_temp',
'concat:js',
View
@@ -62,10 +62,8 @@ grunt --languages=fr,it
#### Other commands
* `grunt test` to run jshint/jscs/scsslint and the QUnit test suite.
- * `grunt list_modules` to get the list of available plugins and languages.
- * `grunt describe_triggers` to get the list of all triggers.
- * `grunt describe_errors` to get the list of all fatal errors.
- * `grunt watch` to automatically build the library when modifying the source files.
+ * `grunt serve` to open the example page with automatic build and livereload.
+ * `grunt jsdoc` to generate the documentation.
### Inspiration
* [Knockout Query Builder](http://kindohm.github.io/knockout-query-builder/)
@@ -1,39 +0,0 @@
-module.exports = function(grunt, config) {
- grunt.registerTask('describe_errors', 'List QueryBuilder errors.', function() {
- var errors = {};
- var total = 0;
-
- for (var f in config.all_js_files) {
- grunt.file.read(config.all_js_files[f]).split(/\r?\n/).forEach(function(line, i) {
- var matches = /Utils\.error\((?:[^)]+, )?'(\w+)', '([^)]+)'([^)]*)\);/.exec(line);
- if (matches !== null) {
- (errors[matches[1]] = errors[matches[1]] || []).push({
- type: matches[1],
- message: matches[2],
- file: config.all_js_files[f],
- line: i,
- args: matches[3].slice(2).split(', ')
- });
-
- total++;
- }
- });
- }
-
- grunt.log.write('\n');
-
- for (var e in errors) {
- grunt.log.writeln((e + 'Error')['cyan']);
- errors[e].forEach(function(error) {
- var message = error.message.replace(/{([0-9]+)}/g, function(m, i) {
- return error.args[parseInt(i)]['yellow'];
- });
- grunt.log.writeln(' ' + (error.file + ':' + error.line)['red']);
- grunt.log.writeln(' ' + message);
- });
- grunt.log.write('\n');
- }
-
- grunt.log.writeln((total + ' Errors in QueryBuilder.')['cyan']['bold']);
- });
-};
@@ -1,36 +0,0 @@
-module.exports = function(grunt, config) {
- grunt.registerTask('describe_triggers', 'List QueryBuilder triggers.', function() {
- var triggers = {};
- var total = 0;
-
- for (var f in config.all_js_files) {
- grunt.file.read(config.all_js_files[f]).split(/\r?\n/).forEach(function(line, i) {
- var matches = /(e = )?(?:this|that)\.(trigger|change)\('(\w+)'([^)]*)\);/.exec(line);
- if (matches !== null) {
- triggers[matches[3]] = {
- name: matches[3],
- type: matches[2],
- file: config.all_js_files[f],
- line: i,
- args: matches[4].slice(2),
- prevent: !!matches[1]
- };
-
- total++;
- }
- });
- }
-
- grunt.log.write('\n');
-
- for (var t in triggers) {
- grunt.log.write(t['cyan'] + ' ' + triggers[t].type['magenta']);
- if (triggers[t].prevent) grunt.log.write(' (*)'['yellow']);
- grunt.log.write('\n');
- grunt.log.writeln(' ' + (triggers[t].file + ':' + triggers[t].line)['red'] + ' ' + triggers[t].args);
- grunt.log.write('\n');
- }
-
- grunt.log.writeln((total + ' Triggers in QueryBuilder.')['cyan']['bold']);
- });
-};
@@ -1,23 +0,0 @@
-module.exports = function(grunt, config) {
- grunt.registerTask('list_modules', 'List QueryBuilder plugins and languages.', function() {
- grunt.log.writeln('\nAvailable QueryBuilder plugins:\n');
-
- for (var p in config.all_plugins) {
- grunt.log.write(p['cyan']);
-
- if (grunt.file.exists(config.all_plugins[p].replace(/js$/, 'scss'))) {
- grunt.log.write(' + CSS');
- }
-
- grunt.log.write('\n');
- }
-
- grunt.log.writeln('\nAvailable QueryBuilder languages:\n');
-
- for (var l in config.all_langs) {
- if (l !== 'en') {
- grunt.log.writeln(l['cyan']);
- }
- }
- });
-};
Oops, something went wrong.

0 comments on commit 1da6cc8

Please sign in to comment.