Skip to content

Commit

Permalink
project re-structuring and other changes
Browse files Browse the repository at this point in the history
  • Loading branch information
jpuri committed Oct 24, 2016
1 parent 170b7ef commit 9499a86
Show file tree
Hide file tree
Showing 65 changed files with 58 additions and 61 deletions.
1 change: 0 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,3 @@ node_modules
config
dist
interfaces
__test__
4 changes: 2 additions & 2 deletions config/webpack.prod.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const precss = require('precss');
module.exports = {
devtool: 'source-map',
entry: [
'./js/src/index',
'./src/index',
],
output: {
path: path.join(__dirname, '../dist'),
Expand Down Expand Up @@ -37,7 +37,7 @@ module.exports = {
],
module: {
loaders: [
{ test: /\.js$/, loader: 'babel-loader', exclude: /immutable\.js$/ },
{ test: /\.js$/, loader: 'babel-loader', exclude: /immutable\.js$|draftjs-utils\.js$/ },
{
test: /\.css$/,
loader: ExtractTextPlugin.extract(
Expand Down
32 changes: 16 additions & 16 deletions dist/react-draft-wysiwyg.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/react-draft-wysiwyg.js.map

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions docs/config/webpack.dev.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ module.exports = {
},
module: {
loaders: [
{ test: /\.js$/, loader: 'babel-loader' },
{ test: /\.js$/, loader: 'babel-loader', exclude: /immutable\.js$|draftjs-utils\.js$|draftjs-to-html\.js$|lodash\.js$/ },
{
test: /\.css$/,
exclude: /Draft\.css$|font-awesome\.css$/,
Expand Down Expand Up @@ -52,8 +52,8 @@ module.exports = {
postcss: () => [autoprefixer, precss],
resolve: {
extensions: ['', '.js', '.json'],
// alias: {
// 'react-draft-wyiswyg': path.join(__dirname, '../..', 'js/src'),
// },
alias: {
'react-draft-wyiswyg': path.join(__dirname, '../../', 'src'),
},
},
};
2 changes: 1 addition & 1 deletion docs/config/webpack.prod.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ module.exports = {
],
module: {
loaders: [
{ test: /\.js$/, loader: 'babel-loader' },
{ test: /\.js$/, loader: 'babel-loader', exclude: /immutable\.js$|draftjs-utils\.js$|draftjs-to-html\.js$|lodash\.js$/ },
{
test: /\.css$/,
exclude: /Draft\.css$|font-awesome\.css$/,
Expand Down
4 changes: 1 addition & 3 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,7 @@
"webpack-hot-middleware": "^2.12.2",
"react": "^15.3.2",
"react-dom": "^15.3.2",
"draft-js": "^0.9.1",
"react-draft-wysiwyg": "0.1.8"
"draft-js": "^0.9.1"
},
"repository": {
"type": "git",
Expand All @@ -61,7 +60,6 @@
"react": "^15.3.2",
"react-dom": "^15.3.2",
"draft-js": "^0.9.1",
"react-draft-wysiwyg": "0.1.8",
"react-router": "^2.8.1"
}
}
2 changes: 1 addition & 1 deletion docs/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import React from 'react';
import ReactDOM from 'react-dom';
import { Router, IndexRoute, Route, hashHistory } from 'react-router';
import '../css/normalize.css'; // eslint-disable-line no-unused-vars
import '../node_modules/react-draft-wysiwyg/dist/editor.css'; // eslint-disable-line no-unused-vars
import '../node_modules/react-draft-wysiwyg/dist/react-draft-wysiwyg.css'; // eslint-disable-line no-unused-vars
import {
App,
Home,
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
"babel-preset-stage-0": "^6.16.0",
"chai": "^3.5.0",
"css-loader": "^0.25.0",
"draft-js": "^0.9.1",
"enzyme": "^2.4.1",
"eslint": "^3.4.0",
"eslint-config-airbnb": "^12.0.0",
Expand All @@ -36,8 +35,9 @@
"mocha": "^3.1.0",
"postcss-loader": "^1.0.0",
"precss": "^1.4.0",
"react": "^15.3.2",
"react-addons-test-utils": "^15.3.2",
"react": "^15.3.2",
"draft-js": "^0.9.1",
"react-dom": "^15.3.2",
"rimraf": "^2.5.4",
"sinon": "^1.17.6",
Expand All @@ -47,8 +47,8 @@
},
"dependencies": {
"classnames": "^2.2.5",
"draftjs-to-html": "0.2.8",
"draftjs-utils": "0.2.9",
"draftjs-to-html": "0.3.0",
"draftjs-utils": "0.3.0",
"immutable": "^3.8.1"
},
"peerDependencies": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { PropTypes, Component } from 'react';
import { Entity } from 'draft-js';
import styles from './styles.css'; // eslint-disable-line no-unused-vars
import openlink from '../../../../images/openlink.svg';
import openlink from '../../../images/openlink.svg';

function findLinkEntities(contentBlock, callback) {
contentBlock.findEntityRanges(
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
getSelectionCustomInlineStyle,
} from 'draftjs-utils';
import Option from '../Option';
import colorIcon from '../../../../images/color.svg';
import colorIcon from '../../../images/color.svg';
import styles from './styles.css'; // eslint-disable-line no-unused-vars

export default class ColorPicker extends Component {
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
/* @flow */

import React, { Component, PropTypes } from 'react';
import React, { Component, PropTypes, ReactComponent } from 'react';
import classNames from 'classnames';
import styles from './styles.css'; // eslint-disable-line no-unused-vars

export default class Dropdown extends Component {

static propTypes = {
children: PropTypes.instanceOf(Component),
children: PropTypes.instanceOf(ReactComponent),
onChange: PropTypes.func,
className: PropTypes.string,
optionWrapperClassName: PropTypes.string,
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
/* @flow */

import React, { Component, PropTypes } from 'react';
import React, { Component, PropTypes, ReactComponent } from 'react';
import classNames from 'classnames';
import styles from './styles.css'; // eslint-disable-line no-unused-vars

export default class DropDownOption extends Component {

static propTypes = {
children: PropTypes.instanceOf(Component),
children: PropTypes.instanceOf(ReactComponent),
value: PropTypes.oneOf(['string', 'number']),
onSelect: PropTypes.func,
setHighlighted: PropTypes.func,
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import ImageControl from '../ImageControl';
import HistoryControl from '../HistoryControl';
import LinkDecorator from '../../Decorators/Link';
import ImageBlockRenderer from '../../Renderer/Image';
import draft from '../../../../css/Draft.css'; // eslint-disable-line no-unused-vars
import draft from '../../../css/Draft.css'; // eslint-disable-line no-unused-vars
import styles from './styles.css'; // eslint-disable-line no-unused-vars

export default class WysiwygEditor extends Component {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
getSelectionCustomInlineStyle,
} from 'draftjs-utils';
import { Dropdown, DropdownOption } from '../Dropdown';
import fontSizeIcon from '../../../../images/font-size.svg';
import fontSizeIcon from '../../../images/font-size.svg';
import styles from './styles.css'; // eslint-disable-line no-unused-vars

export default class FontSizeControl extends Component {
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
import React, { Component, PropTypes } from 'react';
import { EditorState } from 'draft-js';
import Option from '../Option';
import undo from '../../../../images/undo.svg';
import redo from '../../../../images/redo.svg';
import undo from '../../../images/undo.svg';
import redo from '../../../images/redo.svg';
import styles from './styles.css'; // eslint-disable-line no-unused-vars

export default class HistoryControl extends Component {
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import classNames from 'classnames';
import Option from '../Option';
import Spinner from '../Spinner';
import styles from './styles.css'; // eslint-disable-line no-unused-vars
import image from '../../../../images/image.svg';
import image from '../../../images/image.svg';

export default class ImageControl extends Component {

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ import { RichUtils, EditorState } from 'draft-js';
import Option from '../Option';
import { Dropdown, DropdownOption } from '../Dropdown';

import bold from '../../../../images/bold.svg';
import italic from '../../../../images/italic.svg';
import underline from '../../../../images/underline.svg';
import strikethrough from '../../../../images/strikethrough.svg';
import monospace from '../../../../images/monospace.svg';
import bold from '../../../images/bold.svg';
import italic from '../../../images/italic.svg';
import underline from '../../../images/underline.svg';
import strikethrough from '../../../images/strikethrough.svg';
import monospace from '../../../images/monospace.svg';
import styles from './styles.css'; // eslint-disable-line no-unused-vars

export default class InlineControl extends Component {
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import {
getSelectionEntity,
} from 'draftjs-utils';
import Option from '../Option';
import link from '../../../../images/link.svg';
import unlink from '../../../../images/unlink.svg';
import link from '../../../images/link.svg';
import unlink from '../../../images/unlink.svg';
import styles from './styles.css'; // eslint-disable-line no-unused-vars

export default class LinkControl extends Component {
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ import { RichUtils, EditorState } from 'draft-js';
import { changeDepth, getSelectedBlocksType } from 'draftjs-utils';
import { Dropdown, DropdownOption } from '../Dropdown';
import Option from '../Option';
import indent from '../../../../images/indent.svg';
import outdent from '../../../../images/outdent.svg';
import ordered from '../../../../images/list-ordered.svg';
import unordered from '../../../../images/list-unordered.svg';
import indent from '../../../images/indent.svg';
import outdent from '../../../images/outdent.svg';
import ordered from '../../../images/list-ordered.svg';
import unordered from '../../../images/list-unordered.svg';
import styles from './styles.css'; // eslint-disable-line no-unused-vars

export default class ListControl extends Component {
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
/* @flow */

import React, { Component, PropTypes } from 'react';
import React, { Component, PropTypes, ReactComponent } from 'react';
import classNames from 'classnames';
import styles from './styles.css'; // eslint-disable-line no-unused-vars

export default class Option extends Component {

static propTypes = {
onClick: PropTypes.func.isRequired,
children: PropTypes.instanceOf(Component),
children: PropTypes.instanceOf(ReactComponent),
value: PropTypes.string,
className: PropTypes.string,
activeClassName: PropTypes.string,
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ import {
Dropdown,
DropdownOption,
} from '../Dropdown';
import left from '../../../../images/align-left.svg';
import center from '../../../../images/align-center.svg';
import right from '../../../../images/align-right.svg';
import justify from '../../../../images/align-justify.svg';
import left from '../../../images/align-left.svg';
import center from '../../../images/align-center.svg';
import right from '../../../images/align-right.svg';
import justify from '../../../images/align-justify.svg';
import styles from './styles.css'; // eslint-disable-line no-unused-vars

export default class TextAlignControl extends Component {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 9499a86

Please sign in to comment.