mirror of
https://github.com/facebook/docusaurus.git
synced 2025-08-04 01:09:20 +02:00
v1.11.1 (#1592)
* v1.11.1 * chore: publish new website * misc: fix tests
This commit is contained in:
parent
b2fe2a65c8
commit
3496f6e609
11 changed files with 802 additions and 485 deletions
|
@ -41,6 +41,6 @@ exports[`server utils autoprefix css 1`] = `
|
|||
"
|
||||
`;
|
||||
|
||||
exports[`server utils minify css 1`] = `".hljs{margin-left:-15px;margin-right:-15px;border:1px solid #eee;border-radius:6px;padding:15px;font-size:15px;max-width:50rem}.hljs.javascript{background-color:rgba(247,223,30,.03)}.hljs .comment{opacity:.7}::placeholder{color:gray}"`;
|
||||
exports[`server utils minify css 1`] = `".hljs{margin-left:-15px;margin-right:-15px;border:1px solid #eee;border-radius:6px;padding:15px;font-size:15px;max-width:50rem}.hljs.javascript{background-color:rgba(247,223,30,.03)}.hljs .comment{opacity:.7}::placeholder{color:grey}"`;
|
||||
|
||||
exports[`server utils minify css 2`] = `[Error: Unexpected "space" found.]`;
|
||||
exports[`server utils minify css 2`] = `[Error: Expected a pseudo-class or pseudo-element.]`;
|
||||
|
|
|
@ -27,7 +27,7 @@ jest.mock('../env', () => ({
|
|||
}));
|
||||
|
||||
describe('server utils', () => {
|
||||
test('minify css', () => {
|
||||
test('minify css', async () => {
|
||||
const testCss = fs.readFileSync(
|
||||
path.join(__dirname, '__fixtures__', 'test.css'),
|
||||
'utf8',
|
||||
|
@ -36,17 +36,24 @@ describe('server utils', () => {
|
|||
path.join(__dirname, '__fixtures__', 'test.md'),
|
||||
'utf8',
|
||||
);
|
||||
utils.minifyCss(testCss).then(css => expect(css).toMatchSnapshot());
|
||||
utils.minifyCss(notCss).catch(e => expect(e).toMatchSnapshot());
|
||||
const css = await utils.minifyCss(testCss);
|
||||
expect(css).toMatchSnapshot();
|
||||
|
||||
try {
|
||||
await utils.minifyCss(notCss);
|
||||
} catch (error) {
|
||||
expect(error).toMatchSnapshot();
|
||||
}
|
||||
});
|
||||
|
||||
test('autoprefix css', () => {
|
||||
test('autoprefix css', async () => {
|
||||
const testCss = fs.readFileSync(
|
||||
path.join(__dirname, '__fixtures__', 'test.css'),
|
||||
'utf8',
|
||||
);
|
||||
|
||||
utils.autoPrefixCss(testCss).then(css => expect(css).toMatchSnapshot());
|
||||
const css = await utils.autoPrefixCss(testCss);
|
||||
expect(css).toMatchSnapshot();
|
||||
});
|
||||
|
||||
test('getLanguage', () => {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "docusaurus",
|
||||
"description": "Easy to Maintain Open Source Documentation Websites",
|
||||
"version": "2.0.0-alpha.19",
|
||||
"version": "1.11.1",
|
||||
"license": "MIT",
|
||||
"keywords": [
|
||||
"documentation",
|
||||
|
@ -35,15 +35,16 @@
|
|||
"@babel/register": "^7.0.0",
|
||||
"@babel/traverse": "^7.0.0",
|
||||
"@babel/types": "^7.1.2",
|
||||
"autoprefixer": "^9.1.5",
|
||||
"autoprefixer": "^9.6.0",
|
||||
"babylon": "^6.17.4",
|
||||
"chalk": "^2.4.2",
|
||||
"chokidar": "^3.0.1",
|
||||
"classnames": "^2.2.6",
|
||||
"color": "^2.0.1",
|
||||
"commander": "^2.20.0",
|
||||
"cross-spawn": "^6.0.5",
|
||||
"crowdin-cli": "^0.3.0",
|
||||
"cssnano": "^3.10.0",
|
||||
"cssnano": "^4.1.0",
|
||||
"escape-string-regexp": "^1.0.5",
|
||||
"express": "^4.17.1",
|
||||
"feed": "^1.1.0",
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "docusaurus-init",
|
||||
"description": "Initialization script for Docusaurus",
|
||||
"version": "2.0.0-alpha.19",
|
||||
"version": "1.11.1",
|
||||
"license": "MIT",
|
||||
"preferGlobal": true,
|
||||
"keywords": [
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue