diff --git a/system/backend/php/lib/HAXCMSSite.php b/system/backend/php/lib/HAXCMSSite.php index dba709e09a..5530384763 100644 --- a/system/backend/php/lib/HAXCMSSite.php +++ b/system/backend/php/lib/HAXCMSSite.php @@ -320,23 +320,29 @@ public function getServiceWorkerStatus() { * @return array keyed array of files we wish to pull from the boilerplate and keep in sync */ public function getManagedTemplateFiles() { + // not everything is templated but ensures self refreshing if we need to bulk tweak / enhance return array( - 'htaccess' => '.htaccess', // not templated (yet) but ensures self refreshing if we tweak it - '404' => '404.html', - 'msbc' => 'browserconfig.xml', - 'dat' => 'dat.json', + // HAX core / application / PWA requirements + 'htaccess' => '.htaccess', 'build' => 'build.js', 'buildlegacy' => 'assets/build-legacy.js', 'buildpolyfills' => 'assets/build-polyfills.js', 'buildhaxcms' => 'build-haxcms.js', 'index' => 'index.html', 'manifest' => 'manifest.json', - 'package' => 'package.json', - 'polymer' => 'polymer.json', 'push' => 'push-manifest.json', 'robots' => 'robots.txt', 'sw' => 'service-worker.js', 'outdated' => 'assets/upgrade-browser.html', + '404' => '404.html', + 'msbc' => 'browserconfig.xml', + // local development tooling + 'webdevserverhaxcmsconfigcjs' => 'web-dev-server.haxcms.config.cjs', + 'package' => 'package.json', + 'polymer' => 'polymer.json', + // Beaker browser + 'dat' => 'dat.json', + // SCORM 1.2 'imsmdrootv1p2p1' => 'imsmd_rootv1p2p1.xsd', 'imscprootv1p1p2' => 'imscp_rootv1p1p2.xsd', 'adlcprootv1p2' => 'adlcp_rootv1p2.xsd', diff --git a/system/boilerplate/site/package.json b/system/boilerplate/site/package.json index d7c78ae2f8..24fd69180d 100644 --- a/system/boilerplate/site/package.json +++ b/system/boilerplate/site/package.json @@ -19,33 +19,13 @@ "access": "public" }, "resolutions": { - "object-assign": "4.1.1", - "commander": "2.19.0", - "readable-stream": "1.1.14", - "isarray": "1.0.0", - "source-map": "0.5.7", - "kind-of": "6.0.2", - "is-number": "4.0.0", - "once": "1.4.0", - "minimist": "1.2.0", - "ajv": "6.5.5", - "fast-deep-equal": "2.0.1", - "json-schema-traverse": "0.4.1", - "@polymer/app-layout": "3.0.2" }, "devDependencies": { - "@prettier/plugin-php": "^0.11.0", - "prettier": "^1.16.4", - "gulp": "^4.0.2", - "gulp-terser": "^1.2.0", - "rollup-plugin-terser": "5.2.0" + "@web/dev-server": "0.3.0" }, "scripts": { - "lint": "prettier --check 'system/**/*.php' '*.{html,js,php,yml}'", - "format": "prettier --write 'system/**/*.php' '*.{html,js,php,yml}'", - "terser": "gulp", "start": "yarn run dev", - "dev": "polymer serve --open --entrypoint dist/dev.html --allow-origin --open-path=/", + "dev": "web-dev-server -c web-dev-server.haxcms.config.cjs", "dev-theme": "cd custom && yarn start" } -} +} \ No newline at end of file diff --git a/system/boilerplate/site/web-dev-server.haxcms.config.cjs b/system/boilerplate/site/web-dev-server.haxcms.config.cjs new file mode 100644 index 0000000000..7a7380d26d --- /dev/null +++ b/system/boilerplate/site/web-dev-server.haxcms.config.cjs @@ -0,0 +1,10 @@ +const path = require("path"); +module.exports = { + watch: true, + https: true, + nodeResolve: true, + open: true, + dedupe: true, + rootDir: "./", + appIndex: path.join(process.cwd(), "index.html"), +};