File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11'use strict' ;
22const path = require ( 'path' ) ;
33const liveServer = require ( '@pattern-lab/live-server' ) ;
4+
5+ const events = require ( './events' ) ;
46const logger = require ( './log' ) ;
57
68const serve = patternlab => {
@@ -25,7 +27,7 @@ const serve = patternlab => {
2527 ) ;
2628
2729 // 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 => {
2931 if ( serverReady ) {
3032 if ( data . file . indexOf ( 'css' ) > - 1 ) {
3133 liveServer . refreshCSS ( ) ;
@@ -36,7 +38,7 @@ const serve = patternlab => {
3638 } ) ;
3739
3840 //watch for pattern changes, and reload
39- patternlab . events . on ( 'patternlab-pattern-change' , ( ) => {
41+ patternlab . events . on ( events . PATTERNLAB_PATTERN_CHANGE , ( ) => {
4042 if ( serverReady ) {
4143 liveServer . reload ( ) ;
4244 }
You can’t perform that action at this time.
0 commit comments