-
Notifications
You must be signed in to change notification settings - Fork 35
/
package.json
executable file
·63 lines (63 loc) · 11.4 KB
/
package.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
{
"name": "docular",
"description": "Extensible Documentation Generation Based on AngularJS's Documentation Generation",
"version": "0.8.14",
"homepage": "http://grunt-docular.com",
"author": {
"name": "Stephen Liberty",
"email": "sliberty@vertafore.com"
},
"repository": {
"type": "git",
"url": "https://github.com/Vertafore/docular.git"
},
"bugs": {
"url": "https://github.com/Vertafore/docular/issues"
},
"licenses": [
{
"type": "MIT",
"url": "http://opensource.org/licenses/MIT"
},
{
"type": "CC_by_3.0",
"url": "https://creativecommons.org/licenses/by/3.0/us/legalcode"
}
],
"main": "index.js",
"engines": {
"node": ">= 0.8.0"
},
"scripts": {
"test": "grunt test"
},
"devDependencies": {
"grunt-contrib-jshint": "~0.1.1",
"grunt-contrib-clean": "~0.4.0",
"grunt-contrib-nodeunit": "~0.4.1",
"grunt": "~0.4.1",
"grunt-cli": "*",
"grunt-bump": "*"
},
"dependencies": {
"colors": "*",
"q": "*",
"node.extend": "*",
"request": "*",
"fs-extra": "*",
"inherit": "*",
"htmlparser2": "*",
"bower": "~1.3.11",
"swig": "*",
"less": "~1.7.5"
},
"keywords": [
"angular",
"angularjs",
"documentation"
],
"readme": "@doc overview\n@name index\n@description\n\n#Docular\n\n> Extensible Documentation Generation Based on AngularJS's Documentation Generation\n\n> NOTE: NodeJS has access to your filesystem so please proceed with caution. I will not be held responsible for side effects of bad code or malicious docular extensions.\n\n#Grunt Plugin For Docular: \"grunt-docular\"\n\n> Docular is best used as a dependency by the grunt-docular plugin.\n> The grunt-docular plugin exposes the api in a simple fashion and helps you include documentation tasks in your grunt-based build process.\n\n![docular](http://grunt-docular.com/public/docular-screenshot.png \"Docular Image\")\n\n## Getting Started\nThis plugin requires Grunt `~0.4.1`\n\nIf you haven't used [Grunt](http://gruntjs.com/) before, be sure to check out the [Getting Started](http://gruntjs.com/getting-started) guide, as it explains how to create a [Gruntfile](http://gruntjs.com/sample-gruntfile) as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:\n\n```shell\nnpm install grunt-docular --save-dev\n```\n\nOne the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:\n\n```js\ngrunt.loadNpmTasks('grunt-docular');\n```\n\n## The \"docular\" task\n\n### Overview\nIn your project's Gruntfile, add a section named `docular` to the data object passed into `grunt.initConfig()`.\n\n```js\n\ngrunt.initConfig({\n docular: {\n baseUrl: 'http://localhost:8000', //base tag used by Angular\n showAngularDocs: true, //parse and render Angular documentation\n showDocularDocs: true, //parse and render Docular documentation\n docAPIOrder : ['doc', 'angular'], //order to load ui resources\n groups: [] //groups of documentation to parse\n },\n})\n\n```\n\n### Options\n``baseURL`` (Type: `string`, default: `\"\"`): Angular uses the <base> tag to designate the baseUrl for an app. This helps resolve routes and location through the $location service\n\n``showAngularDocs`` (Type: `boolean`, default: `false`): The angular source is included in the docular package so it can be parsed and rendered to both help test the docular package and provide angular documentation for apps that use it.\n\n``showDocularDocs`` (Type: `boolean`, default: `false`): Setting this to true will have docular parse and render the documentation for the docular plugin itself. This is helpful for developers to understand the default doc api (docular-doc-api-doc) to aid them in creating their own docular api extensions.\n\n``docAPIOrder`` (Type: `array [string]`, default: `['doc', 'angular']`): For each docular api extension we need to know the order to include the UI scripts and CSS due to overrides etc..\n\n``groups`` (Type: `array [group object]`, default: `[]`): This is an array of group objects. Groups have their own api, but generally consists of some metadata and lists of files that need to be parsed and rendered for documentation. For more check out\n\n### Groups\nGroup configurations for Angular and the docular documentation are stored and pushed into all groups if you set the showAngularDocs and showDocularDocs options to true. These configurations are identical to what you would use to configure docular to parse and render your own documentation.\n\nHere is the group configuration for Angular:\n```js\n{\n groupTitle: 'Angular Docs', //Title used in the UI\n groupId: 'angular', //identifier and determines directory\n groupIcon: 'icon-book', //Icon to use for this group\n sections: [\n {\n id: \"api\",\n title:\"Angular API\",\n scripts: [\"lib/angular/js\"]\n },\n {\n id: \"guide\",\n title: \"Developers Guide\",\n docs: [\"lib/angular/ngdocs/guide\"]\n },\n {\n id: \"tutorial\",\n title: \"Tutorial\",\n docs: [\"lib/angular/ngdocs/tutorial\"]\n },\n {\n id: \"misc\",\n title: \"Overview\",\n docs: [\"lib/angular/ngdocs/misc\"]\n }\n ]\n}\n```\n### Group Object Attributes\n``groupTitle`` (required) `string` : The string value that will propogate up to the UI as the name of the tab\n\n``groupId`` (required) `string` : This will be the id used globally within the code and as the directory for this code. It will show in the URL for these docs ie 'http:/localhost:8000/documentation/<groupId>/blah blah'.\n\n``groupIcon`` `(default=\"icon-book\")` string : This is an optional attribute that determines the class put on the icon attribute in the UI. This comes from Twitter Boostrap. See [Twitter Boostrap](http://twitter.github.io/bootstrap/base-css.html#images)\n\n``sections`` (required) `array [sectionObject]` : This determines the different sections of documentation within your group. You can see the Angular example above in how it's documentation is broken up into sections that make logical sense.\n\n``sectionObject.id`` (required) `string` : This will be the id used globally within the code and will be the identifier in the url for documentation within this section ie 'http:/localhost:8000/documentation/<groupId>/<sectionObject.id>/blah blah'.\n\n``sectionObject.title`` (required) `string` : The title that will show in the tab drop downs for this section of documentation\n\n``sectionObject.scripts`` (optional) `array [string]` : The scripts array is an array of paths to folders and files that contain scripts (really of any kind... could probably be php or java or whatever although that has not been tested). These files will be parsed for documentation that resides within comments (within /** and *). The end of a comment will conclude the end of a complete documentation entry.\n\n``sectionObject.docs`` (optional) `array [string]` : The docs array is an array of paths to folders and files that contain documentation. These files will be parsed assuming that the docs here are not within comments. So this is basically a text file full of docs. This is a great way to provide supplimental documentation, tutorials, guides, and definitions for types etc..\n\n\n## Contributing\nContributing includes setting up a dev environment by cloning docular, grunt-docular, doc apis (optional), and setting up an example project. You must have NodeJS installed as well as npm (which now should come bundled with NodeJS).\n\nNodeJS can be installed here [Install NodeJS](http://nodejs.org/)\n\nHere is an example setup:\n\n### Create a directory for development\nIn the command line create a directory and cd into it:\n```shell\nmkdir docular-environment\ncd docular-environment\n```\n\n### Clone docular, grunt-docular, and docular api extensions\nFrom within your environment directory:\n```shell\ngit clone https://github.com/Vertafore/grunt-docular/docular.git\ngit clone https://github.com/Vertafore/grunt-docular/grunt-docular.git\n```\noptionally clone the docular extensions\n```shell\ngit clone https://github.com/Vertafore/grunt-docular/docular-doc-api-doc.git\ngit clone https://github.com/Vertafore/grunt-docular/docular-doc-api-angular.git\n```\n\n### Setup Development Sym Links\nNPM provides some sweet methods to setup a dev environment. This allows you to develop NPM dependencies for other NPM packages. [npm link documentation](https://npmjs.org/doc/link.html).\n\nIf you follow all of these steps you will have a dev environment that can run the grunt-docular grunt plugin. The grunt-plugin cloned repo will be isolated outside your docular-test code via sym links, so changes you make in the grunt-plugin code will be kept isolated from changes in your docular-test code. Additionally, docular will be sym linked from the grunt-docular code. This allows you to isolate changes for the docular code while seeing its changes in the docular-test environment.\n\nSetup global symlink for docular:\n```shell\ncd docular\nnpm link\ncd ..\n```\n\nSetup global symlink for grunt-docular:\n```shell\ncd grunt-docular\nnpm link\ncd ..\n```\n\nSetup global symlink for docular extensions (optional):\n```shell\ncd docular-doc-api-doc\nnpm link\ncd ..\ncd docular-doc-api-angular\nnpm link\ncd ..\n```\n\nWire up docular sym link in the grunt-docular package. CD into the grunt-docular directory:\n```shell\ncd grunt-docular\nnpm link docular\ncd ..\n```\n\nOptionally wire up the sym links for the docular extension api:\n```shell\ncd docular\nnpm link docular-doc-api-doc\nnpm docular-doc-api-angular\ncd ..\n```\n\nOkay now time to setup the separate test project from your environment base:\n```shell\nmkdir docular-test\ncd docular-test\n```\n\nUse npm to create an npm package for your test. Run `npm init` and follow the directions, you can use all the defaults:\n```shell\nnpm init\n```\n\nFor Grunt v4.x\n```shell\nnpm install grunt\n```\n\nUse npm to access the global sym link for the grunt-docular npm package:\n```shell\nnpm link grunt-docular\n```\n\nCreate the following Gruntfile.js file within the root of your docular-test npm package:\n```js\nmodule.exports = function(grunt) {\n\n // Project configuration.\n grunt.initConfig({\n\n pkg: grunt.file.readJSON('package.json'),\n\n docular: {\n groups: [],\n showDocularDocs: true,\n showAngularDocs: true\n }\n\n });\n\n // Load the plugin that provides the \"docular\" and \"docular-server\" task.\n grunt.loadNpmTasks('grunt-docular');\n\n // Default task(s).\n grunt.registerTask('default', ['docular']);\n\n};\n```\n\n### Run the grunt-docular tasks\nNow within your docular-test project, run grunt to compile the Angular and Docular source:\n```shell\ngrunt docular // you can also do \"grunt\" beaucse we set up \"docular\" as the default\n```\n\nNow start up the NodeJS server so you can view the documentation:\n```shell\ngrunt docular-server\n```\n\n### Commit your changes\nAs usual, edit the different packages.. your changes will immediatly propagate through the sym links to your docular-test project. Submit pull requests as desired. Thank you so much for you time, energy, and ingenuity!!\n\n\n## Release History\nversion: 0.1.1\n* Included hooks into the docular api for the docular and docular-server api\n",
"readmeFilename": "README.md",
"_id": "docular@0.6.4",
"_from": "docular@0.6.4"
}