Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding support for automation tools feature. #14

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 49 additions & 7 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,21 @@
*/
module.exports = function (grunt) {
var path = require('path');

var DEFAULT_WORKSPACE = 'workspace';
var DEFAULT_SRC = DEFAULT_WORKSPACE + '/src';
var DEFAULT_DST = DEFAULT_WORKSPACE + '/dst';
var DEFAULT_CONFIG_PATH = 'conf.json';

// demo purpose only
var DEMO_PATH = 'demo/dist';
var DEMO_SAMPLE_PATH = 'demo/sample';


// variables for cmd options with default if not provide.
var srcPath = DEFAULT_SRC; // --src
var dstPath = DEFAULT_DST; // --dst
var configPath = DEFAULT_CONFIG_PATH; // --config

grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),

Expand Down Expand Up @@ -55,23 +67,37 @@ module.exports = function (grunt) {
clean: {
demo: {
src: DEMO_PATH
},
build: {
src: dstPath
}
},

jsdoc: {
options: {
verbose: true,
configure: 'conf.json',
template: './',
'private': false
},
demo: {
src: [
DEMO_SAMPLE_PATH + '/**/*.js',

// You can add README.md file for index page at documentations.
'README.md'
],
options: {
verbose: true,
destination: DEMO_PATH,
configure: 'conf.json',
template: './',
'private': false
}
},
build: {
src: [
srcPath + '/**/*.js',
'README.md'
],
options: {
destination: dstPath,
}
}
},
Expand Down Expand Up @@ -115,9 +141,25 @@ module.exports = function (grunt) {
'watch'
]);

grunt.registerTask('build', 'Create documentations', function () {
var src = grunt.option('src');
var dst = grunt.option('dst');
var config = grunt.option('config');

srcPath = src;
dstPath = dst;
configPath = config;

grunt.log.writeln('Sources Path: ' + srcPath);
grunt.log.writeln('Destination Path: ' + dstPath);
grunt.log.writeln('Config Path: ' + configPath);

grunt.task.run(['less', 'clean:build', 'jsdoc:build']);
});

