Commit 19212fca authored by Tobias Bengfort's avatar Tobias Bengfort
Browse files

add script to generate scenarios.js automatically

parent 25641ad4
Pipeline #1797 canceled with stage
#!/bin/sh
ls scenarios/*.js | cut -d / -f 2 | cut -d . -f 1 | while read l; do
printf "import s%s from '../scenarios/%s.js';\n" "$l" "$l"
done
printf '\nexport default [\n'
ls scenarios/*.js | cut -d / -f 2 | cut -d . -f 1 | while read l; do
printf ' s%s,\n' "$l"
done
printf '];\n'
import gun from '../scenarios/gun.js';
import survive1 from '../scenarios/01_01survive.js';
import growth1 from '../scenarios/02_01growth.js';
import growth2 from '../scenarios/02_02growth.js';
import reach1 from '../scenarios/03_01reach.js';
import reach2 from '../scenarios/03_02reach.js';
import glider1 from '../scenarios/04_01glider.js';
import glider2 from '../scenarios/04_02glider.js';
import s01_survive_01 from '../scenarios/01_survive_01.js';
import s02_growth_01 from '../scenarios/02_growth_01.js';
import s03_reach_01 from '../scenarios/03_reach_01.js';
import s04_growth_02 from '../scenarios/04_growth_02.js';
import s05_glider_01 from '../scenarios/05_glider_01.js';
import s06_0reach_02 from '../scenarios/06_0reach_02.js';
import s07_glider_02 from '../scenarios/07_glider_02.js';
import s08_gun from '../scenarios/08_gun.js';
export default [
survive1,
growth1,
reach1,
growth2,
glider1,
reach2,
glider2,
gun,
s01_survive_01,
s02_growth_01,
s03_reach_01,
s04_growth_02,
s05_glider_01,
s06_0reach_02,
s07_glider_02,
s08_gun,
];
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment