Skip to content

Commit

Permalink
Render the manifest
Browse files Browse the repository at this point in the history
  • Loading branch information
NullVoxPopuli committed Feb 11, 2024
1 parent ddeb5fa commit 5e93fd3
Show file tree
Hide file tree
Showing 9 changed files with 25 additions and 1 deletion.
Empty file removed docs-app/app/models/.gitkeep
Empty file.
Empty file removed docs-app/app/routes/.gitkeep
Empty file.
10 changes: 10 additions & 0 deletions docs-app/app/routes/application.ts
Original file line number Diff line number Diff line change
@@ -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 };
}
}
1 change: 1 addition & 0 deletions docs-app/app/templates/application.gjs
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@ export default Route(
{{pageTitle ENV.APP.shortVersion}}

{{outlet}}
<pre><code>{{JSON.stringify @model.manifest null 3}}</code></pre>
</template>
);
12 changes: 11 additions & 1 deletion docs-app/ember-cli-build.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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' }),
],
},
},
});
};
File renamed without changes.
File renamed without changes.
File renamed without changes.
3 changes: 3 additions & 0 deletions docs-app/public/docs/plugins/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Build Plugins

foo

0 comments on commit 5e93fd3

Please sign in to comment.