Skip to content

Commit

Permalink
feat: ✨ api 配置文件新增 .api.js 命名规则
Browse files Browse the repository at this point in the history
  • Loading branch information
FairyEver committed Sep 1, 2020
1 parent 0accc40 commit cb98286
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/api/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import faker from 'faker/locale/zh_CN'
import { service, request, serviceForMock, requestForMock, mock } from './service'
import * as tools from './tools'

const files = require.context('./modules', true, /\.js$/)
const files = require.context('./modules', true, /\.api\.js$/)
const generators = files.keys().map(key => files(key).default)

export default assign({}, ...map(generators, generator => generator({
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit cb98286

Please sign in to comment.