Skip to content

Commit

Permalink
feat: first minimum try out
Browse files Browse the repository at this point in the history
  • Loading branch information
marianfoo committed Jun 28, 2024
1 parent 55e5fb9 commit 0b5fa3c
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import * as fsAsync from 'fs/promises'
import * as appindex from '@sap/cds/app/index'
//import * as cds from '@sap/cds-dk';
import { parse, parseLines, stringify } from 'dot-properties';
import { MiddlewareConfig, generatePreviewFiles } from '@sap-ux/preview-middleware';

Check failure on line 8 in src/index.ts

View workflow job for this annotation

GitHub Actions / test

Cannot find module '@sap-ux/preview-middleware' or its corresponding type declarations.
const cds = require('@sap/cds-dk');

const cdsLaunchpadLogger = cds.log('cds-launchpad-plugin');
Expand Down Expand Up @@ -104,8 +105,21 @@ export class cds_launchpad_plugin{
url = url + '/' + options.version;
}

return htmltemplate.replace(/LIB_URL/g, url)
.replace(/THEME/g, options.theme);
const config = {
flp: {
path: '/test/flpSandbox.html',
intent: { object: 'myapp', action: 'myaction' },
},
} satisfies MiddlewareConfig;
const basePath = '../uimodule/';
const fs = await generatePreviewFiles(basePath, {});
const files = fs.dump(basePath);

return files['webapp/test/flp.html'].contents;

return htmltemplate
.replace(/LIB_URL/g, url)
.replace(/THEME/g, options.theme);
}

getAppsFromDependencies(packagejson: any) {
Expand Down

0 comments on commit 0b5fa3c

Please sign in to comment.