mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-23 22:17:00 +02:00
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:
parent
03e237abda
commit
9f718a5097
13 changed files with 430 additions and 154 deletions
|
@ -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');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue