mirror of
https://github.com/Hopiu/wagtail.git
synced 2026-05-24 14:53:45 +00:00
Integrate Draftail with wagtail-client package, Webpack, Sass
This commit is contained in:
parent
c163d93b72
commit
e18d490859
5 changed files with 15 additions and 0 deletions
|
|
@ -12,6 +12,7 @@ import Explorer, {
|
|||
ExplorerToggle,
|
||||
initExplorer,
|
||||
} from './components/Explorer';
|
||||
import draftail from './components/Draftail';
|
||||
|
||||
export {
|
||||
Button,
|
||||
|
|
@ -22,4 +23,5 @@ export {
|
|||
Explorer,
|
||||
ExplorerToggle,
|
||||
initExplorer,
|
||||
draftail,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@ module.exports = function exports() {
|
|||
};
|
||||
|
||||
entry[getOutputPath('admin', 'wagtailadmin')] = getEntryPath('admin', 'wagtailadmin.entry.js');
|
||||
entry[getOutputPath('admin', 'draftail')] = getEntryPath('admin', 'draftail.entry.js');
|
||||
|
||||
return {
|
||||
entry: entry,
|
||||
|
|
|
|||
|
|
@ -0,0 +1,4 @@
|
|||
import { draftail } from 'wagtail-client';
|
||||
|
||||
// Expose as a global variable, for integration with other scripts.
|
||||
window.draftail = draftail;
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
require('./draftail.entry');
|
||||
|
||||
describe('draftail.entry', () => {
|
||||
it('exposes global', () => {
|
||||
expect(window.draftail).toBeDefined();
|
||||
});
|
||||
});
|
||||
|
|
@ -0,0 +1 @@
|
|||
@import '../../../../../../client/src/components/Draftail/Draftail';
|
||||
Loading…
Reference in a new issue