Skip to content

Commit 0f323e1

Browse files
Copilotfregante
andcommitted
Address PR feedback: import URLs, move vite config, add watch script
- Extract URLs to urls.js and import in both test and demo - Move vite.config.js to demo folder with simplified config - Add both build:demo and watch:demo scripts - Use full URL list (136 URLs) instead of curated subset Co-authored-by: fregante <1402241+fregante@users.noreply.github.com>
1 parent e704ef9 commit 0f323e1

6 files changed

Lines changed: 163 additions & 321 deletions

File tree

demo/index.js

Lines changed: 2 additions & 155 deletions
Original file line numberDiff line numberDiff line change
@@ -1,144 +1,5 @@
11
import shortenUrl from '../index.js';
2-
3-
// URLs imported from index.test.js
4-
const urls = [
5-
'https://github.com/fregante/shorten-repo-url/',
6-
'https://github.com/fregante/shorten-repo-url/?tab=readme-ov-file',
7-
'https://github.com/fregante/shorten-repo-url/tree/v0.12',
8-
'https://github.com/fregante/shorten-repo-url/tree/d71718db6aa4feb8dc10edbad1134472468e971a',
9-
'https://github.com/nodejs/node/',
10-
'https://github.com/nodejs/shorten-repo-url/',
11-
'https://github.com/nodejs/node/tree/v0.12',
12-
'https://github.com/nodejs/node/tree/d71718db6aa4feb8dc10edbad1134472468e971a',
13-
'https://github.com/fregante/shorten-repo-url/tree/master/doc',
14-
'https://github.com/fregante/shorten-repo-url/tree/v0.12/doc',
15-
'https://github.com/fregante/shorten-repo-url/tree/d71718db6aa4feb8dc10edbad1134472468e971a/doc',
16-
'https://github.com/nodejs/node/tree/master/doc',
17-
'https://github.com/nodejs/node/tree/v0.12/doc',
18-
'https://github.com/nodejs/node/tree/d71718db6aa4feb8dc10edbad1134472468e971a/doc',
19-
'https://github.com/fregante/shorten-repo-url/blob/master/.gitignore',
20-
'https://github.com/fregante/shorten-repo-url/blob/v0.12/.gitignore',
21-
'https://github.com/fregante/shorten-repo-url/blob/cc8fc46/.gitignore',
22-
'https://github.com/fregante/shorten-repo-url/blob/main/한글.txt',
23-
'https://github.com/nodejs/node/blob/master/.gitignore',
24-
'https://github.com/nodejs/node/blob/v0.12/.gitignore',
25-
'https://github.com/nodejs/node/blob/cc8fc46/.gitignore',
26-
'https://github.com/fregante/shorten-repo-url/blame/master/.gitignore',
27-
'https://github.com/fregante/shorten-repo-url/blame/v0.12/.gitignore',
28-
'https://github.com/fregante/shorten-repo-url/blame/cc8fc46/.gitignore',
29-
'https://github.com/nodejs/node/blame/master/.gitignore',
30-
'https://github.com/nodejs/node/blame/v0.12/.gitignore',
31-
'https://github.com/nodejs/node/blame/cc8fc46/.gitignore',
32-
'https://github.com/fregante/shorten-repo-url/commits/master/.gitignore',
33-
'https://github.com/fregante/shorten-repo-url/commits/v0.12/.gitignore',
34-
'https://github.com/fregante/shorten-repo-url/commits/cc8fc46/.gitignore',
35-
'https://github.com/nodejs/node/commits/master/.gitignore',
36-
'https://github.com/nodejs/node/commits/v0.12/.gitignore',
37-
'https://github.com/nodejs/node/commits/cc8fc46/.gitignore',
38-
'https://github.com/fregante/shorten-repo-url/commit/cc8fc46.diff',
39-
'https://github.com/fregante/shorten-repo-url/commit/cc8fc46.patch',
40-
'https://github.com/nodejs/node/commit/cc8fc46.diff',
41-
'https://github.com/nodejs/node/commit/cc8fc46.patch',
42-
'https://github.com/fregante/shorten-repo-url/releases/tag/v0.12.0',
43-
'https://github.com/nodejs/node/releases/tag/v0.12.0',
44-
'https://github.com/fregante/shorten-repo-url/milestone/25',
45-
'https://github.com/fregante/shorten-repo-url/compare/d71718db6aa4feb8dc10edbad1134472468e971a',
46-
'https://github.com/fregante/shorten-repo-url/compare/master',
47-
'https://github.com/fregante/shorten-repo-url/compare/master...master',
48-
'https://github.com/nodejs/node/compare/d71718db6aa4feb8dc10edbad1134472468e971a',
49-
'https://github.com/nodejs/node/compare/master',
50-
'https://github.com/nodejs/node/compare/master...master',
51-
'https://github.com/nodejs/node/milestone/25',
52-
'https://github.com/fregante/shorten-repo-url/labels/npm',
53-
'https://github.com/nodejs/node/labels/npm',
54-
'https://github.com/nodejs/node/labels/Please%21%20♥',
55-
'https://github.com/refined-github/refined-github/labels/Please%21%20♥%EF%B8%8E',
56-
'https://github.com/fregante/shorten-repo-url/archive/6.4.1.zip',
57-
'https://github.com/fregante/shorten-repo-url/releases/download/6.4.1/now-macos',
58-
'https://github.com/zeit/now-cli/archive/6.4.1.zip',
59-
'https://github.com/zeit/now-cli/releases/download/6.4.1/now-macos',
60-
'https://github.com/bfred-it/shorten-repo-url/network/dependents',
61-
'https://github.com/bfred-it/shorten-repo-url/network/dependencies',
62-
'https://github.com/network/dependencies',
63-
'https://github.com/bfred-it/shorten-repo-url/wiki',
64-
'https://github.com/fregante/shorten-repo-url/pulse',
65-
'https://github.com/fregante/shorten-repo-url/labels',
66-
'https://github.com/fregante/shorten-repo-url/compare',
67-
'https://github.com/fregante/shorten-repo-url/network',
68-
'https://github.com/fregante/shorten-repo-url/projects',
69-
'https://github.com/fregante/shorten-repo-url/releases',
70-
'https://github.com/fregante/shorten-repo-url/milestones',
71-
'https://github.com/fregante/shorten-repo-url/contributors',
72-
'https://github.com/fregante/shorten-repo-url/pull/123/files',
73-
'https://github.com/nodejs/node/pull/123/files',
74-
'https://github.com/fregante/shorten-repo-url/pull/123/commits',
75-
'https://github.com/fregante/shorten-repo-url/pull/123/checks',
76-
'https://github.com/nodejs/node/wiki',
77-
'https://github.com/nodejs/node/pulse',
78-
'https://github.com/nodejs/node/labels',
79-
'https://github.com/nodejs/node/compare',
80-
'https://github.com/nodejs/node/network',
81-
'https://github.com/nodejs/node/projects',
82-
'https://github.com/nodejs/node/releases',
83-
'https://github.com/nodejs/node/milestones',
84-
'https://github.com/nodejs/node/contributors',
85-
'https://github.com/nodejs/node/graphs/commit-activity',
86-
'https://rawgit.com/fregante/shorten-repo-url/master/.gitignore',
87-
'https://cdn.rawgit.com/fregante/shorten-repo-url/v0.12/.gitignore',
88-
'https://cdn.rawgit.com/fregante/shorten-repo-url/d71718db/.gitignore',
89-
'https://raw.githubusercontent.com/fregante/shorten-repo-url/master/.gitignore',
90-
'https://raw.githubusercontent.com/fregante/shorten-repo-url/v0.12/.gitignore',
91-
'https://raw.githubusercontent.com/fregante/shorten-repo-url/d71718db/.gitignore',
92-
'https://rawgit.com/nodejs/node/master/.gitignore',
93-
'https://cdn.rawgit.com/nodejs/node/v0.12/.gitignore',
94-
'https://cdn.rawgit.com/nodejs/node/d71718db/.gitignore',
95-
'https://raw.githubusercontent.com/nodejs/node/master/.gitignore',
96-
'https://raw.githubusercontent.com/nodejs/node/v0.12/.gitignore',
97-
'https://raw.githubusercontent.com/nodejs/node/d71718db/.gitignore',
98-
'https://github.com/sindresorhus',
99-
'https://github.com/nodejs',
100-
'https://github.com/pulls',
101-
'https://github.com/issues',
102-
'https://github.com/trending',
103-
'https://github.com/features',
104-
'https://github.com/marketplace',
105-
'https://github.com/trending/developers',
106-
'https://github.com/settings/profile',
107-
'https://github.com/',
108-
'https://github.com',
109-
'https://github.com/fregante/shorten-repo-url/issues',
110-
'https://github.com/fregante/shorten-repo-url/issues?q=wow',
111-
'https://github.com/fregante/shorten-repo-url/issues?q=is%3Aissue++is%3Aopen+sort%3Aupdated-desc+&unrelated=true',
112-
'https://github.com/issues?q=is%3Aissue++is%3Aopen+sort%3Aupdated-desc+&unrelated=true',
113-
'https://github.com/pulls?q=is%3Apr++is%3Aopen+sort%3Aupdated-desc+&unrelated=true',
114-
'https://github.com/sindresorhus/notifier-for-github/pull/253/files/6b4489d417c9425dc27c5fb8d6b4a8518debd035..60cdcf3c3646164441bf8f037cef620479cdec59',
115-
'https://togithub.com/fregante/shorten-repo-url/issues/25',
116-
'https://togithub.com/fregante/shorten-repo-url/issues/28#issue-850900171',
117-
'https://togithub.com/fregante/shorten-repo-url/pull/32',
118-
'https://togithub.com/fregante/shorten-repo-url/pull/32/files',
119-
'https://togithub.com/fregante/shorten-repo-url/pull/33#pullrequestreview-801229042',
120-
'https://togithub.com/fregante/shorten-repo-url/pull/33#discussion_r750069394',
121-
'https://togithub.com/nodejs/node/pull/123',
122-
'https://togithub.com/nodejs/node/pull/123/files',
123-
'https://togithub.com/fregante/shorten-repo-url/commit/98c6175b0cbd4caca71d24e68e57b942b0dfb549',
124-
'https://togithub.com/refined-github/refined-github/commit/4f270c4f50e0a2a20085a6e92095117f10340322',
125-
'https://togithub.com/refined-github/refined-github/commit/e81a9646b448d90c7e02ab41332cab0507dccbbd#commitcomment-60089354',
126-
'https://github.com/refined-github/refined-github/wiki/%22Can-you-add-this-feature%3F%22#3-it-doesnt-require-options',
127-
'https://github.com/refined-github/refined-github/wiki/%22Can-you-add-this-feature%3F%22#',
128-
'https://github.com/refined-github/refined-github/wiki/%22Can-you-add-this-feature%3F%22',
129-
'https://github.com/fregante/shorten-repo-url/wiki/%22Can-you-add-this-feature%3F%22',
130-
'https://github.com/scarf005/hangul-test/wiki/한글-위키-페이지',
131-
'https://github.com/scarf005/hangul-test/wiki/한글-위키-페이지#한글-헤딩',
132-
'https://developer.mozilla.org/en-US/docs/Web/API/Document/createElement#parameters',
133-
'https://www.google.com/',
134-
'https://wwww.google.com/',
135-
'http://www.google.com/',
136-
'https://www.npmjs.com/',
137-
'https://www.npmjs.com/packaasdge/node',
138-
'https://example.com/nodejs/node/blob/cc8fc46/.gitignore',
139-
'https://example.site/한글로-된-URL',
140-
'https://한글로-된-경로.com/하위경로#한글-해시',
141-
];
2+
import {urls} from '../urls.js';
1423

