This repository has been archived by the owner on Feb 13, 2024. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: marked unfinished files, rebuild file structure, config works
- Loading branch information
Showing
21 changed files
with
76 additions
and
75 deletions.
There are no files selected for viewing
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
// Created by xiazeyu. | ||
|
||
/** | ||
* @description the validater for user's config | ||
*/ | ||
|
||
|
||
'use strict'; | ||
|
||
import _ from 'lodash'; | ||
|
||
function configValidater(userConfig){ | ||
|
||
if (process.env.NODE_ENV === 'development') console.log('config: validating config...'); | ||
|
||
if(_.has(userConfig, 'model')){ | ||
if(_.has(userConfig.model, 'jsonPath')){ | ||
if(!_.isString(userConfig.model.jsonPath)){ | ||
throw 'userConfig.model.jsonPath should be a string.'; | ||
} | ||
} | ||
} | ||
|
||
} | ||
|
||
export { | ||
configValidater, | ||
} |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file was deleted.
Oops, something went wrong.
File renamed without changes.
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters