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
This commit is contained in:
Endilie Yacop Sucipto 2018-07-16 15:45:23 +07:00 committed by Yangshun Tay
parent 03e237abda
commit 9f718a5097
13 changed files with 430 additions and 154 deletions

View file

@ -7,6 +7,17 @@
* LICENSE file in the root directory of this source tree.
*/
require('babel-register')({
babelrc: false,
only: [__dirname, `${process.cwd()}/core`],
plugins: [
require('./server/translate-plugin.js'),
'transform-class-properties',
'transform-object-rest-spread',
],
presets: ['react', 'env'],
});
const program = require('commander');
const chalk = require('chalk');
const glob = require('glob');