1434
const currentLocation = 'https://github.com/fregante/shorten-repo-url/issue/1';
1445

@@ -177,21 +38,7 @@ urlInput.addEventListener('input', event => {
17738

17839
// Initialize examples
17940
function renderExamples() {
180-
// Show a subset of interesting examples
181-
const interestingUrls = [
182-
'https://github.com/nodejs/node/tree/v0.12/doc',
183-
'https://github.com/fregante/shorten-repo-url/blob/cc8fc46/.gitignore',
184-
'https://github.com/fregante/shorten-repo-url/releases/tag/v0.12.0',
185-
'https://github.com/fregante/shorten-repo-url/pull/123/files',
186-
'https://github.com/nodejs/node/labels/Please%21%20♥',
187-
'https://github.com/fregante/shorten-repo-url/commit/cc8fc46.diff',
188-
'https://raw.githubusercontent.com/nodejs/node/master/.gitignore',
189-
'https://github.com/sindresorhus',
190-
'https://github.com/fregante/shorten-repo-url/wiki/%22Can-you-add-this-feature%3F%22',
191-
'https://togithub.com/fregante/shorten-repo-url/issues/25',
192-
];
193-
194-
examplesContainer.innerHTML = interestingUrls.map(url => {
41+
examplesContainer.innerHTML = urls.map(url => {
19542
const shortened = shortenUrl(url, currentLocation);
19643
return `
19744
<div class="example">

demo/vite.config.js

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import {defineConfig} from 'vite';
2+
3+
export default defineConfig(({command}) => {
4+
if (command === 'build') {
5+
return {
6+
base: '',
7+
build: {
8+
outDir: 'dist',
9+
emptyOutDir: true,
10+
},
11+
};
12+
}
13+
14+
// Default config for test/serve
15+
return {
16+
test: {
17+
exclude: ['**/node_modules/**', '**/dist/**'],
18+
},
19+
};
20+
});

index.test.js

Lines changed: 1 addition & 139 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import {test, expect} from 'vitest';
22
import {Window} from 'happy-dom';
3+
import {urls} from './urls.js';
34
import shortenUrl, {applyToLink} from './index.js';
45

56
const currentLocation = 'https://github.com/fregante/shorten-repo-url/issue/1';
@@ -14,145 +15,6 @@ expect.addSnapshotSerializer({
1415
},
1516
});
1617

17-
const urls = [
18-
'https://github.com/fregante/shorten-repo-url/',
19-
'https://github.com/fregante/shorten-repo-url/?tab=readme-ov-file',
20-
'https://github.com/fregante/shorten-repo-url/tree/v0.12',
21-
'https://github.com/fregante/shorten-repo-url/tree/d71718db6aa4feb8dc10edbad1134472468e971a',
22-
'https://github.com/nodejs/node/',
23-
'https://github.com/nodejs/shorten-repo-url/',
24-
'https://github.com/nodejs/node/tree/v0.12',
25-
'https://github.com/nodejs/node/tree/d71718db6aa4feb8dc10edbad1134472468e971a',
26-
'https://github.com/fregante/shorten-repo-url/tree/master/doc',
27-
'https://github.com/fregante/shorten-repo-url/tree/v0.12/doc',
28-
'https://github.com/fregante/shorten-repo-url/tree/d71718db6aa4feb8dc10edbad1134472468e971a/doc',
29-
'https://github.com/nodejs/node/tree/master/doc',
30-
'https://github.com/nodejs/node/tree/v0.12/doc',
31-
'https://github.com/nodejs/node/tree/d71718db6aa4feb8dc10edbad1134472468e971a/doc',
32-
'https://github.com/fregante/shorten-repo-url/blob/master/.gitignore',
33-
'https://github.com/fregante/shorten-repo-url/blob/v0.12/.gitignore',
34-
'https://github.com/fregante/shorten-repo-url/blob/cc8fc46/.gitignore',
35-
'https://github.com/fregante/shorten-repo-url/blob/main/한글.txt',
36-
'https://github.com/nodejs/node/blob/master/.gitignore',
37-
'https://github.com/nodejs/node/blob/v0.12/.gitignore',
38-
'https://github.com/nodejs/node/blob/cc8fc46/.gitignore',
39-
'https://github.com/fregante/shorten-repo-url/blame/master/.gitignore',
40-
'https://github.com/fregante/shorten-repo-url/blame/v0.12/.gitignore',
41-
'https://github.com/fregante/shorten-repo-url/blame/cc8fc46/.gitignore',
42-
'https://github.com/nodejs/node/blame/master/.gitignore',
43-
'https://github.com/nodejs/node/blame/v0.12/.gitignore',
44-
'https://github.com/nodejs/node/blame/cc8fc46/.gitignore',
45-
'https://github.com/fregante/shorten-repo-url/commits/master/.gitignore',
46-
'https://github.com/fregante/shorten-repo-url/commits/v0.12/.gitignore',
47-
'https://github.com/fregante/shorten-repo-url/commits/cc8fc46/.gitignore',
48-
'https://github.com/nodejs/node/commits/master/.gitignore',
49-
'https://github.com/nodejs/node/commits/v0.12/.gitignore',
50-
'https://github.com/nodejs/node/commits/cc8fc46/.gitignore',
51-
'https://github.com/fregante/shorten-repo-url/commit/cc8fc46.diff',
52-
'https://github.com/fregante/shorten-repo-url/commit/cc8fc46.patch',
53-
'https://github.com/nodejs/node/commit/cc8fc46.diff',
54-
'https://github.com/nodejs/node/commit/cc8fc46.patch',
55-
'https://github.com/fregante/shorten-repo-url/releases/tag/v0.12.0',
56-
'https://github.com/nodejs/node/releases/tag/v0.12.0',
57-
'https://github.com/fregante/shorten-repo-url/milestone/25',
58-
'https://github.com/fregante/shorten-repo-url/compare/d71718db6aa4feb8dc10edbad1134472468e971a',
59-
'https://github.com/fregante/shorten-repo-url/compare/master',
60-
'https://github.com/fregante/shorten-repo-url/compare/master...master',
61-
'https://github.com/nodejs/node/compare/d71718db6aa4feb8dc10edbad1134472468e971a',
62-
'https://github.com/nodejs/node/compare/master',
63-
'https://github.com/nodejs/node/compare/master...master',
64-
'https://github.com/nodejs/node/milestone/25',
65-
'https://github.com/fregante/shorten-repo-url/labels/npm',
66-
'https://github.com/nodejs/node/labels/npm',
67-
'https://github.com/nodejs/node/labels/Please%21%20♥',
68-
'https://github.com/refined-github/refined-github/labels/Please%21%20♥%EF%B8%8E',
69-
'https://github.com/fregante/shorten-repo-url/archive/6.4.1.zip',
70-
'https://github.com/fregante/shorten-repo-url/releases/download/6.4.1/now-macos',
71-
'https://github.com/zeit/now-cli/archive/6.4.1.zip',
72-
'https://github.com/zeit/now-cli/releases/download/6.4.1/now-macos',
73-
'https://github.com/bfred-it/shorten-repo-url/network/dependents',
74-
'https://github.com/bfred-it/shorten-repo-url/network/dependencies',
75-
'https://github.com/network/dependencies',
76-
'https://github.com/bfred-it/shorten-repo-url/wiki',
77-
'https://github.com/fregante/shorten-repo-url/pulse',
78-
'https://github.com/fregante/shorten-repo-url/labels',
79-
'https://github.com/fregante/shorten-repo-url/compare',
80-
'https://github.com/fregante/shorten-repo-url/network',
81-
'https://github.com/fregante/shorten-repo-url/projects',
82-
'https://github.com/fregante/shorten-repo-url/releases',
83-
'https://github.com/fregante/shorten-repo-url/milestones',
84-
'https://github.com/fregante/shorten-repo-url/contributors',
85-
'https://github.com/fregante/shorten-repo-url/pull/123/files',
86-
'https://github.com/nodejs/node/pull/123/files',
87-
'https://github.com/fregante/shorten-repo-url/pull/123/commits',
88-
'https://github.com/fregante/shorten-repo-url/pull/123/checks',
89-
'https://github.com/nodejs/node/wiki',
90-
'https://github.com/nodejs/node/pulse',
91-
'https://github.com/nodejs/node/labels',
92-
'https://github.com/nodejs/node/compare',
93-
'https://github.com/nodejs/node/network',
94-
'https://github.com/nodejs/node/projects',
95-
'https://github.com/nodejs/node/releases',
96-
'https://github.com/nodejs/node/milestones',
97-
'https://github.com/nodejs/node/contributors',
98-
'https://github.com/nodejs/node/graphs/commit-activity',
99-
'https://rawgit.com/fregante/shorten-repo-url/master/.gitignore',
100-
'https://cdn.rawgit.com/fregante/shorten-repo-url/v0.12/.gitignore',
101-
'https://cdn.rawgit.com/fregante/shorten-repo-url/d71718db/.gitignore',
102-
'https://raw.githubusercontent.com/fregante/shorten-repo-url/master/.gitignore',
103-
'https://raw.githubusercontent.com/fregante/shorten-repo-url/v0.12/.gitignore',
104-
'https://raw.githubusercontent.com/fregante/shorten-repo-url/d71718db/.gitignore',
105-
'https://rawgit.com/nodejs/node/master/.gitignore',
106-
'https://cdn.rawgit.com/nodejs/node/v0.12/.gitignore',
107-
'https://cdn.rawgit.com/nodejs/node/d71718db/.gitignore',
108-
'https://raw.githubusercontent.com/nodejs/node/master/.gitignore',
109-
'https://raw.githubusercontent.com/nodejs/node/v0.12/.gitignore',
110-
'https://raw.githubusercontent.com/nodejs/node/d71718db/.gitignore',
111-
'https://github.com/sindresorhus',
112-
'https://github.com/nodejs',
113-
'https://github.com/pulls',
114-
'https://github.com/issues',
115-
'https://github.com/trending',
116-
'https://github.com/features',
117-
'https://github.com/marketplace',
118-
'https://github.com/trending/developers',
119-
'https://github.com/settings/profile',
120-
'https://github.com/',
121-
'https://github.com',
122-
'https://github.com/fregante/shorten-repo-url/issues',
123-
'https://github.com/fregante/shorten-repo-url/issues?q=wow',
124-
'https://github.com/fregante/shorten-repo-url/issues?q=is%3Aissue++is%3Aopen+sort%3Aupdated-desc+&unrelated=true',
125-
'https://github.com/issues?q=is%3Aissue++is%3Aopen+sort%3Aupdated-desc+&unrelated=true',
126-
'https://github.com/pulls?q=is%3Apr++is%3Aopen+sort%3Aupdated-desc+&unrelated=true',
127-
'https://github.com/sindresorhus/notifier-for-github/pull/253/files/6b4489d417c9425dc27c5fb8d6b4a8518debd035..60cdcf3c3646164441bf8f037cef620479cdec59',
128-
'https://togithub.com/fregante/shorten-repo-url/issues/25',
129-
'https://togithub.com/fregante/shorten-repo-url/issues/28#issue-850900171',
130-
'https://togithub.com/fregante/shorten-repo-url/pull/32',
131-
'https://togithub.com/fregante/shorten-repo-url/pull/32/files',
132-
'https://togithub.com/fregante/shorten-repo-url/pull/33#pullrequestreview-801229042',
133-
'https://togithub.com/fregante/shorten-repo-url/pull/33#discussion_r750069394',
134-
'https://togithub.com/nodejs/node/pull/123',
135-
'https://togithub.com/nodejs/node/pull/123/files',
136-
'https://togithub.com/fregante/shorten-repo-url/commit/98c6175b0cbd4caca71d24e68e57b942b0dfb549',
137-
'https://togithub.com/refined-github/refined-github/commit/4f270c4f50e0a2a20085a6e92095117f10340322',
138-
'https://togithub.com/refined-github/refined-github/commit/e81a9646b448d90c7e02ab41332cab0507dccbbd#commitcomment-60089354',
139-
'https://github.com/refined-github/refined-github/wiki/%22Can-you-add-this-feature%3F%22#3-it-doesnt-require-options',
140-
'https://github.com/refined-github/refined-github/wiki/%22Can-you-add-this-feature%3F%22#',
141-
'https://github.com/refined-github/refined-github/wiki/%22Can-you-add-this-feature%3F%22',
142-
'https://github.com/fregante/shorten-repo-url/wiki/%22Can-you-add-this-feature%3F%22',
143-
'https://github.com/scarf005/hangul-test/wiki/한글-위키-페이지',
144-
'https://github.com/scarf005/hangul-test/wiki/한글-위키-페이지#한글-헤딩',
145-
'https://developer.mozilla.org/en-US/docs/Web/API/Document/createElement#parameters',
146-
'https://www.google.com/',
147-
'https://wwww.google.com/',
148-
'http://www.google.com/',
149-
'https://www.npmjs.com/',
150-
'https://www.npmjs.com/packaasdge/node',
151-
'https://example.com/nodejs/node/blob/cc8fc46/.gitignore',
152-
'https://example.site/한글로-된-URL',
153-
'https://한글로-된-경로.com/하위경로#한글-해시',
154-
];
155-
15618
test.each(urls)('%s', url => {
15719
const shortened = shortenUrl(url, currentLocation);
15820
expect(shortened).toMatchSnapshot();

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@
2929
],
3030
"scripts": {
3131
"test": "xo && tsd && vitest run",
32-
"build:demo": "vite build"
32+
"build:demo": "NODE_OPTIONS='' vite build demo",
33+
"watch:demo": "NODE_OPTIONS='' vite demo"
3334
},
3435
"xo": {
3536
"parser": "@typescript-eslint/parser",

0 commit comments

Comments
 (0)