File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 1
1
'use strict' ;
2
2
const path = require ( 'path' ) ;
3
3
const liveServer = require ( '@pattern-lab/live-server' ) ;
4
+
5
+ const events = require ( './events' ) ;
4
6
const logger = require ( './log' ) ;
5
7
6
8
const serve = patternlab => {
@@ -25,7 +27,7 @@ const serve = patternlab => {
25
27
) ;
26
28
27
29
// watch for asset changes, and reload appropriately
28
- patternlab . events . on ( 'patternlab-asset-change' , data => {
30
+ patternlab . events . on ( events . PATTERNLAB_PATTERN_ASSET_CHANGE , data => {
29
31
if ( serverReady ) {
30
32
if ( data . file . indexOf ( 'css' ) > - 1 ) {
31
33
liveServer . refreshCSS ( ) ;
@@ -36,7 +38,7 @@ const serve = patternlab => {
36
38
} ) ;
37
39
38
40
//watch for pattern changes, and reload
39
- patternlab . events . on ( 'patternlab-pattern-change' , ( ) => {
41
+ patternlab . events . on ( events . PATTERNLAB_PATTERN_CHANGE , ( ) => {
40
42
if ( serverReady ) {
41
43
liveServer . reload ( ) ;
42
44
}
You can’t perform that action at this time.
0 commit comments