diff --git a/.gitignore b/.gitignore index 59703932b..2f44f6f7e 100644 --- a/.gitignore +++ b/.gitignore @@ -41,6 +41,7 @@ desktop\.ini src/typedefs/ct.js/types.d.ts app/examples app/data/bundle.js +app/data/riotTags.js app/data/bundle.css app/data/node_requires/**/* app/data/hotLoadTags diff --git a/gulpfile.js b/gulpfile.js index 9b4cbb1be..3679023a2 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -114,8 +114,8 @@ const riotSettings = { const compileRiot = () => gulp.src('./src/riotTags/**') .pipe(riot(riotSettings)) - .pipe(concat('riot.js')) - .pipe(gulp.dest('./temp/')); + .pipe(concat('riotTags.js')) + .pipe(gulp.dest('./data/')); const compileRiotPartial = path => { console.log(`Updating tag at ${path}…`); @@ -130,8 +130,7 @@ const concatScripts = () => objectMode: true }, gulp.src('./src/js/3rdparty/riot.min.js'), - gulp.src(['./src/js/**', '!./src/js/3rdparty/riot.min.js']), - gulp.src('./temp/riot.js') + gulp.src(['./src/js/**', '!./src/js/3rdparty/riot.min.js']) ) .pipe(sourcemaps.init({ largeFile: true @@ -180,7 +179,7 @@ const watchScripts = () => { .on('change', fileChangeNotifier); }; const watchRiot = () => { - const watcher = gulp.watch('./src/riotTags/**/*'); + const watcher = gulp.watch('./src/riotTags/**/*', compileRiot); watcher.on('error', err => { notifier.notify(makeErrorObj('Riot failure', err)); console.error('[pug error]', err); diff --git a/src/pug/includes/footer.pug b/src/pug/includes/footer.pug deleted file mode 100644 index 8cc31413f..000000000 --- a/src/pug/includes/footer.pug +++ /dev/null @@ -1,2 +0,0 @@ -div#loading Loading… -script(src="data/bundle.js") diff --git a/src/pug/index.pug b/src/pug/index.pug index cc1fb62de..bdaa54e4f 100644 --- a/src/pug/index.pug +++ b/src/pug/index.pug @@ -40,7 +40,9 @@ html if (!window.__dirname) { window.__dirname = global.__dirname; } - include includes/footer.pug + div#loading Loading… + script(src="data/bundle.js") + script(src="data/riotTags.js") script. // @see https://github.com/microsoft/monaco-editor-samples/blob/master/nwjs-amd-v2/index.html (function loadMonaco() {