build main distribution directly from source
This commit is contained in:
parent
439920c652
commit
866fcf7c99
@ -1,3 +1,4 @@
|
|||||||
|
const path = require('path');
|
||||||
const babelConfig = require('../../babel.config.js');
|
const babelConfig = require('../../babel.config.js');
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
@ -5,18 +6,18 @@ module.exports = {
|
|||||||
plugins: [
|
plugins: [
|
||||||
...babelConfig.plugins,
|
...babelConfig.plugins,
|
||||||
['module-resolver', {
|
['module-resolver', {
|
||||||
root: './src/components',
|
root: path.join(__dirname, 'src/components'),
|
||||||
alias: {
|
alias: {
|
||||||
src: './src',
|
src: path.join(__dirname, 'src'),
|
||||||
Actions: './src/actions/',
|
Actions: path.join(__dirname, 'src/actions/'),
|
||||||
Constants: './src/constants/',
|
Constants: path.join(__dirname, 'src/constants/'),
|
||||||
Formats: './src/formats/',
|
Formats: path.join(__dirname, 'src/formats/'),
|
||||||
Integrations: './src/integrations/',
|
Integrations: path.join(__dirname, 'src/integrations/'),
|
||||||
Lib: './src/lib/',
|
Lib: path.join(__dirname, 'src/lib/'),
|
||||||
Reducers: './src/reducers/',
|
Reducers: path.join(__dirname, 'src/reducers/'),
|
||||||
Redux: './src/redux/',
|
Redux: path.join(__dirname, 'src/redux/'),
|
||||||
Routing: './src/routing/',
|
Routing: path.join(__dirname, 'src/routing/'),
|
||||||
ValueObjects: './src/valueObjects/',
|
ValueObjects: path.join(__dirname, 'src/valueObjects/'),
|
||||||
}
|
}
|
||||||
}],
|
}],
|
||||||
],
|
],
|
||||||
|
@ -38,7 +38,7 @@ module.exports = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
test: /\.css$/,
|
test: /\.css$/,
|
||||||
include: [/redux-notifications/],
|
include: [/(redux-notifications|react-datetime)/],
|
||||||
use: ['to-string-loader', 'css-loader'],
|
use: ['to-string-loader', 'css-loader'],
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
import cms from 'netlify-cms-core';
|
import cms from 'netlify-cms-core/src';
|
||||||
import { GitHubBackend } from 'netlify-cms-backend-github';
|
import { GitHubBackend } from 'netlify-cms-backend-github/src';
|
||||||
import { GitLabBackend } from 'netlify-cms-backend-gitlab';
|
import { GitLabBackend } from 'netlify-cms-backend-gitlab/src';
|
||||||
import { GitGatewayBackend } from 'netlify-cms-backend-git-gateway';
|
import { GitGatewayBackend } from 'netlify-cms-backend-git-gateway/src';
|
||||||
import { TestBackend } from 'netlify-cms-backend-test';
|
import { TestBackend } from 'netlify-cms-backend-test/src';
|
||||||
|
|
||||||
|
console.log(cms);
|
||||||
const { registerBackend } = cms;
|
const { registerBackend } = cms;
|
||||||
|
|
||||||
registerBackend('git-gateway', GitGatewayBackend);
|
registerBackend('git-gateway', GitGatewayBackend);
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
import image from 'netlify-cms-editor-component-image';
|
import cms from 'netlify-cms-core/src';
|
||||||
|
import image from 'netlify-cms-editor-component-image/src';
|
||||||
|
|
||||||
const { registerEditorComponent } = cms;
|
const { registerEditorComponent } = cms;
|
||||||
|
|
||||||
|
@ -1,3 +1,6 @@
|
|||||||
|
import { init } from 'netlify-cms-core/src';
|
||||||
import './backends';
|
import './backends';
|
||||||
import './widgets';
|
import './widgets';
|
||||||
import './editor-components';
|
import './editor-components';
|
||||||
|
|
||||||
|
init()
|
||||||
|
@ -1,17 +1,17 @@
|
|||||||
import cms from 'netlify-cms-core';
|
import cms from 'netlify-cms-core/src';
|
||||||
import { StringControl, StringPreview } from 'netlify-cms-widget-string';
|
import { StringControl, StringPreview } from 'netlify-cms-widget-string/src';
|
||||||
import { NumberControl, NumberPreview } from 'netlify-cms-widget-number';
|
import { NumberControl, NumberPreview } from 'netlify-cms-widget-number/src';
|
||||||
import { TextControl, TextPreview } from 'netlify-cms-widget-text';
|
import { TextControl, TextPreview } from 'netlify-cms-widget-text/src';
|
||||||
import { ImageControl, ImagePreview } from 'netlify-cms-widget-image';
|
import { ImageControl, ImagePreview } from 'netlify-cms-widget-image/src';
|
||||||
import { FileControl, FilePreview } from 'netlify-cms-widget-file';
|
import { FileControl, FilePreview } from 'netlify-cms-widget-file/src';
|
||||||
import { DateControl, DatePreview } from 'netlify-cms-widget-date';
|
import { DateControl, DatePreview } from 'netlify-cms-widget-date/src';
|
||||||
import { DateTimeControl, DateTimePreview } from 'netlify-cms-widget-datetime';
|
import { DateTimeControl, DateTimePreview } from 'netlify-cms-widget-datetime/src';
|
||||||
import { SelectControl, SelectPreview } from 'netlify-cms-widget-select';
|
import { SelectControl, SelectPreview } from 'netlify-cms-widget-select/src';
|
||||||
import { MarkdownControl, MarkdownPreview } from 'netlify-cms-widget-markdown';
|
import { MarkdownControl, MarkdownPreview } from 'netlify-cms-widget-markdown/src';
|
||||||
import { ListControl, ListPreview } from 'netlify-cms-widget-list';
|
import { ListControl, ListPreview } from 'netlify-cms-widget-list/src';
|
||||||
import { ObjectControl, ObjectPreview } from 'netlify-cms-widget-object';
|
import { ObjectControl, ObjectPreview } from 'netlify-cms-widget-object/src';
|
||||||
import { RelationControl, RelationPreview } from 'netlify-cms-widget-relation';
|
import { RelationControl, RelationPreview } from 'netlify-cms-widget-relation/src';
|
||||||
import { BooleanControl } from 'netlify-cms-widget-boolean';
|
import { BooleanControl } from 'netlify-cms-widget-boolean/src';
|
||||||
|
|
||||||
const { registerWidget } = cms;
|
const { registerWidget } = cms;
|
||||||
|
|
||||||
|
@ -1,3 +1,8 @@
|
|||||||
const { getConfig } = require('../../scripts/webpack.js');
|
const path = require('path');
|
||||||
|
const coreWebpackConfig = require('../netlify-cms-core/webpack.config.js');
|
||||||
|
|
||||||
module.exports = getConfig();
|
module.exports = {
|
||||||
|
...coreWebpackConfig,
|
||||||
|
context: path.join(__dirname, 'src'),
|
||||||
|
entry: './index.js',
|
||||||
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user