Skip to content

Commit 79fe3d5

Browse files
committed
remove some unused code and accept eslint changes
1 parent 88033b6 commit 79fe3d5

File tree

9 files changed

+9
-12
lines changed

9 files changed

+9
-12
lines changed

packages/docsify-server-renderer/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
import { readFileSync } from 'fs';
22
import { resolve, basename } from 'path';
33
import resolvePathname from 'resolve-pathname';
4+
import fetch from 'node-fetch';
5+
import debug from 'debug';
46
import { AbstractHistory } from '../../src/core/router/history/abstract';
57
import { Compiler } from '../../src/core/render/compiler';
68
import { isAbsolutePath } from '../../src/core/router/util';
79
import * as tpl from '../../src/core/render/tpl';
810
import { prerenderEmbed } from '../../src/core/render/embed';
9-
import fetch from 'node-fetch';
10-
import debug from 'debug';
1111

1212
function cwd(...args) {
1313
return resolve(process.cwd(), ...args);

src/core/event/scroll.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1+
import Tweezer from 'tweezer.js';
12
import { isMobile } from '../util/env';
23
import * as dom from '../util/dom';
34
import config from '../config';
4-
import Tweezer from 'tweezer.js';
55

66
const nav = {};
77
let hoverOver = false;

src/core/render/compiler.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import marked from 'marked';
12
import { isAbsolutePath, getPath, getParentPath } from '../router/util';
23
import { isFn, merge, cached, isPrimitive } from '../util/core';
34
import { tree as treeTpl } from './tpl';
@@ -11,7 +12,6 @@ import { paragraphCompiler } from './compiler/paragraph';
1112
import { taskListCompiler } from './compiler/taskList';
1213
import { taskListItemCompiler } from './compiler/taskListItem';
1314
import { linkCompiler } from './compiler/link';
14-
import marked from 'marked';
1515

1616
const cachedLinks = {};
1717

src/core/render/embed.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1+
import stripIndent from 'strip-indent';
12
import { get } from '../fetch/ajax';
23
import { merge } from '../util/core';
3-
import stripIndent from 'strip-indent';
44

55
const cached = {};
66

src/core/render/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
/* eslint-disable no-unused-vars */
2+
import tinydate from 'tinydate';
23
import * as dom from '../util/dom';
34
import cssVars from '../util/polyfill/css-vars';
45
import { callHook } from '../init/lifecycle';
@@ -10,7 +11,6 @@ import { scrollActiveSidebar } from '../event/scroll';
1011
import { Compiler } from './compiler';
1112
import * as tpl from './tpl';
1213
import { prerenderEmbed } from './embed';
13-
import tinydate from 'tinydate';
1414

1515
function executeScript() {
1616
const script = dom

test/unit/base.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
require = require('esm')(
33
module /* , options */
44
); /* eslint-disable-line no-global-assign */
5-
const { History } = require('../../src/core/router/history/base');
65
const { expect } = require('chai');
6+
const { History } = require('../../src/core/router/history/base');
77

88
class MockHistory extends History {
99
parse(path) {

test/unit/docsify.test.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,6 @@ const markup = /* html */ `<!DOCTYPE html>
1515
<body>
1616
<div id="app"></div>
1717
<script src="/lib/docsify.js"></script>
18-
<script>
19-
//fetch("../lib/docsify.js").then(async r => console.log(r.text()))
20-
</script>
2118
</body>
2219
</html>
2320
`;

test/unit/render.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
const { init, expectSameDom } = require('../_helper');
21
const { expect } = require('chai');
2+
const { init, expectSameDom } = require('../_helper');
33

44
describe('render', function() {
55
it('important content (tips)', async function() {

test/unit/util.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
require = require('esm')(
33
module /* , options */
44
); /* eslint-disable-line no-global-assign */
5-
const { resolvePath } = require('../../src/core/router/util');
65
const { expect } = require('chai');
6+
const { resolvePath } = require('../../src/core/router/util');
77

88
describe('router/util', function() {
99
it('resolvePath', async function() {

0 commit comments

Comments
 (0)