diff --git a/README.md b/README.md index 8a7c29a240cdfc99b569c851e739a78518afaeb5..5dd357dd7d956444fc8770636401c6e704dd5c00 100644 --- a/README.md +++ b/README.md @@ -41,6 +41,7 @@ Not sure where to start? watch the training videos linked in the [Introduction t * [Running in production mode](#running-in-production-mode) * [Cleaning](#cleaning) * [Testing](#testing) +* [Documentation](#documentation) * [Other commands](#other-commands) * [Recommended Editors/IDEs](#recommended-editorsides) * [Collaborating](#collaborating) @@ -148,6 +149,15 @@ To run all the tests (e.g.: to run tests with Continuous Integration software) y `yarn run ci` Keep in mind that this command prerequisites are the sum of unit test and E2E tests. +##Documentation +To build the code documentation we use [TYPEDOC](http://typedoc.org). TYPEDOC is a documentation generator for TypeScript projects. +It extracts informations from properly formatted comments that can be written within the code files. +Follow the instructions [here](http://typedoc.org/guides/doccomments/) to know how to make those comments. + +Run: +`yarn run docs` +to produce the documentation that will be available in the 'doc' folder. + ## Other commands There are many more commands in the `scripts` section of `package.json`. Most of these are executed by one of the commands mentioned above. @@ -208,6 +218,7 @@ dspace-angular ├── tsconfig.aot.json * TypeScript config for production builds ├── tsconfig.json * TypeScript config for development build ├── tslint.json * TSLint (https://palantir.github.io/tslint/) configuration +├── typedoc.json * TYPEDOC configuration ├── yarn.lock * Yarn lockfile (https://yarnpkg.com/en/docs/yarn-lock) ├── webpack.config.ts * Webpack (https://webpack.github.io/) config for development builds ├── webpack.test.config.ts * Webpack (https://webpack.github.io/) config for testing diff --git a/package.json b/package.json index 9415ac7ecbf921b77483d099ea547bc896c6480d..3c542224576c399d682125802670ed737c59140a 100644 --- a/package.json +++ b/package.json @@ -59,7 +59,7 @@ "debug:start": "yarn run build && yarn run debug:server", "debug:build": "node-nightly --inspect --debug-brk node_modules/webpack/bin/webpack.js", "debug:build:prod": "node-nightly --inspect --debug-brk node_modules/webpack/bin/webpack.js --config webpack.prod.config.ts", - "docs": "typedoc --options typedoc.json ./src", + "docs": "typedoc --options typedoc.json ./src/", "lint": "tslint \"src/**/*.ts\" || true", "global": "npm install -g @angular/cli nodemon npm-check-updates rimraf ts-node typedoc typescript webpack webpack-bundle-size-analyzer rollup marked node-gyp", "ci": "yarn run lint && yarn run build:prod:ngc:json && yarn run test && npm-run-all -p -r server e2e", @@ -180,7 +180,7 @@ "ts-node": "1.7.2", "tslint": "4.0.2", "tslint-loader": "3.3.0", - "typedoc": "0.5.1", + "typedoc": "0.5.7", "typescript": "2.0.10", "v8-lazy-parse-webpack-plugin": "0.3.0", "webpack": "2.1.0-beta.27", diff --git a/typedoc.json b/typedoc.json new file mode 100644 index 0000000000000000000000000000000000000000..5c289f3eb2bd7b098c4b8d1a15685f613c14bbc5 --- /dev/null +++ b/typedoc.json @@ -0,0 +1,19 @@ +{ + "out" : "./doc", + "mode" : "modules", + "module" : "commonjs", + "target" : "ES5", + "theme" : "default", + "name" : "Angular 2 UI for DSpace", + "readme" : "./README.md", + "exclude" : "**/*+(spec.ts|po.ts|index.ts|.json|.js|.config.ts)", + "excludeExternals" : "true", + "ignoreCompilerErrors" : "true", + "experimentalDecorators" : "true", + "emitDecoratorMetadata" : "true", + "moduleResolution" : "node", + "preserveConstEnums" : "true", + "stripInternal" : "true", + "suppressExcessPropertyErrors" : "true", + "suppressImplicitAnyIndexErrors": "true" +} \ No newline at end of file