File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ export const metaEndTerm = '**/';
2323// │ Script │
2424// └ ┘
2525
26+ export const SCRIPT_EXTENSION = / \. j s $ / g;
2627export const MAIN_FUNCTION_EXEC = 'main(this)' ;
2728
2829// ┌ ┐
Original file line number Diff line number Diff line change 66 defaultScriptPath ,
77 metaEndTerm ,
88 metaStartTerm ,
9- NOTIFY
9+ NOTIFY ,
10+ SCRIPT_EXTENSION
1011} from './const.js' ;
1112import { matchesMetas , stringRange } from './utils/utils.js' ;
1213import { ScriptExecution } from './models/ScriptExecution.js' ;
@@ -28,7 +29,7 @@ export class ScriptManager {
2829 loadDefaultScripts ( ) {
2930 let scriptsFilenames = fs
3031 . readdirSync ( defaultScriptPath )
31- . filter ( file => file . includes ( '.js' ) ) ;
32+ . filter ( file => file . match ( SCRIPT_EXTENSION ) ) ;
3233
3334 scriptsFilenames . forEach ( filename => {
3435 this . loadScript ( path . join ( defaultScriptPath , filename ) ) ;
You can’t perform that action at this time.
0 commit comments