Skip to content

Commit

Permalink
Yarnify (#14)
Browse files Browse the repository at this point in the history
* lockfiles

* update react-hookstore 1.1 changes

* test watch remove
  • Loading branch information
chrisdopuch authored Jan 13, 2019
1 parent b8e9eee commit fe8bf0d
Show file tree
Hide file tree
Showing 8 changed files with 11,283 additions and 18,428 deletions.
18,406 changes: 0 additions & 18,406 deletions package-lock.json

This file was deleted.

21 changes: 10 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,16 @@
"version": "1.0.0",
"private": true,
"license": "MIT",
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject",
"lint": "tslint -p tsconfig.json",
"format": "prettier --write \"src/**/*.{ts,tsx}\" && npm run lint -- --fix",
"coveralls": "yarn test -- --coverage && cat ./coverage/lcov.info | coveralls",
"thumbnails": "thumb -w 300 src/images src/thumbnails"
},
"dependencies": {
"@material-ui/core": "^3.2.2",
"react": "16.7.0-alpha.2",
Expand All @@ -15,17 +25,6 @@
"react-twitter-widgets": "^1.7.1",
"tslint-react": "^3.6.0"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"test:watch": "npm run test -- --watch",
"eject": "react-scripts eject",
"lint": "tslint -p tsconfig.json",
"format": "prettier --write \"src/**/*.{ts,tsx}\" && npm run lint -- --fix",
"coveralls": "npm run test -- --coverage && cat ./coverage/lcov.info | coveralls",
"thumbnails": "thumb -w 300 src/images src/thumbnails"
},
"devDependencies": {
"@material-ui/icons": "^3.0.1",
"@types/enzyme": "^3.1.14",
Expand Down
2 changes: 1 addition & 1 deletion src/components/DrawerContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ interface IDrawerContentProps extends WithStyles<typeof stylesDeclarations> {

export const DrawerContent: SFC<IDrawerContentProps> = (props) => {
const { classes, items } = props;
const setisMobileDrawerOpen = useStore()[1];
const setisMobileDrawerOpen = useStore('appStore')[1];

return (
<div>
Expand Down
2 changes: 1 addition & 1 deletion src/components/NavDrawer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export interface INavDrawerProps extends WithStyles<typeof stylesDeclarations, t

export const NavDrawer: SFC<INavDrawerProps> = (props) => {
const { classes, theme, items } = props;
const [isMobileDrawerOpen, setisMobileDrawerOpen] = useStore();
const [isMobileDrawerOpen, setisMobileDrawerOpen] = useStore('appStore');

return (
<nav className={classes.drawer}>
Expand Down
2 changes: 1 addition & 1 deletion src/components/TitleBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ interface ITitleBarProps extends WithStyles<typeof stylesDeclarations, true> {

export const TitleBar: SFC<ITitleBarProps> = (props) => {
const { classes, title } = props;
const [isMobileDrawerOpen, setIsMobileDrawerOpen] = useStore();
const [isMobileDrawerOpen, setIsMobileDrawerOpen] = useStore('appStore');

return (
<AppBar position="fixed" className={classes.appBar}>
Expand Down
2 changes: 1 addition & 1 deletion src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const isProduction = process.env.NODE_ENV === 'production';
GoogleAnalytics.initialize('UA-128558512-1', { testMode: !isProduction });

// initialize the global hook store
createStore({ state: false });
createStore('appStore', false);

ReactDOM.render(<App title={`${!isProduction ? 'Dev: ' : ''}The Chris Dopuch Zone`} />, document.getElementById(
'root'
Expand Down
8 changes: 1 addition & 7 deletions types/react-hookstore/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,4 @@
// Definitions by: Chris Dopuch <[email protected]>

export function useStore(storeName?: string): [any, (newStore: any) => void];
export function createStore(config: StoreConfig): number;

export interface StoreConfig {
name?: string;
state?: any;
reducer?: (previousState: any, action: { type: string; payload: any }) => any;
}
export function createStore(name: string, state: any, reducer?: (state: any, value: any) => any): number;
11,268 changes: 11,268 additions & 0 deletions yarn.lock

Large diffs are not rendered by default.

0 comments on commit fe8bf0d

Please sign in to comment.