Skip to content

Commit c0f3a2c

Browse files
mddragnevdkamburov
andauthored
Add base path so that the request are going to the correct subdirectory (#11)
* Create node.js.yml (#8) * Change import url from absolute to relative path because of the active directory * Add base path so that the request are going to the correct subdirectory --------- Co-authored-by: Deyan Kamburov <[email protected]>
1 parent e1521cb commit c0f3a2c

File tree

3 files changed

+32
-2
lines changed

3 files changed

+32
-2
lines changed

.github/workflows/node.js.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
2+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs
3+
4+
name: Node.js CI
5+
6+
on:
7+
push:
8+
branches: [ "vnext", "master" ]
9+
pull_request:
10+
branches: [ "vnext", "master" ]
11+
12+
jobs:
13+
build:
14+
15+
runs-on: ubuntu-latest
16+
17+
strategy:
18+
matrix:
19+
node-version: [20.x, 22.x]
20+
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
21+
22+
steps:
23+
- uses: actions/checkout@v4
24+
- name: Use Node.js ${{ matrix.node-version }}
25+
uses: actions/setup-node@v4
26+
with:
27+
node-version: ${{ matrix.node-version }}
28+
cache: 'npm'
29+
- run: npm ci
30+
- run: npm run build --if-present

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
66
<title>Vite + Lit + TS</title>
77
<link rel="stylesheet" href="./src/index.css" />
8-
<script type="module" src="/src/app.ts"></script>
8+
<script type="module" src="./src/app.ts"></script>
99
</head>
1010
<body>
1111
<app-root></app-root>

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
"dev:fleet": "vite projects/fleet-management-grid",
1111
"dev:hr": "vite projects/hr-portal",
1212
"dev:sales": "vite projects/sales-grid",
13-
1413
"build": "tsc && vite build",
14+
"build:ci": "tsc && vite build --base /webcomponents-grid-examples/",
1515
"preview": "vite preview"
1616
},
1717
"dependencies": {

0 commit comments

Comments
 (0)