Commit graph

26 commits

Author SHA1 Message Date
Yangshun Tay
a7a214fb3a ESLintify Part 3 ()
* ESLintify Part 3

* ESLintify Part 3

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

* Fix

* Fix tests

* Fix tests

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

* Allow empty try/catch

* Escape regexp
2018-07-08 09:13:18 -07:00
Endilie Yacop Sucipto
21dcea2a31
Integrate eslint & precommit to codebase ()
* add eslint, precommit & refactor

* fix exit code 127

* modify contributing.md & add package-lock

* use .eslintrc.js
2018-07-01 12:27:31 +08:00
Rémi Doreau
a77ae958db Duplicate code in readMetadata.js & versionFallback.js ()
* Duplicate code in readMetadata.js & versionFallback.js 

* 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/ () 2018-06-07 07:41:28 -07:00
Matthew Francis Brunetti
cf59f72ecd Windows compatibility fix () 2018-05-05 18:29:28 -07:00
Joel Marcey
ec6ff9284c
Allow multiple - in a version string ()
* Allow multiple `-` in a version string

Right now we were assuming that there would be no `-` in a version.
That was breaking things.

This allows more flexibility for versions like:

1.0.0-beta.2

Ref 
Fixes 

* Check more specific strings - need to look for the original_id
2018-02-17 12:25:46 -08:00
Joel Marcey
1388e13795
Don't throw if a doc hasn't been versioned yet ()
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 
2018-02-16 19:16:38 -08:00
Joel Marcey
5bb062b6f0
Versioning ids should be based on whether translation is enabled ()
* Versioning ids should be based on whether translation is enabled

Ref: ff117979c6 and a5e963dba1

Tested locally on:

Docusaurus
Relay
Test site from `npm run examples`

* Prettier
2017-12-20 19:47:51 -08:00
Jan Kassens
b174ee2d2a Update prettier to 1.9.1 () 2017-12-12 12:47:52 -08:00
Héctor Ramos
65421db62e Add Prettier Formatting ()
* 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
Héctor Ramos
09726c6361 [Versioning] Fix issue when a doc is added ()
* Simplify function, return error if doc not found
2017-11-15 15:55:08 -08:00
Héctor Ramos
420d2e86fb Replace diff with string comparison () 2017-11-15 12:17:05 -08:00
Héctor Ramos
459984516b Ensure some errors are logged to the console ()
* Clarify some error conditions in versioning

* Clarify missing doc error;

* Remove excess space

* Remove excess space part duex
2017-10-30 11:42:45 -07:00
Joel Marcey
77535d80f2 The complete move to MIT license ()
- 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
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
374ca9b86c Change sidebar.json to sidebars.json in versionFallback.js 2017-08-09 15:50:20 -07:00
Frank Li
b94dbff181 Fix versioning bugs 2017-08-08 11:44:30 -07:00
Frank Li
cf5ee95a48 Minor cleanup 2017-08-08 11:38:07 -07:00
Frank Li
5c3f74ddcc Fix removal of semver usage 2017-08-04 12:57:43 -07:00
Frank Li
63043c041a Add version header link and change current docs to be version 'next' 2017-08-04 12:41:13 -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