From 47dd7b48af304d78234547271f4ca0939038cce8 Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Sat, 26 Mar 2016 18:41:24 +1300 Subject: [PATCH] Relative ES6 module paths http://stackoverflow.com/questions/20158401/how-do-i-manage-relative-path-aliasing-in-multiple-grunt-browserify-bundles/23608416#23608416 https://github.com/substack/node-browserify/issues/767 http://stackoverflow.com/questions/28078780/relative-paths-in-package-json https://github.com/npm/npm/issues/1558 http://stackoverflow.com/questions/31624567/webstorm-es6-named-import-getting-cannot-resolve-symbol-error/31631415 http://stackoverflow.com/questions/20158401/how-do-i-manage-relative-path-aliasing-in-multiple-grunt-browserify-bundles/23608416#23608416 https://github.com/vigetlabs/gulp-starter/issues/17#issuecomment-44292681 --- admin/javascript/src/boot/index.js | 8 ++-- .../javascript/src/components/action/index.js | 8 ++-- .../src/components/form-action/index.js | 2 +- .../src/components/form-builder/index.js | 12 ++--- .../form-builder/tests/form-builder-test.js | 2 +- admin/javascript/src/components/form/index.js | 4 +- .../src/components/grid-field/cell.js | 2 +- .../src/components/grid-field/header-cell.js | 2 +- .../src/components/grid-field/header.js | 2 +- .../src/components/grid-field/index.js | 2 +- .../src/components/grid-field/row.js | 2 +- .../src/components/grid-field/table.js | 2 +- .../src/components/hidden-field/index.js | 2 +- .../north-header-breadcrumbs/index.js | 2 +- .../src/components/north-header/index.js | 2 +- .../src/components/text-field/index.js | 2 +- .../src/sections/campaign-admin/controller.js | 7 ++- .../src/sections/campaign-admin/index.js | 2 +- ...Component.js => silverstripe-component.js} | 0 gulpfile.js | 45 ++++++++++--------- package.json | 5 +-- 21 files changed, 58 insertions(+), 57 deletions(-) rename admin/javascript/src/{SilverStripeComponent.js => silverstripe-component.js} (100%) diff --git a/admin/javascript/src/boot/index.js b/admin/javascript/src/boot/index.js index 0c5128067..38066e280 100644 --- a/admin/javascript/src/boot/index.js +++ b/admin/javascript/src/boot/index.js @@ -4,12 +4,12 @@ import thunkMiddleware from 'redux-thunk'; import createLogger from 'redux-logger'; import reducerRegister from 'reducer-register'; -import * as configActions from '../state/config/actions'; -import ConfigReducer from '../state/config/reducer'; -import SchemaReducer from '../state/schema/reducer'; +import * as configActions from 'state/config/actions'; +import ConfigReducer from 'state/config/reducer'; +import SchemaReducer from 'state/schema/reducer'; // Sections -import CampaignAdmin from '../sections/campaign-admin'; +import CampaignAdmin from 'sections/campaign-admin'; function appBoot() { reducerRegister.add('config', ConfigReducer); diff --git a/admin/javascript/src/components/action/index.js b/admin/javascript/src/components/action/index.js index 4af8004d6..35c29bcb5 100644 --- a/admin/javascript/src/components/action/index.js +++ b/admin/javascript/src/components/action/index.js @@ -1,6 +1,6 @@ import React from 'react'; import ReactDOM from 'react-dom'; -import SilverStripeComponent from '../../SilverStripeComponent'; +import SilverStripeComponent from 'silverstripe-component.js'; class ActionComponent extends SilverStripeComponent { constructor(props) { @@ -8,7 +8,7 @@ class ActionComponent extends SilverStripeComponent { this.handleClick = this.handleClick.bind(this); } - + render() { return (