This repository has been archived by the owner on Jan 27, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create flat bundles & ship module entry
- Loading branch information
Showing
16 changed files
with
6,576 additions
and
1,784 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1 @@ | ||
{ | ||
"presets": ["env", "react", "stage-3"] | ||
} | ||
{ "presets": ["./.babelrc.js"] } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
const { BABEL_ENV, NODE_ENV } = process.env | ||
|
||
const cjs = BABEL_ENV === 'cjs' || NODE_ENV === 'test' | ||
|
||
module.exports = { | ||
presets: [ | ||
['env', { loose: true, modules: false }], | ||
'react', | ||
'stage-3', | ||
], | ||
plugins: [ | ||
cjs && 'transform-es2015-modules-commonjs', | ||
].filter(Boolean), | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/** | ||
* Copyright 2017, IOOF Holdings Limited. | ||
* All rights reserved. | ||
* | ||
* This source code is licensed under the BSD-style license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*/ | ||
|
||
import * as React from 'react'; | ||
import * as Redux from 'redux'; | ||
import { MapState } from 'redux-subspace' | ||
|
||
interface ComponentDecorator { | ||
<TProps, TComponentConstruct extends (React.ComponentClass<TProps> | React.StatelessComponent<TProps>)>(component: TComponentConstruct): TComponentConstruct; | ||
} | ||
|
||
export interface Subspaced { | ||
<TParentState, TSubState>(mapState: MapState<TParentState, any, TSubState>): ComponentDecorator; | ||
<TParentState, TSubState>(mapState: MapState<TParentState, any, TSubState>, namespace: string): ComponentDecorator; | ||
<TParentState, TRootState, TSubState>(mapState: MapState<TParentState, TRootState, TSubState>): ComponentDecorator; | ||
<TParentState, TRootState, TSubState>(mapState: MapState<TParentState, TRootState, TSubState>, namespace: string): ComponentDecorator; | ||
(namespace: string): ComponentDecorator; | ||
} | ||
|
||
export const subspaced: Subspaced; | ||
|
||
export interface SubspaceProviderProps<TParentState, TRootState, TSubState> { | ||
children: React.ReactNode; | ||
mapState?: MapState<TParentState, TRootState, TSubState> | string; | ||
namespace?: string; | ||
} | ||
|
||
export class SubspaceProvider<TParentState, TRootState, TSubState> extends React.Component<SubspaceProviderProps<TParentState, TRootState, TSubState>> { } |
Oops, something went wrong.