Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 873dc31

Browse files
committed
chore(mock): ⚡ converted to an ES module
1 parent d80a2a6 commit 873dc31

File tree

4 files changed

+3
-8
lines changed

4 files changed

+3
-8
lines changed

‎.umirc.mock.js‎

Lines changed: 0 additions & 4 deletions
This file was deleted.

‎build/mock/getMockData.js‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ const path = require('path')
22
const glob = require('glob')
33
const { pathToRegexp } = require('path-to-regexp')
44
const signale = require('signale')
5-
65
const { winPath } = require('./utils')
76
let _mockconfig = {}
87
const cwd = process.cwd()

‎mock/index.js‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
const prose =require('./modules/prose')
1+
import prose from'./modules/prose'
22

3-
module.exports= {
3+
exportdefault {
44
...prose,
55
}

‎mock/modules/prose.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const list = [
1616
{ prose: '🔖 很久找你,一直没有找到,微风吹过的时候,我深深的呼吸,才感觉到你也在陪伴着我呼吸。' },
1717
]
1818

19-
module.exports= {
19+
exportdefault {
2020
'GET /api/project/prose': (req, res) => {
2121
res.json(list[Math.floor(Math.random() * 8)])
2222
},

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /