Skip to content

Commit

Permalink
introduce rollup build script (#1298)
Browse files Browse the repository at this point in the history
* introduce rollup build script

* remove unused theme

* fix theme loading in showcase

* remove cypress e2e test, we will yse playwright

* inject css for additional components, add missing shell dependencies

* emit exports on package.json, more styleINject

* add style injection to all remaining package css

* make sure licence is published

* ensure types are refernced in package.json exports

* add top level css to exports in package json

* record UI types in correct location in exports

* fix style in exports
  • Loading branch information
heswell authored May 2, 2024
1 parent 25f4f4d commit 78415de
Show file tree
Hide file tree
Showing 293 changed files with 3,362 additions and 1,454 deletions.
32 changes: 3 additions & 29 deletions .github/workflows/test-ui.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ jobs:
uses: actions/checkout@v3
- name: Install Node & dependencies
uses: ./.github/actions/setup-vuu-ui
- run: cd ./vuu-ui && npm run build:worker
- run: cd ./vuu-ui && npm run lint
- run: cd ./vuu-ui && npm run typecheck

Expand Down Expand Up @@ -46,42 +47,15 @@ jobs:
path: ./vuu-ui/playwright/reports/
retention-days: 10

cypress-e2e:
# As a third party action, cypress-io is pinned to a full length commit SHA for security purposes.
# This is also a requirement for the semgrep (static code analysis) scan to pass.
# https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions#using-third-party-actions
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Node & dependencies
uses: ./.github/actions/setup-vuu-ui
- name: Run end-to-end tests in Chrome
uses: cypress-io/github-action@bd9dda317ed2d4fbffc808ba6cdcd27823b2a13b
with:
install: false
working-directory: ./vuu-ui
browser: chrome
build: npm run showcase:build
start: npm run showcase:preview
wait-on: "http://localhost:4173"
- name: Run end-to-end tests in Edge
uses: cypress-io/github-action@bd9dda317ed2d4fbffc808ba6cdcd27823b2a13b
with:
install: false
working-directory: ./vuu-ui
browser: edge
build: npm run showcase:build
start: npm run showcase:preview
wait-on: "http://localhost:4173"

cypress-component:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Node & dependencies
uses: ./.github/actions/setup-vuu-ui
- name: Build Worker
run: cd ./vuu-ui && npm run build:worker
- name: Run component tests in Chrome
uses: cypress-io/github-action@bd9dda317ed2d4fbffc808ba6cdcd27823b2a13b
with:
Expand Down
2 changes: 2 additions & 0 deletions .semgrepignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,10 @@ vuu-ui/sample-apps/app-vuu-basket-trader/scripts/build.mjs
vuu-ui/sample-apps/app-vuu-example/scripts/build.mjs
vuu-ui/showcase/scripts/build-docs.mjs
vuu-ui/showcase/scripts/build.mjs
vuu-ui/showcase/scripts/build-rollup.mjs
vuu-ui/showcase/scripts/parse-stories.mjs
vuu-ui/showcase/scripts/utils.mjs
vuu-ui/scripts/build-rollup.mjs
vuu-ui/scripts/utils.mjs
vuu-ui/tools/vuu-showcase/src/showcase-utils.ts
example/order/src/main/scala/org/finos/vuu/order/oms/impl/InMemOmsApi.scala
Expand Down
6 changes: 6 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 2 additions & 18 deletions vuu-ui/cypress.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ import react from "@vitejs/plugin-react";
import tsconfigPaths from "vite-tsconfig-paths";
import { UserConfig } from "vite";
import { version as reactVersion } from "react";
import { cssInline } from "./tools/vite-plugin-inline-css/src";

const viteConfig: UserConfig = {
plugins: [react(), tsconfigPaths() /*, IstanbulPlugin()*/],
plugins: [react(), tsconfigPaths(), /*, IstanbulPlugin()*/ cssInline()],
server: {
watch: {
ignored: ["**/coverage"],
Expand Down Expand Up @@ -54,21 +55,4 @@ export default defineConfig({
specPattern: "packages/**/src/**/*.cy.{js,ts,jsx,tsx}",
indexHtmlFile: "cypress/support/component/component-index.html",
},

e2e: {
baseUrl: "http://localhost:4173/",
// eslint-disable-next-line @typescript-eslint/no-unused-vars
setupNodeEvents(on, config) {
// implement node event listeners here
on("task", {
log(message: string) {
console.log(message);

return null;
},
});
},
chromeWebSecurity: false,
defaultCommandTimeout: 10000,
},
});
25 changes: 0 additions & 25 deletions vuu-ui/cypress/e2e/layout-management/screenshot.cy.ts

This file was deleted.

21 changes: 0 additions & 21 deletions vuu-ui/cypress/pages/SaveLayoutDialog.ts

This file was deleted.

45 changes: 0 additions & 45 deletions vuu-ui/cypress/pages/ShellWithNewTheme.ts

This file was deleted.

2 changes: 1 addition & 1 deletion vuu-ui/cypress/support/component/component-index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
<title>Components App</title>
</head>
<body>
<div data-cy-root class="vuu-theme vuu-density-high" data-mode="light"></div>
<div data-cy-root class="vuu-theme salt-density-high" data-mode="light"></div>
</body>
</html>
5 changes: 5 additions & 0 deletions vuu-ui/global.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
declare module "@thomaschaplin/isin-generator" {
export const isinGenerator = () => undefined;
}

declare module "*.css" {
const content: string;
export default content;
}
Loading

0 comments on commit 78415de

Please sign in to comment.