reduced paths for imports
This commit is contained in:
parent
0aa1456fc0
commit
f369ba88cc
23 changed files with 62 additions and 60 deletions
|
@ -1,4 +1,4 @@
|
|||
import * as actions from '../constants/action_types.js';
|
||||
import * as actions from 'constants/action_types';
|
||||
|
||||
// export action creators
|
||||
export function selectFile (file) {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import ProgressBar from '../components/ProgressBar.jsx';
|
||||
import * as publishStates from '../constants/publishing_states';
|
||||
import ProgressBar from 'components/ProgressBar';
|
||||
import * as publishStates from 'constants/publishing_states';
|
||||
|
||||
function PublishStatus ({ status, message }) {
|
||||
return (
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { connect } from 'react-redux';
|
||||
import { updateLoggedInChannel } from '../../actions';
|
||||
import View from './view.jsx';
|
||||
import { updateLoggedInChannel } from 'actions';
|
||||
import View from './view';
|
||||
|
||||
const mapDispatchToProps = dispatch => {
|
||||
return {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import React from 'react';
|
||||
import { makeGetRequest, makePostRequest } from '../../utils/xhr.js';
|
||||
import { setUserCookies } from '../../utils/cookies.js';
|
||||
import { replaceChannelSelectionInNavBar } from '../../utils/page.js';
|
||||
import { makeGetRequest, makePostRequest } from 'utils/xhr';
|
||||
import { setUserCookies } from 'utils/cookies';
|
||||
import { replaceChannelSelectionInNavBar } from 'utils/page';
|
||||
|
||||
class ChannelCreateForm extends React.Component {
|
||||
constructor (props) {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { connect } from 'react-redux';
|
||||
import { updateLoggedInChannel } from '../../actions';
|
||||
import View from './view.jsx';
|
||||
import { updateLoggedInChannel } from 'actions';
|
||||
import View from './view';
|
||||
|
||||
const mapDispatchToProps = dispatch => {
|
||||
return {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import React from 'react';
|
||||
import { makePostRequest } from '../../utils/xhr.js';
|
||||
import { setUserCookies } from '../../utils/cookies.js';
|
||||
import { replaceChannelSelectionInNavBar } from '../../utils/page.js';
|
||||
import { makePostRequest } from 'utils/xhr';
|
||||
import { setUserCookies } from 'utils/cookies';
|
||||
import { replaceChannelSelectionInNavBar } from 'utils/page';
|
||||
|
||||
class ChannelLoginForm extends React.Component {
|
||||
constructor (props) {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import {connect} from 'react-redux';
|
||||
import {setPublishInChannel} from '../../actions';
|
||||
import {setPublishInChannel} from 'actions';
|
||||
import View from './view.jsx';
|
||||
|
||||
const mapStateToProps = state => {
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import React from 'react';
|
||||
import ChannelLoginForm from '../ChannelLoginForm';
|
||||
import ChannelCreateForm from '../ChannelCreateForm';
|
||||
import ChannelLoginForm from 'containers/ChannelLoginForm';
|
||||
import ChannelCreateForm from 'containers/ChannelCreateForm';
|
||||
|
||||
const LOGIN = 'Existing';
|
||||
const CREATE = 'New';
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { connect } from 'react-redux';
|
||||
import { selectFile, updateError } from '../../actions';
|
||||
import View from './view.jsx';
|
||||
import { selectFile, updateError } from 'actions';
|
||||
import View from './view';
|
||||
|
||||
const mapStateToProps = state => {
|
||||
return {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import React from 'react';
|
||||
import { validateFile } from '../../utils/file.js';
|
||||
import Preview from '../../components/Preview.jsx';
|
||||
import { validateFile } from 'utils/file';
|
||||
import Preview from 'components/Preview';
|
||||
|
||||
class Dropzone extends React.Component {
|
||||
constructor (props) {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import {clearFile, selectFile, updateError, updateLoggedInChannel, updatePublishStatus} from '../../actions';
|
||||
import {connect} from 'react-redux';
|
||||
import View from './view.jsx';
|
||||
import {clearFile, selectFile, updateError, updateLoggedInChannel, updatePublishStatus} from 'actions';
|
||||
import View from './view';
|
||||
|
||||
const mapStateToProps = state => {
|
||||
return {
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
import React from 'react';
|
||||
import {getCookie} from '../../utils/cookies.js';
|
||||
import Dropzone from '../Dropzone';
|
||||
import PublishTitleInput from '../PublishTitleInput';
|
||||
import PublishUrlInput from '../PublishUrlInput';
|
||||
import PublishThumbnailInput from '../PublishThumbnailInput';
|
||||
import PublishMetadataInputs from '../PublishMetadataInputs';
|
||||
import ChannelSelect from '../ChannelSelect';
|
||||
import * as publishStates from '../../constants/publishing_states';
|
||||
import {getCookie} from 'utils/cookies';
|
||||
import Dropzone from 'containers/Dropzone';
|
||||
import PublishTitleInput from 'containers/PublishTitleInput';
|
||||
import PublishUrlInput from 'containers/PublishUrlInput';
|
||||
import PublishThumbnailInput from 'containers/PublishThumbnailInput';
|
||||
import PublishMetadataInputs from 'containers/PublishMetadataInputs';
|
||||
import ChannelSelect from 'containers/ChannelSelect';
|
||||
import * as publishStates from 'constants/publishing_states';
|
||||
|
||||
class PublishForm extends React.Component {
|
||||
constructor (props) {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import {connect} from 'react-redux';
|
||||
import {updateMetadata} from '../../actions';
|
||||
import View from './view.jsx';
|
||||
import {updateMetadata} from 'actions';
|
||||
import View from './view';
|
||||
|
||||
const mapStateToProps = state => {
|
||||
return {
|
||||
|
|
|
@ -1,14 +1,5 @@
|
|||
import React from 'react';
|
||||
|
||||
/*
|
||||
const textarea = document.getElementById('publish-description');
|
||||
const limit = 200;
|
||||
textarea.oninput = () => {
|
||||
textarea.style.height = '';
|
||||
textarea.style.height = Math.min(textarea.scrollHeight, limit) + 'px';
|
||||
}
|
||||
*/
|
||||
|
||||
class PublishMetadataInputs extends React.Component {
|
||||
constructor (props) {
|
||||
super(props);
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import {connect} from 'react-redux';
|
||||
import {updateMetadata} from '../../actions';
|
||||
import View from './view.jsx';
|
||||
import {updateMetadata} from 'actions';
|
||||
import View from './view';
|
||||
|
||||
const mapStateToProps = state => {
|
||||
return {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import {connect} from 'react-redux';
|
||||
import {updateMetadata} from '../../actions';
|
||||
import View from './view.jsx';
|
||||
import {updateMetadata} from 'actions';
|
||||
import View from './view';
|
||||
|
||||
const mapStateToProps = state => {
|
||||
return {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import {connect} from 'react-redux';
|
||||
import View from './view.jsx';
|
||||
import View from './view';
|
||||
|
||||
const mapStateToProps = state => {
|
||||
return {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import React from 'react';
|
||||
import Dropzone from '../Dropzone';
|
||||
import PublishForm from '../PublishForm';
|
||||
import PublishStatus from '../../components/PublishStatus.jsx';
|
||||
import Dropzone from 'containers/Dropzone';
|
||||
import PublishForm from 'containers/PublishForm';
|
||||
import PublishStatus from 'components/PublishStatus';
|
||||
|
||||
class PublishTool extends React.Component {
|
||||
render () {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import {updateClaim, updateError} from '../../actions';
|
||||
import {updateClaim, updateError} from 'actions';
|
||||
import {connect} from 'react-redux';
|
||||
import View from './view.jsx';
|
||||
import View from './view';
|
||||
|
||||
const mapStateToProps = state => {
|
||||
return {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import React from 'react';
|
||||
import { makeGetRequest } from '../../utils/xhr.js';
|
||||
import UrlMiddle from '../../components/PublishUrlMiddle.jsx';
|
||||
import {makeGetRequest} from 'utils/xhr';
|
||||
import UrlMiddle from 'components/PublishUrlMiddle';
|
||||
|
||||
class PublishUrlInput extends React.Component {
|
||||
constructor (props) {
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import React from 'react';
|
||||
import ReactDOM from 'react-dom';
|
||||
import { Provider } from 'react-redux';
|
||||
import { createStore } from 'redux';
|
||||
import Reducers from './reducers';
|
||||
import PublishTool from './containers/PublishTool';
|
||||
import {Provider} from 'react-redux';
|
||||
import {createStore} from 'redux';
|
||||
import Reducers from 'reducers';
|
||||
import PublishTool from 'containers/PublishTool';
|
||||
|
||||
let store = createStore(
|
||||
Reducers,
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import * as actions from '../constants/action_types';
|
||||
import * as actions from 'constants/action_types';
|
||||
|
||||
const initialState = {
|
||||
loggedInChannel: {
|
||||
|
|
|
@ -1,9 +1,11 @@
|
|||
const path = require('path');
|
||||
const Path = require('path');
|
||||
|
||||
const REACT_ROOT = Path.resolve(__dirname, 'react/');
|
||||
|
||||
module.exports = {
|
||||
entry : './react/index.js',
|
||||
output: {
|
||||
path : path.join(__dirname, '/public/bundle/'),
|
||||
path : Path.join(__dirname, '/public/bundle/'),
|
||||
filename: 'bundle.js',
|
||||
},
|
||||
watch : true,
|
||||
|
@ -19,4 +21,12 @@ module.exports = {
|
|||
},
|
||||
],
|
||||
},
|
||||
resolve: {
|
||||
modules: [
|
||||
REACT_ROOT,
|
||||
'node_modules',
|
||||
__dirname,
|
||||
],
|
||||
extensions: ['.js', '.jsx', '.scss'],
|
||||
},
|
||||
};
|
||||
|
|
Loading…
Add table
Reference in a new issue