Skip to content
This repository has been archived by the owner on Jun 29, 2021. It is now read-only.

Commit

Permalink
Docs, typedoc (#336)
Browse files Browse the repository at this point in the history
* removed "required: true" where it isnt required

* Adding TypeDoc
- adding typedoc dev-depdendency
- adding script to generate the docs
- adding "doc/" to the "clean" script

* Adding Docs to much files
- remove TransformStringOptions from ValidateStringOptions
- config: adding a small check if config.Memory is enabled
- config: moving "import" to the top of the file, like in any other file
- adding a note to CONTRIBUTING
- adding template to request a feature
- adding minor fixes to other Issue Templates

- adding prop's docs
- adding plugin's docs
- adding method's docs
- adding index's docs
- adding utils docs
- adding hooks docs
- adding data's docs (some)

- modify person model
  • Loading branch information
hasezoey authored and Ben305 committed Jul 23, 2019
1 parent c31be73 commit ea1c0ec
Show file tree
Hide file tree
Showing 20 changed files with 493 additions and 87 deletions.
1 change: 1 addition & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
- Make sure you have run tslint & if something should come up, fix it to keep the code in one style
- When you add documentation please make sure to keep the existing style
- Make sure you read [Mastering-Markdown](https://guides.github.com/features/mastering-markdown/), thanks
- Make sure when you make documentation of a something, you use the [TSDoc standard](https://api-extractor.com/pages/tsdoc/doc_comment_syntax/), not JSDoc, thanks

---
*this is just the base, changes will occure*
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/feature parity.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ assignees: ''
---
*please remove the parts in "---"*

## What to include in your Questions
## How to Structure your Feature Parity request

- remove "not needed" from your parity below
- Make sure you read [Mastering-Markdown](https://guides.github.com/features/mastering-markdown/) , thanks
- Make sure you read [Mastering-Markdown](https://guides.github.com/features/mastering-markdown/), thanks

---

Expand Down
25 changes: 25 additions & 0 deletions .github/ISSUE_TEMPLATE/feature.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
name: Feature
about: Request a feature
title: '[Request] '
labels: request
assignees: ''
---

---
*please remove the parts in "---"*

## How to Structure your Feature request

- When you have an Implementation Idea, remove "*no*"
- Make sure you read [Mastering-Markdown](https://guides.github.com/features/mastering-markdown/), thanks

---

## Describe what you need | want

description here

## Do you have already an idea for the implementation?

*no*
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/question.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ assignees: ''

- Make sure you provide an understandable question
- Make sure you provide all the needed code
- Make sure you read [Mastering-Markdown](https://guides.github.com/features/mastering-markdown/) , thanks
- Make sure you read [Mastering-Markdown](https://guides.github.com/features/mastering-markdown/), thanks

---
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -228,3 +228,6 @@ lib

# the config
test/config.json

# typedoc docs folder
doc/
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ before_install:
# sed -i 's/"\^/"/g' package.json
npm i mongoose@5.5.14 --no-save
script:
# Audit to make sure there are no vulnerabilities
- npm audit
# Audit to make sure there are no vulnerabilities, but do not affect the whole build
- (npm audit || exit 0)
# Test everything
- npm test
deploy:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ class User extends Typegoose {
@prop()
job?: Job;

@prop({ ref: Car, required: true })
@prop({ ref: Car })
car: Ref<Car>;
}
```
Expand Down
178 changes: 178 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
"test": "npm run lint && nyc npm run mocha",
"mocha": "npm run build && mocha \"./test/*.ts\" --timeout 15000",
"coverage": "nyc report --reporter=text-lcov | coveralls",
"clean": "rimraf lib && rm .tsbuildinfo && rimraf .nyc_output && rimraf coverage"
"clean": "rimraf lib && rm .tsbuildinfo && rimraf .nyc_output && rimraf coverage && rimraf doc",
"doc": "typedoc --out ./doc ./src --mode modules"
},
"repository": {
"type": "git",
Expand All @@ -34,10 +35,10 @@
"devDependencies": {
"@istanbuljs/nyc-config-typescript": "^0.1.3",
"@types/chai": "4.1.3",
"@types/chai-as-promised": "^7.1.0",
"@types/mocha": "^5.2.7",
"@types/mongoose": "^5.5.0",
"@types/node": "8.10.0",
"@types/chai-as-promised": "^7.1.0",
"chai": "4.1.2",
"chai-as-promised": "7.1.1",
"coveralls": "^3.0.4",
Expand All @@ -53,6 +54,7 @@
"ts-node": "^8.3.0",
"tslint": "5.17.0",
"tslint-config-prettier": "1.18.0",
"typedoc": "^0.14.2",
"typescript": "3.5.1"
},
"dependencies": {
Expand Down
5 changes: 5 additions & 0 deletions src/data.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
/** @format */

export const methods = { staticMethods: {}, instanceMethods: {} };
/** Schema Collection */
export const schema = {};
/** Models Collection */
export const models = {};
/** Virtuals Collection */
export const virtuals = {};
/** Hooks Collection */
export const hooks = {};
/** Plugins Collection */
export const plugins = {};
// tslint:disable-next-line: ban-types
export const constructors: { [key: string]: Function } = {};
Loading

0 comments on commit ea1c0ec

Please sign in to comment.