-
Notifications
You must be signed in to change notification settings - Fork 132
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move and Refactor convert to Template (#2349)
* Move convert from Site/index.ts to template.ts * Remove redundant code * Move readSiteConfig to SiteConfig.ts * Move lodash const to constants.ts * Update readSiteConfig comments * Rename template to templatePath * Replace then/catch with try/catch
- Loading branch information
Showing
5 changed files
with
247 additions
and
194 deletions.
There are no files selected for viewing
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
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 |
---|---|---|
@@ -1,3 +1,32 @@ | ||
import difference from 'lodash/difference'; | ||
import differenceWith from 'lodash/differenceWith'; | ||
import flatMap from 'lodash/flatMap'; | ||
import has from 'lodash/has'; | ||
import isBoolean from 'lodash/isBoolean'; | ||
import isEmpty from 'lodash/isEmpty'; | ||
import isEqual from 'lodash/isEqual'; | ||
import isUndefined from 'lodash/isUndefined'; | ||
import noop from 'lodash/noop'; | ||
import omitBy from 'lodash/omitBy'; | ||
import startCase from 'lodash/startCase'; | ||
import union from 'lodash/union'; | ||
import uniq from 'lodash/uniq'; | ||
|
||
export const INDEX_MARKDOWN_FILE = 'index.md'; | ||
export const SITE_CONFIG_NAME = 'site.json'; | ||
export const LAZY_LOADING_SITE_FILE_NAME = 'LazyLiveReloadLoadingSite.html'; | ||
export const _ = { | ||
difference, | ||
differenceWith, | ||
flatMap, | ||
has, | ||
isUndefined, | ||
isEqual, | ||
isEmpty, | ||
isBoolean, | ||
noop, | ||
omitBy, | ||
startCase, | ||
union, | ||
uniq, | ||
}; |
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
Oops, something went wrong.