@@ -2,8 +2,8 @@ import {sample, forward, guard} from 'effector'
2
2
3
3
import { sourceCode } from '../editor/state'
4
4
5
- import { clickPrettify , prettier , enableAutoScroll , disableAutoScroll } from '.'
6
- import { domain , typechecker , autoScrollLog } from './state'
5
+ import { clickPrettify , prettierFx , enableAutoScroll , disableAutoScroll } from '.'
6
+ import { domain , $ typechecker, $ autoScrollLog} from './state'
7
7
8
8
domain . onCreateStore ( store => {
9
9
const snapshot = localStorage . getItem ( store . compositeName . fullName )
@@ -18,7 +18,7 @@ domain.onCreateStore(store => {
18
18
return store
19
19
} )
20
20
21
- prettier . use ( async ( { code, parser} ) => {
21
+ prettierFx . use ( async ( { code, parser} ) => {
22
22
const req = await fetch ( 'https://codebox.now.sh/prettier' , {
23
23
method : 'POST' ,
24
24
body : JSON . stringify ( { code, config : { parser} } ) ,
@@ -34,17 +34,17 @@ prettier.use(async ({code, parser}) => {
34
34
sample ( {
35
35
source : {
36
36
code : sourceCode ,
37
- parser : typechecker . map ( parser => parser ?? 'babel' ) ,
37
+ parser : $ typechecker. map ( parser => parser ?? 'babel' ) ,
38
38
} ,
39
39
clock : guard ( clickPrettify , {
40
- filter : prettier . pending . map ( pending => ! pending ) ,
40
+ filter : prettierFx . pending . map ( pending => ! pending ) ,
41
41
} ) ,
42
- target : prettier ,
42
+ target : prettierFx ,
43
43
} )
44
44
45
45
forward ( {
46
- from : prettier . doneData ,
46
+ from : prettierFx . doneData ,
47
47
to : sourceCode ,
48
48
} )
49
49
50
- autoScrollLog . on ( enableAutoScroll , _ => true ) . on ( disableAutoScroll , _ => false )
50
+ $ autoScrollLog. on ( enableAutoScroll , _ => true ) . on ( disableAutoScroll , _ => false )
0 commit comments