grunt.registerTask('demo', 'Create documentations for demo', [
'less',
'clean:demo',
'jsdoc:demo'
]);
};
};
37 changes: 27 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,44 @@
Jaguar.js template for JSDoc 3
Template for JSDoc 3
---
- [Jaguar.js](http://davidshimjs.github.io/jaguarjs)
- [Jaguar.js Documentations](http://davidshimjs.github.io/jaguarjs/doc)

This forked is for supporting the automation tools. For original [here](https://github.com/davidshimjs/jaguarjs-jsdoc).

- [JSDoc3](https://github.com/jsdoc3/jsdoc)
- [JSDoc3 API Documentations](http://usejsdoc.org)

Usage
---
1. If you want to create documentations with sample files, you can use commands below.
1. Before using `grunt` with this demo, running this command first
```
$ npm install
```

2. If you want to create documentations with sample files, you can use commands below.
```
$ grunt demo
```

2. You can see any output related jsdoc process with a `--debug` flag.
3. You can see any output related jsdoc process with a `--debug` flag.
```
$ grunt demo --debug
```

3. If you already have jsdoc system, you can use this project as jsdoc template.
4. Using this workspace.
```
$ grunt build
```

5. You can provide external source files or path, its destination path and config file by running this command.
```
$ grunt build --src-`source path` --dst=`destination path` --config=`configuration path`
```

6. You can provide specific Gruntfile.js and combine with options from above.
```
$ grunt build --gruntfile `path of specific Gruntfile.js` --src-`source path` --dst=`destination path` --config=`configuration path`
```

7. If you already have jsdoc system, you can use this project as jsdoc template.
```
$ jsdoc -t `project folder` -c `configuration file` `source files` `README.md file`
```
Expand All @@ -29,7 +49,7 @@ You can set options for customizing your documentations.

```
"templates": {
"applicationName": "Demo",
"applicationName": "",
"disqus": "",
"googleAnalytics": "",
"openGraph": {
Expand All @@ -50,6 +70,3 @@ You can set options for customizing your documentations.
License
---
This project under the MIT License. and this project refered by default template for JSDoc 3.

[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/davidshimjs/jaguarjs-jsdoc/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

2 changes: 1 addition & 1 deletion conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"default": {
"outputSourceFiles" : true
},
"applicationName": "Demo",
"applicationName": "",
"disqus": "",
"googleAnalytics": "",
"openGraph": {
Expand Down
214 changes: 214 additions & 0 deletions workspace/dst/Car.js.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,214 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Source: Car.js</title>





<meta property="og:title" content=""/>
<meta property="og:type" content="website"/>
<meta property="og:image" content=""/>

<meta property="og:url" content=""/>

<script src="scripts/prettify/prettify.js"></script>
<script src="scripts/prettify/lang-css.js"></script>
<script src="scripts/jquery.min.js"></script>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
<link type="text/css" rel="stylesheet" href="styles/bootstrap.min.css">
<link type="text/css" rel="stylesheet" href="styles/jaguar.css">


<script>
var config = {"monospaceLinks":true,"cleverLinks":true,"default":{"outputSourceFiles":true},"applicationName":"","disqus":"","googleAnalytics":"","openGraph":{"title":"","type":"website","image":"","site_name":"","url":""},"meta":{"title":"","description":"","keyword":""}};
</script>



</head>
<body>
<div id="wrap" class="clearfix">

<div class="navigation">
<h3 class="applicationName"><a href="index.html"></a></h3>

<div class="search">
<input id="search" type="text" class="form-control input-sm" placeholder="Search Documentations">
</div>
<ul class="list">

<li class="item" data-name="namespace">
<span class="title">
<a href="namespace.html">namespace</a>

<span class="static">static</span>

</span>
<ul class="members itemMembers">

</ul>
<ul class="typedefs itemMembers">

</ul>
<ul class="methods itemMembers">

</ul>
<ul class="events itemMembers">

</ul>
</li>

<li class="item" data-name="Child">
<span class="title">
<a href="Child.html">Child</a>

</span>
<ul class="members itemMembers">

<span class="subtitle">Members</span>

<li data-name="Child#testProperty"><a href="Child.html#testProperty">testProperty</a></li>

<li data-name="Child#testPropertyInChild"><a href="Child.html#testPropertyInChild">testPropertyInChild</a></li>

</ul>
<ul class="typedefs itemMembers">

</ul>
<ul class="methods itemMembers">

<span class="subtitle">Methods</span>

<li data-name="Child#returnObject"><a href="Child.html#returnObject">returnObject</a></li>

<li data-name="Child#testMethod"><a href="Child.html#testMethod">testMethod</a></li>

<li data-name="Child#testMethodInChild"><a href="Child.html#testMethodInChild">testMethodInChild</a></li>

</ul>
<ul class="events itemMembers">

</ul>
</li>

<li class="item" data-name="namespace.Car">
<span class="title">
<a href="namespace.Car.html">namespace.Car</a>

</span>
<ul class="members itemMembers">

</ul>
<ul class="typedefs itemMembers">

</ul>
<ul class="methods itemMembers">

<span class="subtitle">Methods</span>

<li data-name="namespace.Car#testMethod"><a href="namespace.Car.html#testMethod">testMethod</a></li>

</ul>
<ul class="events itemMembers">

<span class="subtitle">Events</span>

<li data-name="namespace.Car#event:testEvent"><a href="namespace.Car.html#event:testEvent">testEvent</a></li>

</ul>
</li>

<li class="item" data-name="Parent">
<span class="title">
<a href="Parent.html">Parent</a>

</span>
<ul class="members itemMembers">

<span class="subtitle">Members</span>

<li data-name="Parent#testProperty"><a href="Parent.html#testProperty">testProperty</a></li>

</ul>
<ul class="typedefs itemMembers">

</ul>
<ul class="methods itemMembers">

<span class="subtitle">Methods</span>

<li data-name="Parent#testMethod"><a href="Parent.html#testMethod">testMethod</a></li>

</ul>
<ul class="events itemMembers">

</ul>
</li>

</ul>
</div>
<div class="main">
<h1 class="page-title" data-filename="Car.js.html">Source: Car.js</h1>




<section>
<article>
<pre class="prettyprint source"><code>(function (w) {
/**
* quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
* @class
* @name namespace.Car
*/
w.namespace.Car = function () {
};

w.namespace.Car.prototype = /** @lends namespace.Car.prototype */{
/**
* Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
*/
testMethod: function () {
},

testMethodUnNotated: function () {
},

testEvent: function () {
/**
* tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
* @name namespace.Car#testEvent
* @event
* @param {Event} e
*/
test.trigger();
}
};
})(window);
</code></pre>
</article>
</section>







<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Fri May 23 2014 21:29:05 GMT+0700 (ICT)
</footer>
</div>
</div>
<script>prettyPrint();</script>
<script src="scripts/linenumber.js"></script>
<script src="scripts/main.js"></script>
</body>
</html>
Loading