Adrià Vilanova MartÃnez | 104f8ef | 2024-05-04 17:22:11 +0200 | [diff] [blame^] | 1 | import Features from '../../../features/Features'; |
| 2 | import ScriptRunner from '../scripts/ScriptRunner'; |
| 3 | import { Context } from './Context'; |
| 4 | |
| 5 | export default class EntrypointScriptRunner { |
| 6 | private features: Features; |
| 7 | private scriptRunner: ScriptRunner; |
| 8 | |
| 9 | constructor(public context: Context) { |
| 10 | this.features = new Features(); |
| 11 | this.scriptRunner = new ScriptRunner(); |
| 12 | } |
| 13 | |
| 14 | run() { |
| 15 | const scripts = this.features.getScripts(this.context); |
| 16 | this.scriptRunner.add(...scripts); |
| 17 | this.scriptRunner.run(); |
| 18 | } |
| 19 | } |