diff --git a/docs-app/app/models/.gitkeep b/docs-app/app/models/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/docs-app/app/routes/.gitkeep b/docs-app/app/routes/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/docs-app/app/routes/application.ts b/docs-app/app/routes/application.ts new file mode 100644 index 0000000..b5d831e --- /dev/null +++ b/docs-app/app/routes/application.ts @@ -0,0 +1,10 @@ +import Route from '@ember/routing/route'; + +export default class ApplicationRoute extends Route { + async model() { + const request = await fetch('/docs/manifest.json'); + const json = await request.json(); + + return { manifest: json }; + } +} diff --git a/docs-app/app/templates/application.gjs b/docs-app/app/templates/application.gjs index 6c6010c..e60d085 100644 --- a/docs-app/app/templates/application.gjs +++ b/docs-app/app/templates/application.gjs @@ -9,5 +9,6 @@ export default Route( {{pageTitle ENV.APP.shortVersion}} {{outlet}} +
{{JSON.stringify @model.manifest null 3}}
);
diff --git a/docs-app/ember-cli-build.js b/docs-app/ember-cli-build.js
index 6970dbb..9af4733 100644
--- a/docs-app/ember-cli-build.js
+++ b/docs-app/ember-cli-build.js
@@ -2,13 +2,15 @@
const EmberApp = require('ember-cli/lib/broccoli/ember-app');
-module.exports = function (defaults) {
+module.exports = async function (defaults) {
const app = new EmberApp(defaults, {
// Add options here
});
const { Webpack } = require('@embroider/webpack');
+ const { createManifest } = await import('kolay/webpack');
+
return require('@embroider/compat').compatBuild(app, Webpack, {
staticAddonTestSupportTrees: true,
staticAddonTrees: true,
@@ -21,5 +23,13 @@ module.exports = function (defaults) {
package: 'qunit',
},
],
+ packagerOptions: {
+ webpackConfig: {
+ devtool: process.env.CI ? 'source-map' : 'eval',
+ plugins: [
+ createManifest({ src: 'public/docs', dest: 'docs' }),
+ ],
+ },
+ },
});
};
diff --git a/docs-app/app/components/.gitkeep b/docs-app/public/docs/plugins/copy-file-to-public.md
similarity index 100%
rename from docs-app/app/components/.gitkeep
rename to docs-app/public/docs/plugins/copy-file-to-public.md
diff --git a/docs-app/app/controllers/.gitkeep b/docs-app/public/docs/plugins/copy-file.md
similarity index 100%
rename from docs-app/app/controllers/.gitkeep
rename to docs-app/public/docs/plugins/copy-file.md
diff --git a/docs-app/app/helpers/.gitkeep b/docs-app/public/docs/plugins/create-manifest.md
similarity index 100%
rename from docs-app/app/helpers/.gitkeep
rename to docs-app/public/docs/plugins/create-manifest.md
diff --git a/docs-app/public/docs/plugins/index.md b/docs-app/public/docs/plugins/index.md
new file mode 100644
index 0000000..9b33dc7
--- /dev/null
+++ b/docs-app/public/docs/plugins/index.md
@@ -0,0 +1,3 @@
+# Build Plugins
+
+foo
\ No newline at end of file