Skip to content

TagSpaces is an offline, open source, document manager with tagging support

integrating jsdoc

uggrock5a54cdeca1bb
diff --git a/.gitignore b/.gitignore
index 15a3e347a..8b029f0f0 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,9 +4,10 @@ build.properties
CHANGELOG.TXT
runfirefox
runfirefoxbeta
-node_modules/*
+node_modules
+docs
data/pro
-data/node-webkit/data
+nwjsdata
data/node-webkit/locales
data/node-webkit/ffmpegsumo.dll
data/node-webkit/icudt.dll
diff --git a/Gruntfile.js b/Gruntfile.js
index cba7e984e..dd4da91f8 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -195,17 +195,6 @@ module.exports = function(grunt) {
}
}
},
- /*jsdoc : {
- dist : {
- src: ['data/js/*.js', "Readme.md"],
- options: {
- destination: 'build/doc',
- template: "node_modules/grunt-jsdoc/node_modules/ink-docstrap/template",
- tutorials: "doc/client-api",
- configure: "jsdoc.conf.json"
- }
- }
- },*/
watch: {
scripts: {
files: ['Gruntfile.js', '{data/js,data/ext}/**/*.js'],
@@ -215,6 +204,19 @@ module.exports = function(grunt) {
}
}
},
+ shell: {
+ jsdav: {
+ command: 'node webdavserver.js',
+ options: {
+ execOptions: {
+ maxBuffer: 1024 * 1024 * 1024
+ }
+ }
+ },
+ jsdoc: {
+ command: 'node node_modules/jsdoc/jsdoc.js -c jsdoc.conf.json --verbose',
+ },
+ },
compress: {
chrome: {
options: {
@@ -239,31 +241,22 @@ module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-compress');
grunt.loadNpmTasks("grunt-jscs");
- grunt.loadNpmTasks('grunt-jsdoc');
+ grunt.loadNpmTasks('grunt-shell');
grunt.loadNpmTasks('grunt-fixmyjs');
grunt.loadNpmTasks('grunt-jsbeautifier');
//tasks
grunt.registerTask('checkStyle', ['jshint', 'jscs']);
- //grunt.registerTask('dist-doc', ['jsdoc', 'compress:doc']);
grunt.registerTask('jsfix', ['jsbeautifier', 'checkstyle']); // 'fixmyjs:core'
grunt.registerTask('bumpVersion', ['init', 'replace:templates']);
grunt.registerTask('default', ['help']);
- grunt.registerTask('jsdav', 'Run JSDav Server.', function() {
- var jsDAV = require("jsDAV/lib/jsdav");
- jsDAV.debugMode = true;
- var jsDAV_Auth_Backend_File = require("jsDAV/lib/DAV/plugins/auth/file");
- jsDAV.createServer({
- node: "./data",
- authBackend: jsDAV_Auth_Backend_File.new("./jsdavauth"),
- realm: "jdavtest"
- }, 8000);
- grunt.log.writeln("WebDAV server started");
- }),
-
+ grunt.registerTask('runDav', ['shell:jsdav']),
+ grunt.registerTask('generateDocs', ['shell:jsdoc']),
grunt.registerTask('help', 'Printing help for this script.', function() {
grunt.log.writeln("Supported grunt tasks:");
grunt.log.writeln(" - checkStyle");
+ grunt.log.writeln(" - runDav");
+ grunt.log.writeln(" - generateDocs");
grunt.log.writeln(" - bumpVersion");
});
diff --git a/data/js/core.api.js b/data/js/core.api.js
index eeea830ac..e2d608703 100644
--- a/data/js/core.api.js
+++ b/data/js/core.api.js
@@ -2,6 +2,11 @@
* Use of this source code is governed by a AGPL3 license that
* can be found in the LICENSE file. */
/*global isNode, isWin, isFirefox, Mousetrap, gui */
+
+/**
+ * Description
+ * @class TSCORE
+ */
define(function(require, exports, module) {
'use strict';
console.log('Loading core.api.js ...');
@@ -36,6 +41,12 @@ define(function(require, exports, module) {
var subfoldersDirBrowser;
var directoryBrowser;
+
+ /**
+ * Initalizes the application
+ * @memberof TSCORE
+ * @method initApp
+ */
function initApp() {
console.log('Init application');
tsSettings.loadSettingsLocalStorage();
diff --git a/data/js/core.ui.js b/data/js/core.ui.js
index 2f5146596..7919b39b4 100644
--- a/data/js/core.ui.js
+++ b/data/js/core.ui.js
@@ -468,7 +468,11 @@ define(function(require, exports, module) {
}
});
$('#aboutDialogBack').click(function() {
- $('#aboutIframe').attr('src', 'about.html');
+ if(TSCORE.PRO) {
+ $('#aboutIframe').attr('src', 'pro/about.html');
+ } else {
+ $('#aboutIframe').attr('src', 'about.html');
+ }
});
// Open About Dialog
$('#openAboutBox').click(function() {
diff --git a/jsdoc.conf.json b/jsdoc.conf.json
new file mode 100644
index 000000000..8fc6108a4
--- /dev/null
+++ b/jsdoc.conf.json
@@ -0,0 +1,44 @@
+{
+ "tags": {
+ "allowUnknownTags" : true
+ },
+ "plugins": ["node_modules/jsdoc/plugins/markdown"],
+ "source": {
+ "include": [ "data/" ],
+ "exclude": [
+ "data/libs/",
+ "data/ext/",
+ "data/mozilla/",
+ "data/node-webkit/node_modules/",
+ "data/pro/node_modules/",
+ "data/web/webdavlib/",
+ "data/cordova/fastclick/"
+ ]
+ },
+ "templates": {
+ "cleverLinks" : false,
+ "monospaceLinks" : false,
+ "outputSourceFiles" : true,
+ "outputSourcePath" : true,
+ "systemName" : "TagSpaces API",
+ "footer" : "",
+ "copyright" : "Copyright © 2012-2015 The contributors to the TagSpaces project.",
+ "navType" : "vertical",
+ "theme" : "united",
+ "linenums" : true,
+ "collapseSymbols" : false,
+ "inverseNav" : true,
+ "highlightTutorialCode" : true
+ },
+ "markdown": {
+ "parser" : "gfm",
+ "hardwrap" : true
+ },
+ "opts": {
+ "template": "node_modules/ink-docstrap/template",
+ "encoding": "utf8",
+ "destination": "./docs/",
+ "recurse": true,
+ "readme": "README.md"
+ }
+}
diff --git a/package.json b/package.json
index 992de93ac..4002e11ed 100644
--- a/package.json
+++ b/package.json
@@ -37,8 +37,10 @@
"grunt-jsbeautifier": "~0.2.8",
"grunt-fixmyjs": "~0.3.0",
"grunt-jscs": "~1.1.0",
- "grunt-jsdoc": "^0.5.7",
+ "grunt-shell": "~1.1.2",
"grunt-mozilla-addon-sdk": "~0.3.2",
+ "jsdoc": "^3.3.3",
+ "ink-docstrap": "^0.5.2",
"jsDAV": "~0.3.2"
},
"private": true