Skip to content
Merged
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
6 changes: 6 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"presets": ["flow"],
"plugins": [
"transform-es2015-modules-commonjs"
]
}
6 changes: 5 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
test/fixture/*
__tests__/fixture/*
src/default_theme/*
coverage/*
lib/*
declarations/*
3 changes: 2 additions & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"root": true,
"parser": "babel-eslint",
"parserOptions": {
"sourceType": "script"
"sourceType": "module"
},
"plugins": [
"flowtype"
Expand Down Expand Up @@ -31,6 +31,7 @@
},
"extends": [
"eslint:recommended",
"plugin:flowtype/recommended",
"prettier"
],
"env": {
Expand Down
3 changes: 2 additions & 1 deletion .flowconfig
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
[ignore]
.*node_modules/.cache/.*
.*node_modules/conventional-changelog-core/test/fixtures/.*
.*/test/fixture/.*
.*/__tests__/fixture/.*
./lib/.*

[include]

Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/lib
coverage
.nyc_output
node_modules
/node_modules
3 changes: 3 additions & 0 deletions test/.eslintrc → __tests__/.eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,8 @@
"rules": {
"valid-jsdoc": [0],
"no-unused-vars": [0]
},
"env": {
"jest": true
}
}
59 changes: 59 additions & 0 deletions __tests__/__snapshots__/bin-readme.js.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`readme command --readme-file 1`] = `
"# A title

# API

<!-- Generated by documentation.js. Update this documentation by updating the source code. -->

## foo

A function with documentation.

**Parameters**

- \`a\` {string} blah

Returns **[number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)** answer

## bar

A second function with docs

**Parameters**

- \`b\`

# Another section
"
`;

exports[`readme command updates README.md 1`] = `
"# A title

# API

<!-- Generated by documentation.js. Update this documentation by updating the source code. -->

## foo

A function with documentation.

**Parameters**

- \`a\` {string} blah

Returns **[number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)** answer

## bar

A second function with docs

**Parameters**

- \`b\`

# Another section
"
`;
Loading