-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
49413fc
commit d7cf1ab
Showing
29 changed files
with
178 additions
and
218 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
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
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
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
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
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
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,15 @@ | ||
import { LoadingStore } from '@component-controls/loader'; | ||
import { Store } from './Store'; | ||
import { loadStoryStore } from '../serialization/load-store'; | ||
import { StoryStore } from '../types'; | ||
|
||
export class HMRStore extends Store { | ||
constructor(store?: LoadingStore) { | ||
super(store ? loadStoryStore(store) : undefined); | ||
} | ||
|
||
hmr = (store?: LoadingStore): StoryStore => { | ||
console.log(store); | ||
return new HMRStore(store); | ||
}; | ||
} |
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
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,18 +1,14 @@ | ||
import { BroadcastStore } from './Store/BroadcastStore'; | ||
import { loadStoryStore } from './serialization/load-store'; | ||
|
||
import { saveStore } from './serialization/StoreStorage'; | ||
|
||
export * from './Store/Store'; | ||
|
||
/** | ||
* store variable, automatically filled with stories. | ||
*/ | ||
export const store = new BroadcastStore(); | ||
|
||
const stores = loadStoryStore( | ||
export const store = new BroadcastStore( | ||
require('@component-controls/loader/story-store-data.js'), | ||
); | ||
if (stores) { | ||
store.setStore(stores); | ||
saveStore(stores); | ||
} | ||
store.notifyObservers(); | ||
saveStore(store); |
Oops, something went wrong.