Commit graph

22 commits

Author SHA1 Message Date
Endilie Yacop Sucipto
9f718a5097 Refactor + add more tests (Part 2) (#854)
* Refactor doc in server.js & generate.js

* Refactor finding metadata with find() & avoid param reassign

* Refactor replacing markdown link to html + add test

* Minify func to getFile & add test

* use ./ for md link as well

* nits & better test

* better mdToHtmlify

* babel-register on versions & write-translations to transpile ES6 in server/env.js

* better docs test & move out metadata to fixtures

* Update .babelrc
2018-07-16 01:45:23 -07:00
Yangshun Tay
a7a214fb3a ESLintify Part 3 (#846)
* ESLintify Part 3

* ESLintify Part 3

* ESLintify Part 3
2018-07-11 18:21:31 +08:00
Yangshun Tay
5ac2cee658
ESLintify Part 2 (#841)
* ESLintify Part 2

* Fix

* Fix tests

* Fix tests

* Fix tests
2018-07-10 21:53:08 -07:00
Yangshun Tay
e8e3f42685
ESLintify Part 1 (#837)
* ESLint-ify

* Allow empty try/catch

* Escape regexp
2018-07-08 09:13:18 -07:00
Rémi Doreau
a77ae958db Duplicate code in readMetadata.js & versionFallback.js #725 (#726)
* Duplicate code in readMetadata.js & versionFallback.js #725

* Putting back package-lock.json

* Rename lib/server/utilsMetadata.js -> lib/server/metadataUtils.js

* Update splitHeader + extractMetadata

* Update prettier
2018-06-12 12:25:23 +08:00
Endilie Yacop Sucipto
d04b3ca87b Enable sub-directories in docs/ (#705) 2018-06-07 07:41:28 -07:00
Endilie Yacop Sucipto
d28b864a59 Don't start server if versions.js is missing but versioning is enabled (#714)
* don't start server if versions.js missing but versioning is enabled

* refactor

* fix nits

* refactor & address review
2018-06-02 23:45:36 -07:00
Sujono
436a3d04d2 Show warning console if version.js file is missing (#678) 2018-05-21 00:37:05 -07:00
Joel Marcey
1388e13795
Don't throw if a doc hasn't been versioned yet (#455)
Instead of throwing, return `null` because that means we have a
new doc in our versioning sequence

(Also, cleaned up a bit of code as I researched this)

Partial Fix To #450
2018-02-16 19:16:38 -08:00
Jan Kassens
d97e2e9d81 Add newlines at end of generated files (#283) 2017-12-13 13:55:40 -08:00
Héctor Ramos
65421db62e Add Prettier Formatting (#258)
* Add Prettier formatting to source files and example files, and check that Prettier formatting is maintained on PRs

* Remove trailing-comma as we are using Node 6 on Circle

* Use latest Node 6 LTS version in Circle

* Remove unused test
2017-12-04 19:21:02 -08:00
Joel Marcey
dc0c1390c4 [WIP] Allow custom subpath for docs within the "docs" folder
e.g.,

The default is

`docs/*.md`

This allows

`docs/somedir/*.md`

or

`docs/somedir/anotherdir/*.md`

Notes:

- All URLs are still /docs/*.html (i.e. the subpath does not get preserved in the link).
- Files in `translated_docs`, if any, will still only be one level
- This should not affect translations or versioning
2017-11-08 20:16:05 -08:00
Joel Marcey
d26d263bd0
Don't try to version files that have no metadata headers (#197) 2017-10-30 12:00:55 -07:00
Joel Marcey
77535d80f2 The complete move to MIT license (#115)
- headers in .js files
- update README and LICENSE year

Testing:

grep BSD, Patents, patents turned up nothing
2017-10-05 11:14:49 -07:00
Frank Li
ae4c577237 Fix to metadata ids 2017-08-14 10:19:01 -07:00
Frank Li
964e9e2108 Update doc metadata to use file name as id fallback and id as title fallback 2017-08-10 14:51:34 -07:00
Frank Li
88359ea845 Update messages for versioning 2017-08-09 16:17:39 -07:00
Frank Li
8c70286ad0 Fix usage of sidebars.json for versioning 2017-08-08 13:38:37 -07:00
Frank Li
fd01449db2 Fix version.js script for when there are no versions yet 2017-08-07 12:04:35 -07:00
Frank Li
67592dcf8a Use versions.json file and move versioned, translated docs into translated_docs 2017-08-03 15:58:56 -07:00
Frank Li
d3e3d209a4 Add comments for new versioning files 2017-08-03 11:14:56 -07:00
Frank Li
3598dffc58 Add versioning functionality 2017-08-03 10:25:01 -07:00