-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(core): add support for netlify-cms extensions
Add `extensionsDir` option Convert import calls to require in webpack config Update test snapshots
- Loading branch information
1 parent
0e7d7bb
commit f670cf3
Showing
6 changed files
with
249 additions
and
108 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,17 @@ | ||
import CMS from "netlify-cms"; | ||
import CSS from "netlify-cms/dist/cms.css"; | ||
/* global REQUIRE_EXTENSIONS */ | ||
/* eslint-disable import/order */ | ||
function requireAll(r) { | ||
r.keys().forEach(r); | ||
} | ||
|
||
export default { | ||
const CMS = require("netlify-cms"); | ||
|
||
if (REQUIRE_EXTENSIONS) { | ||
requireAll(require.context("extensions/", true, /\.js$/)); | ||
} | ||
const CSS = require("netlify-cms/dist/cms.css"); | ||
|
||
module.exports = { | ||
CMS, | ||
CSS | ||
}; |
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
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.