Bläddra i källkod

feat(docs): Fix example code for admin ui build as deployment step (#352)

Jakub Rybinski 5 år sedan
förälder
incheckning
37e59c3ca7
1 ändrade filer med 7 tillägg och 3 borttagningar
  1. 7 3
      docs/content/docs/plugins/extending-the-admin-ui/_index.md

+ 7 - 3
docs/content/docs/plugins/extending-the-admin-ui/_index.md

@@ -59,11 +59,15 @@ Although the examples so far all use the `compileUiExtensions` function in conju
 ```TypeScript
 // compile-admin-ui.ts
 import { compileUiExtensions } from '@vendure/ui-devkit/compiler';
+import * as path from 'path';
 
 compileUiExtensions({
-  outputPath: path.join(__dirname, 'admin-ui'),
-  extensions: [/* ... */],
-}).compile();
+    outputPath: path.join(__dirname, 'admin-ui'),
+    extensions: [/* ... */],
+}).compile?.().then(() => {
+    process.exit(0);
+});
+
 ```
 
 This can then be run from the command line: