build main distribution directly from source

This commit is contained in:
Shawn Erquhart 2018-07-25 05:37:38 -04:00
parent 439920c652
commit 866fcf7c99
7 changed files with 45 additions and 34 deletions

View File

@ -1,3 +1,4 @@
const path = require('path');
const babelConfig = require('../../babel.config.js');
module.exports = {
@ -5,18 +6,18 @@ module.exports = {
plugins: [
...babelConfig.plugins,
['module-resolver', {
root: './src/components',
root: path.join(__dirname, 'src/components'),
alias: {
src: './src',
Actions: './src/actions/',
Constants: './src/constants/',
Formats: './src/formats/',
Integrations: './src/integrations/',
Lib: './src/lib/',
Reducers: './src/reducers/',
Redux: './src/redux/',
Routing: './src/routing/',
ValueObjects: './src/valueObjects/',
src: path.join(__dirname, 'src'),
Actions: path.join(__dirname, 'src/actions/'),
Constants: path.join(__dirname, 'src/constants/'),
Formats: path.join(__dirname, 'src/formats/'),
Integrations: path.join(__dirname, 'src/integrations/'),
Lib: path.join(__dirname, 'src/lib/'),
Reducers: path.join(__dirname, 'src/reducers/'),
Redux: path.join(__dirname, 'src/redux/'),
Routing: path.join(__dirname, 'src/routing/'),
ValueObjects: path.join(__dirname, 'src/valueObjects/'),
}
}],
],

View File

@ -38,7 +38,7 @@ module.exports = {
},
{
test: /\.css$/,
include: [/redux-notifications/],
include: [/(redux-notifications|react-datetime)/],
use: ['to-string-loader', 'css-loader'],
},
],

View File

@ -1,9 +1,10 @@
import cms from 'netlify-cms-core';
import { GitHubBackend } from 'netlify-cms-backend-github';
import { GitLabBackend } from 'netlify-cms-backend-gitlab';
import { GitGatewayBackend } from 'netlify-cms-backend-git-gateway';
import { TestBackend } from 'netlify-cms-backend-test';
import cms from 'netlify-cms-core/src';
import { GitHubBackend } from 'netlify-cms-backend-github/src';
import { GitLabBackend } from 'netlify-cms-backend-gitlab/src';
import { GitGatewayBackend } from 'netlify-cms-backend-git-gateway/src';
import { TestBackend } from 'netlify-cms-backend-test/src';
console.log(cms);
const { registerBackend } = cms;
registerBackend('git-gateway', GitGatewayBackend);

View File

@ -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;

View File

@ -1,3 +1,6 @@
import { init } from 'netlify-cms-core/src';
import './backends';
import './widgets';
import './editor-components';
init()

View File

@ -1,17 +1,17 @@
import cms from 'netlify-cms-core';
import { StringControl, StringPreview } from 'netlify-cms-widget-string';
import { NumberControl, NumberPreview } from 'netlify-cms-widget-number';
import { TextControl, TextPreview } from 'netlify-cms-widget-text';
import { ImageControl, ImagePreview } from 'netlify-cms-widget-image';
import { FileControl, FilePreview } from 'netlify-cms-widget-file';
import { DateControl, DatePreview } from 'netlify-cms-widget-date';
import { DateTimeControl, DateTimePreview } from 'netlify-cms-widget-datetime';
import { SelectControl, SelectPreview } from 'netlify-cms-widget-select';
import { MarkdownControl, MarkdownPreview } from 'netlify-cms-widget-markdown';
import { ListControl, ListPreview } from 'netlify-cms-widget-list';
import { ObjectControl, ObjectPreview } from 'netlify-cms-widget-object';
import { RelationControl, RelationPreview } from 'netlify-cms-widget-relation';
import { BooleanControl } from 'netlify-cms-widget-boolean';
import cms from 'netlify-cms-core/src';
import { StringControl, StringPreview } from 'netlify-cms-widget-string/src';
import { NumberControl, NumberPreview } from 'netlify-cms-widget-number/src';
import { TextControl, TextPreview } from 'netlify-cms-widget-text/src';
import { ImageControl, ImagePreview } from 'netlify-cms-widget-image/src';
import { FileControl, FilePreview } from 'netlify-cms-widget-file/src';
import { DateControl, DatePreview } from 'netlify-cms-widget-date/src';
import { DateTimeControl, DateTimePreview } from 'netlify-cms-widget-datetime/src';
import { SelectControl, SelectPreview } from 'netlify-cms-widget-select/src';
import { MarkdownControl, MarkdownPreview } from 'netlify-cms-widget-markdown/src';
import { ListControl, ListPreview } from 'netlify-cms-widget-list/src';
import { ObjectControl, ObjectPreview } from 'netlify-cms-widget-object/src';
import { RelationControl, RelationPreview } from 'netlify-cms-widget-relation/src';
import { BooleanControl } from 'netlify-cms-widget-boolean/src';
const { registerWidget } = cms;

View File

@ -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',
};