Commit graph

6 commits

Author SHA1 Message Date
Yangshun Tay
9d4a5d5359
Prettify all JavaScript files (#964)
* Prettify all JavaScript files

* Make trailingComma all

* Delete v2/.prettierignore

* Remove v2 Prettier commands in package.json
2018-09-17 15:34:55 +08:00
Shubham Bansal
1a572757f1 feat: last updated time in docs (#913)
* Adding last updated time for docs

* Making file path general and other suggested changes

* Checking if time returned is null due to absence of git or some other issue

* Adding option to enable/disable update time feature and test-doc

* Adding simple unit tests for getGitUpdateTime()

* nits & rewrote failing test

* consistent test naming

* Adding optional updateEnableTime in documentation

* package-lock & yarn.lock
2018-08-29 21:15:18 +08:00
Endilie Yacop Sucipto
8f9f7a5602 Fix correct linking when setting defaultVersionShown to non-latest version (#894) 2018-08-10 23:49:52 -07:00
Endilie Yacop Sucipto
afec4bd47c
Refactor(server): share logic between server.js & generate.js (#856)
* nits too many comments

* Refactor to blog.getPages

* Refactor to getPost, fileToUrl, urlToFile

* Refactor redirectcomponent generation for docs

* nits & fix typo

* Refactor to blog.getMetadata

* Add test for getMetadata, fileToSUrl and urlToSource

* use includes() and add 'markup' naming for function
2018-07-24 13:37:52 +07:00
Endilie Yacop Sucipto
d42ecb943f
Don't replace static assets linking in fenced code blocks (#864)
* Don't replace any relative links to static assets in a fenced code block

* revert unintended docs change

* improve regex

* remove test file :sob

* stronger regex test for replace assets

* super simplify solution
2018-07-21 20:54:45 +07:00
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