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

Documentation not generated when export object #415

Open
5 tasks done
hug33k opened this issue Apr 16, 2017 · 0 comments
Open
5 tasks done

Documentation not generated when export object #415

hug33k opened this issue Apr 16, 2017 · 0 comments

Comments

@hug33k
Copy link

hug33k commented Apr 16, 2017

Make sure these boxes are checked before submitting your issue - thank you!
(If your issue is neither a both bug nor a request, please write in a free style)

Short summary of your issue

I have a file srcs/app/misc/Password.js that returns an object with functions that I use in other files.
As you can see below, I use ES6 export and I wrote comments for documentation.
When I build documentation, it looks like the file is parsed but doc is not generated for this file

Input data for reproducing

Configuration

{
	"source": "srcs/app",
	"excludes": ["^reducers"],
	"destination": "doc",
	"experimentalProposal": {
		"classProperties": true,
		"objectRestSpread": true
	}
}

Codes

const criteria = {
	length: RegExp(/(?=.{8,})/),
	uppercase: RegExp(/(?=.*[A-Z])/),
	lowercase: RegExp(/(?=.*[a-z])/),
	numbers: RegExp(/(?=.*[0-9])/),
	symbols: RegExp(/(?=.*[!@#\$%\^&\*])/),
	nonWord: RegExp(/(?=.*[\\w])/)
};

const whitespaceRegex = RegExp(/(?=.*[\s])/);

/**
 * Password tools
 * @property {function(password:string)} strength - Password strength calculator
 * @property {function(password:string)} whitespace - Whitespace checker
 */
const tools = {
	/**
	 * Password strength calculator
	 * @param {string} password - Password to test
	 * @return {number} Password strength (%)
	 */
	strength: function (password) {
		let score = 0;
		for (let key in criteria) {
			if (criteria[key].test(password))
				score  = 1;
		}
		return score/Object.keys(criteria).length*100;
	},
	/**
	 * Whitespace checker
	 * @param {string} password
	 * @return {bool} Status (True if whitespace found)
	 */
	whitespace: function (password) {
		return whitespaceRegex.test(password);
	}
};

export default { ...tools };

Output data

Log

/usr/local/bin/node /usr/local/lib/node_modules/npm/bin/npm-cli.js run doc --scripts-prepend-node-path

> [email protected] doc /Users/hug33k/Projects/React/My_Project
> esdoc

parse: /Users/hug33k/Projects/React/My_Project/srcs/app/index.js
parse: /Users/hug33k/Projects/React/My_Project/srcs/app/misc/Password.js
parse: /Users/hug33k/Projects/React/My_Project/srcs/app/misc/Requests.js
[...other files...]
resolve: extends chain
resolve: necessary
resolve: access
resolve: unexported identifier
resolve: undocument identifier
resolve: duplication
resolve: ignore
resolve: link
resolve: markdown in description
resolve: test relation
output: badge.svg
output: identifiers.html
output: index.html
output: class/app/index.js~App.html
output: file/app/index.js.html
output: file/app/misc/Password.js.html
output: file/app/misc/Requests.js.html
[...other files...]
output: ./css
output: ./script
output: ./image
output: script/search_index.js
output: source.html
==================================
Coverage: 89.74% (35/39)
==================================

Process finished with exit code 0

Screen shot of documentation

capture d ecran 2017-04-17 a 00 44 39

Exception output (if possible)

Documentation for srcs/app/misc/Password.js

Log

Screen shot of documentation

Your environment

  • OS type and version: macOS 10.12.4
  • Node.js version: v7.4.0
  • ESDoc version: 0.5.2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant