@windwalker-io/core 4.2.0 → 4.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +19 -19
- package/dist/debugger/Dashboard-Bm7ihi81.js +1 -0
- package/dist/debugger/Database-BGuRRq-L.js +36 -0
- package/dist/debugger/DefaultLayout-DviqbPNR.js +1 -0
- package/dist/debugger/Events-CNF6gvg0.js +1 -0
- package/dist/debugger/KeyValueTable-BfTkP1Rg.js +1 -0
- package/dist/debugger/Request-yQA1-Fkb.js +1 -0
- package/dist/debugger/Routing-C5mAPB17.js +1 -0
- package/dist/debugger/System-JFuNpoZY.js +1 -0
- package/dist/debugger/Timeline-Uii-K9v_.js +1 -0
- package/dist/debugger/debugger-ChQADeB6.js +2 -0
- package/dist/debugger/debugger.js +564 -0
- package/dist/debugger/system.min.js +5 -0
- package/dist/debugger/utilities-jMzguz3m.js +1 -0
- package/dist/debugger/vue-animate.min-BkEL-t1R.js +9 -0
- package/dist/debugger/windwalker-logo-h-w.svg +1 -0
- package/dist/debugger-console.css +6 -0
- package/dist/next.d.ts +112 -0
- package/dist/next.js +576 -0
- package/package.json +11 -4
- package/src/app/app.ts +43 -0
- package/src/asset-bundler.mjs +114 -114
- package/src/debugger/types/global.d.js +2 -2
- package/src/index.mjs +11 -11
- package/src/legacy/4.0/js-sync.mjs +74 -74
- package/src/next/fusion/index.ts +2 -2
- package/src/next/fusion/plugins/assets.ts +29 -29
- package/src/next/fusion/plugins/index.ts +3 -3
- package/src/next/fusion/plugins/systemjs.ts +66 -66
- package/src/next/fusion/processors/cloneAssets.ts +81 -81
- package/src/next/fusion/processors/cssModulize.ts +127 -105
- package/src/next/fusion/processors/index.ts +4 -4
- package/src/next/fusion/processors/installVendors.ts +178 -178
- package/src/next/fusion/processors/jsModulize.ts +293 -296
- package/src/next/index.ts +2 -2
- package/src/next/utilities/asset-sync.ts +47 -47
- package/src/next/utilities/crypto.ts +11 -11
- package/src/next/utilities/fs.ts +61 -61
- package/src/next/utilities/index.ts +5 -5
- package/src/next/utilities/modules.ts +17 -17
- package/bin/release.js +0 -47
- package/core/index.d.ts +0 -1
- package/core/index.html +0 -13
- package/core/lib/main.ts +0 -9
- package/core/package.json +0 -26
- package/core/public/vite.svg +0 -1
- package/core/src/main.ts +0 -23
- package/core/src/style.css +0 -95
- package/core/src/typescript.svg +0 -1
- package/core/src/vite-env.d.ts +0 -1
- package/postcss.config.js +0 -12
- package/tailwind/console.tailwind.config.cjs +0 -32
- package/tailwind.config.js +0 -10
- package/vite.config.debugger.ts +0 -94
- package/vite.config.next.ts +0 -75
|
@@ -1,47 +1,47 @@
|
|
|
1
|
-
import path, { resolve } from 'node:path';
|
|
2
|
-
import { loadJson } from './fs';
|
|
3
|
-
|
|
4
|
-
export function findModules(suffix = '', rootModule: string | null = 'src/Module'): string[] {
|
|
5
|
-
const pkg = path.resolve(process.cwd(), 'composer.json');
|
|
6
|
-
|
|
7
|
-
const pkgJson = loadJson(pkg);
|
|
8
|
-
|
|
9
|
-
const vendors = Object.keys(pkgJson['require'] || {})
|
|
10
|
-
.concat(Object.keys(pkgJson['require-dev'] || {}))
|
|
11
|
-
.map(id => `vendor/${id}/composer.json`)
|
|
12
|
-
.map((file) => loadJson(file))
|
|
13
|
-
.filter(pkgJson => pkgJson?.extra?.windwalker != null)
|
|
14
|
-
.map(pkgJson => {
|
|
15
|
-
return pkgJson?.extra?.windwalker?.modules?.map((module: string) => {
|
|
16
|
-
return `vendor/${pkgJson.name}/${module}/${suffix}`;
|
|
17
|
-
}) || [];
|
|
18
|
-
})
|
|
19
|
-
.flat();
|
|
20
|
-
|
|
21
|
-
if (rootModule) {
|
|
22
|
-
vendors.
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
return [...new Set(vendors)];
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
export function findPackages(suffix = '', withRoot = true): string[] {
|
|
29
|
-
const pkg = path.resolve(process.cwd(), 'composer.json');
|
|
30
|
-
|
|
31
|
-
const pkgJson = loadJson(pkg);
|
|
32
|
-
|
|
33
|
-
const vendors = Object.keys(pkgJson['require'] || {})
|
|
34
|
-
.concat(Object.keys(pkgJson['require-dev'] || {}))
|
|
35
|
-
.map(id => `vendor/${id}/composer.json`)
|
|
36
|
-
.map((file) => loadJson(file))
|
|
37
|
-
.filter((pkgJson) => pkgJson?.extra?.windwalker != null)
|
|
38
|
-
.map((pkgJson) => `vendor/${pkgJson.name}/${suffix}`)
|
|
39
|
-
.flat();
|
|
40
|
-
|
|
41
|
-
if (withRoot) {
|
|
42
|
-
vendors.unshift(suffix);
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
return [...new Set(vendors)];
|
|
46
|
-
}
|
|
47
|
-
|
|
1
|
+
import path, { resolve } from 'node:path';
|
|
2
|
+
import { loadJson } from './fs';
|
|
3
|
+
|
|
4
|
+
export function findModules(suffix = '', rootModule: string | null = 'src/Module'): string[] {
|
|
5
|
+
const pkg = path.resolve(process.cwd(), 'composer.json');
|
|
6
|
+
|
|
7
|
+
const pkgJson = loadJson(pkg);
|
|
8
|
+
|
|
9
|
+
const vendors = Object.keys(pkgJson['require'] || {})
|
|
10
|
+
.concat(Object.keys(pkgJson['require-dev'] || {}))
|
|
11
|
+
.map(id => `vendor/${id}/composer.json`)
|
|
12
|
+
.map((file) => loadJson(file))
|
|
13
|
+
.filter(pkgJson => pkgJson?.extra?.windwalker != null)
|
|
14
|
+
.map(pkgJson => {
|
|
15
|
+
return pkgJson?.extra?.windwalker?.modules?.map((module: string) => {
|
|
16
|
+
return `vendor/${pkgJson.name}/${module}/${suffix}`;
|
|
17
|
+
}) || [];
|
|
18
|
+
})
|
|
19
|
+
.flat();
|
|
20
|
+
|
|
21
|
+
if (rootModule) {
|
|
22
|
+
vendors.push(rootModule + '/' + suffix);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
return [...new Set(vendors)];
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export function findPackages(suffix = '', withRoot = true): string[] {
|
|
29
|
+
const pkg = path.resolve(process.cwd(), 'composer.json');
|
|
30
|
+
|
|
31
|
+
const pkgJson = loadJson(pkg);
|
|
32
|
+
|
|
33
|
+
const vendors = Object.keys(pkgJson['require'] || {})
|
|
34
|
+
.concat(Object.keys(pkgJson['require-dev'] || {}))
|
|
35
|
+
.map(id => `vendor/${id}/composer.json`)
|
|
36
|
+
.map((file) => loadJson(file))
|
|
37
|
+
.filter((pkgJson) => pkgJson?.extra?.windwalker != null)
|
|
38
|
+
.map((pkgJson) => `vendor/${pkgJson.name}/${suffix}`)
|
|
39
|
+
.flat();
|
|
40
|
+
|
|
41
|
+
if (withRoot) {
|
|
42
|
+
vendors.unshift(suffix);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
return [...new Set(vendors)];
|
|
46
|
+
}
|
|
47
|
+
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { randomBytes } from 'node:crypto';
|
|
2
|
-
|
|
3
|
-
export function uniqId(prefix: string = '', size = 16): string {
|
|
4
|
-
let id = randomBytes(size).toString('hex');
|
|
5
|
-
|
|
6
|
-
if (prefix) {
|
|
7
|
-
id = prefix + id;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
return id;
|
|
11
|
-
}
|
|
1
|
+
import { randomBytes } from 'node:crypto';
|
|
2
|
+
|
|
3
|
+
export function uniqId(prefix: string = '', size = 16): string {
|
|
4
|
+
let id = randomBytes(size).toString('hex');
|
|
5
|
+
|
|
6
|
+
if (prefix) {
|
|
7
|
+
id = prefix + id;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
return id;
|
|
11
|
+
}
|
package/src/next/utilities/fs.ts
CHANGED
|
@@ -1,61 +1,61 @@
|
|
|
1
|
-
import { getGlobBaseFromPattern } from '@windwalker-io/fusion-next';
|
|
2
|
-
import fs from 'node:fs';
|
|
3
|
-
import fg from 'fast-glob';
|
|
4
|
-
import isGlob from 'is-glob';
|
|
5
|
-
import { relative } from 'node:path';
|
|
6
|
-
|
|
7
|
-
export function loadJson(file: string) {
|
|
8
|
-
if (!fs.existsSync(file)) {
|
|
9
|
-
return null;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
return JSON.parse(fs.readFileSync(file, 'utf8'));
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export function containsMiddleGlob(str: string) {
|
|
16
|
-
return isGlob(removeLastGlob(str));
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export function removeLastGlob(str: string) {
|
|
20
|
-
// Remove `/**` `/*` `/**/*` at the end of the string
|
|
21
|
-
return str.replace(/(\/\*|\/\*\*?|\*\*\/\*?)$/, '');
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
const ds = process.platform === 'win32' ? '\\' : '/';
|
|
25
|
-
|
|
26
|
-
export function ensureDirPath(path: string, slash: '/' | '\\' = ds): string {
|
|
27
|
-
if (!path.endsWith(slash)) {
|
|
28
|
-
return path + slash;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
return path;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
export interface FindFileResult {
|
|
35
|
-
fullpath: string;
|
|
36
|
-
relativePath: string;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
export function findFilesFromGlobArray(sources: string[]): FindFileResult[] {
|
|
40
|
-
let files: FindFileResult[] = [];
|
|
41
|
-
|
|
42
|
-
for (const source of sources) {
|
|
43
|
-
files = [
|
|
44
|
-
...files,
|
|
45
|
-
...findFiles(source)
|
|
46
|
-
];
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
return files;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
function findFiles(src: string): FindFileResult[] {
|
|
53
|
-
return fg.globSync(src).map((file: string) => {
|
|
54
|
-
file = file.replace(/\\/g, '/');
|
|
55
|
-
|
|
56
|
-
return {
|
|
57
|
-
fullpath: file,
|
|
58
|
-
relativePath: relative(getGlobBaseFromPattern(src), file).replace(/\\/g, '/')
|
|
59
|
-
};
|
|
60
|
-
});
|
|
61
|
-
}
|
|
1
|
+
import { getGlobBaseFromPattern } from '@windwalker-io/fusion-next';
|
|
2
|
+
import fs from 'node:fs';
|
|
3
|
+
import fg from 'fast-glob';
|
|
4
|
+
import isGlob from 'is-glob';
|
|
5
|
+
import { relative } from 'node:path';
|
|
6
|
+
|
|
7
|
+
export function loadJson(file: string) {
|
|
8
|
+
if (!fs.existsSync(file)) {
|
|
9
|
+
return null;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
return JSON.parse(fs.readFileSync(file, 'utf8'));
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export function containsMiddleGlob(str: string) {
|
|
16
|
+
return isGlob(removeLastGlob(str));
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export function removeLastGlob(str: string) {
|
|
20
|
+
// Remove `/**` `/*` `/**/*` at the end of the string
|
|
21
|
+
return str.replace(/(\/\*|\/\*\*?|\*\*\/\*?)$/, '');
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
const ds = process.platform === 'win32' ? '\\' : '/';
|
|
25
|
+
|
|
26
|
+
export function ensureDirPath(path: string, slash: '/' | '\\' = ds): string {
|
|
27
|
+
if (!path.endsWith(slash)) {
|
|
28
|
+
return path + slash;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
return path;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export interface FindFileResult {
|
|
35
|
+
fullpath: string;
|
|
36
|
+
relativePath: string;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export function findFilesFromGlobArray(sources: string[]): FindFileResult[] {
|
|
40
|
+
let files: FindFileResult[] = [];
|
|
41
|
+
|
|
42
|
+
for (const source of sources) {
|
|
43
|
+
files = [
|
|
44
|
+
...files,
|
|
45
|
+
...findFiles(source)
|
|
46
|
+
];
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
return files;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
function findFiles(src: string): FindFileResult[] {
|
|
53
|
+
return fg.globSync(src).map((file: string) => {
|
|
54
|
+
file = file.replace(/\\/g, '/');
|
|
55
|
+
|
|
56
|
+
return {
|
|
57
|
+
fullpath: file,
|
|
58
|
+
relativePath: relative(getGlobBaseFromPattern(src), file).replace(/\\/g, '/')
|
|
59
|
+
};
|
|
60
|
+
});
|
|
61
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export * from './asset-sync';
|
|
2
|
-
export * from './fs';
|
|
3
|
-
export * from './crypto';
|
|
4
|
-
export * from './modules';
|
|
5
|
-
|
|
1
|
+
export * from './asset-sync';
|
|
2
|
+
export * from './fs';
|
|
3
|
+
export * from './crypto';
|
|
4
|
+
export * from './modules';
|
|
5
|
+
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { createRequire } from 'node:module';
|
|
2
|
-
|
|
3
|
-
export function resolveModuleRealpath(url: string, module: string) {
|
|
4
|
-
const require = createRequire(url);
|
|
5
|
-
|
|
6
|
-
return require.resolve(module);
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
export function stripUrlQuery(src: string) {
|
|
10
|
-
const qPos = src.indexOf('?');
|
|
11
|
-
|
|
12
|
-
if (qPos !== -1) {
|
|
13
|
-
return src.substring(0, qPos);
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
return src;
|
|
17
|
-
}
|
|
1
|
+
import { createRequire } from 'node:module';
|
|
2
|
+
|
|
3
|
+
export function resolveModuleRealpath(url: string, module: string) {
|
|
4
|
+
const require = createRequire(url);
|
|
5
|
+
|
|
6
|
+
return require.resolve(module);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export function stripUrlQuery(src: string) {
|
|
10
|
+
const qPos = src.indexOf('?');
|
|
11
|
+
|
|
12
|
+
if (qPos !== -1) {
|
|
13
|
+
return src.substring(0, qPos);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
return src;
|
|
17
|
+
}
|
package/bin/release.js
DELETED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import minimist from 'minimist';
|
|
2
|
-
import { execSync as exec } from 'child_process';
|
|
3
|
-
|
|
4
|
-
const cliInput = minimist(process.argv.slice(2));
|
|
5
|
-
|
|
6
|
-
const args = cliInput._;
|
|
7
|
-
|
|
8
|
-
if (!args.length) {
|
|
9
|
-
console.log('Please provide release type (major | minor | patch | premajor | preminor | prepatch | prerelease)');
|
|
10
|
-
process.exit(255);
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
const help = `
|
|
14
|
-
Usage: release.js -- <arguments for "npm version">
|
|
15
|
-
-b Branch name to push.
|
|
16
|
-
`;
|
|
17
|
-
|
|
18
|
-
if (cliInput['help'] || cliInput['h']) {
|
|
19
|
-
console.log(help);
|
|
20
|
-
process.exit(0);
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
console.log(`>>> yarn build`);
|
|
24
|
-
exec(`yarn build`, { stdio: 'inherit' });
|
|
25
|
-
|
|
26
|
-
console.log(`>>> npm version ${args.join(' ')}`);
|
|
27
|
-
const buffer = exec(`npm version ${args.join(' ')} --no-workspaces-update`);
|
|
28
|
-
|
|
29
|
-
const ver = buffer.toString().split("\n")[1];
|
|
30
|
-
|
|
31
|
-
console.log('>>> Git commit all');
|
|
32
|
-
exec(`git add .`, { stdio: 'inherit' });
|
|
33
|
-
try {
|
|
34
|
-
exec(`git commit -am "Prepare release JS @windwalker-io/core ${ver}."`, { stdio: 'inherit' });
|
|
35
|
-
} catch (e) {
|
|
36
|
-
console.log(e.message);
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
const branch = cliInput['b'] || 'master';
|
|
40
|
-
|
|
41
|
-
console.log('>>> Push to git');
|
|
42
|
-
|
|
43
|
-
exec(`git push origin ${branch}`, { stdio: 'inherit' });
|
|
44
|
-
|
|
45
|
-
console.log('>> Publish to npm');
|
|
46
|
-
|
|
47
|
-
exec(`npm publish`, { stdio: 'inherit' });
|
package/core/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export function setupCounter(element: HTMLButtonElement): void
|
package/core/index.html
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
<!doctype html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="UTF-8" />
|
|
5
|
-
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
|
|
6
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
7
|
-
<title>Vite App</title>
|
|
8
|
-
</head>
|
|
9
|
-
<body>
|
|
10
|
-
<div id="app"></div>
|
|
11
|
-
<script type="module" src="/src/main.ts"></script>
|
|
12
|
-
</body>
|
|
13
|
-
</html>
|
package/core/lib/main.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export function setupCounter(element: HTMLButtonElement) {
|
|
2
|
-
let counter = 0
|
|
3
|
-
const setCounter = (count: number) => {
|
|
4
|
-
counter = count
|
|
5
|
-
element.innerHTML = `count is ${counter}`
|
|
6
|
-
}
|
|
7
|
-
element.addEventListener('click', () => setCounter(++counter))
|
|
8
|
-
setCounter(0)
|
|
9
|
-
}
|
package/core/package.json
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "core",
|
|
3
|
-
"private": true,
|
|
4
|
-
"version": "0.0.0",
|
|
5
|
-
"type": "module",
|
|
6
|
-
"files": [
|
|
7
|
-
"dist",
|
|
8
|
-
"index.d.ts"
|
|
9
|
-
],
|
|
10
|
-
"main": "./dist/counter.umd.cjs",
|
|
11
|
-
"module": "./dist/counter.js",
|
|
12
|
-
"types": "./index.d.ts",
|
|
13
|
-
"exports": {
|
|
14
|
-
"types": "./index.d.ts",
|
|
15
|
-
"import": "./dist/counter.js",
|
|
16
|
-
"require": "./dist/counter.umd.cjs"
|
|
17
|
-
},
|
|
18
|
-
"scripts": {
|
|
19
|
-
"dev": "vite",
|
|
20
|
-
"build": "tsc && vite build"
|
|
21
|
-
},
|
|
22
|
-
"devDependencies": {
|
|
23
|
-
"typescript": "~5.9.2",
|
|
24
|
-
"vite": "^7.1.5"
|
|
25
|
-
}
|
|
26
|
-
}
|
package/core/public/vite.svg
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="31.88" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 257"><defs><linearGradient id="IconifyId1813088fe1fbc01fb466" x1="-.828%" x2="57.636%" y1="7.652%" y2="78.411%"><stop offset="0%" stop-color="#41D1FF"></stop><stop offset="100%" stop-color="#BD34FE"></stop></linearGradient><linearGradient id="IconifyId1813088fe1fbc01fb467" x1="43.376%" x2="50.316%" y1="2.242%" y2="89.03%"><stop offset="0%" stop-color="#FFEA83"></stop><stop offset="8.333%" stop-color="#FFDD35"></stop><stop offset="100%" stop-color="#FFA800"></stop></linearGradient></defs><path fill="url(#IconifyId1813088fe1fbc01fb466)" d="M255.153 37.938L134.897 252.976c-2.483 4.44-8.862 4.466-11.382.048L.875 37.958c-2.746-4.814 1.371-10.646 6.827-9.67l120.385 21.517a6.537 6.537 0 0 0 2.322-.004l117.867-21.483c5.438-.991 9.574 4.796 6.877 9.62Z"></path><path fill="url(#IconifyId1813088fe1fbc01fb467)" d="M185.432.063L96.44 17.501a3.268 3.268 0 0 0-2.634 3.014l-5.474 92.456a3.268 3.268 0 0 0 3.997 3.378l24.777-5.718c2.318-.535 4.413 1.507 3.936 3.838l-7.361 36.047c-.495 2.426 1.782 4.5 4.151 3.78l15.304-4.649c2.372-.72 4.652 1.36 4.15 3.788l-11.698 56.621c-.732 3.542 3.979 5.473 5.943 2.437l1.313-2.028l72.516-144.72c1.215-2.423-.88-5.186-3.54-4.672l-25.505 4.922c-2.396.462-4.435-1.77-3.759-4.114l16.646-57.705c.677-2.35-1.37-4.583-3.769-4.113Z"></path></svg>
|
package/core/src/main.ts
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import './style.css'
|
|
2
|
-
import typescriptLogo from './typescript.svg'
|
|
3
|
-
import { setupCounter } from '../lib/main'
|
|
4
|
-
|
|
5
|
-
document.querySelector<HTMLDivElement>('#app')!.innerHTML = `
|
|
6
|
-
<div>
|
|
7
|
-
<a href="https://vite.dev" target="_blank">
|
|
8
|
-
<img src="/vite.svg" class="logo" alt="Vite logo" />
|
|
9
|
-
</a>
|
|
10
|
-
<a href="https://www.typescriptlang.org/" target="_blank">
|
|
11
|
-
<img src="${typescriptLogo}" class="logo vanilla" alt="TypeScript logo" />
|
|
12
|
-
</a>
|
|
13
|
-
<h1>Vite + TypeScript</h1>
|
|
14
|
-
<div class="card">
|
|
15
|
-
<button id="counter" type="button"></button>
|
|
16
|
-
</div>
|
|
17
|
-
<p class="read-the-docs">
|
|
18
|
-
Click on the Vite and TypeScript logos to learn more
|
|
19
|
-
</p>
|
|
20
|
-
</div>
|
|
21
|
-
`
|
|
22
|
-
|
|
23
|
-
setupCounter(document.querySelector<HTMLButtonElement>('#counter')!)
|
package/core/src/style.css
DELETED
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
:root {
|
|
2
|
-
font-family: system-ui, Avenir, Helvetica, Arial, sans-serif;
|
|
3
|
-
line-height: 1.5;
|
|
4
|
-
font-weight: 400;
|
|
5
|
-
|
|
6
|
-
color-scheme: light dark;
|
|
7
|
-
color: rgba(255, 255, 255, 0.87);
|
|
8
|
-
background-color: #242424;
|
|
9
|
-
|
|
10
|
-
font-synthesis: none;
|
|
11
|
-
text-rendering: optimizeLegibility;
|
|
12
|
-
-webkit-font-smoothing: antialiased;
|
|
13
|
-
-moz-osx-font-smoothing: grayscale;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
a {
|
|
17
|
-
font-weight: 500;
|
|
18
|
-
color: #646cff;
|
|
19
|
-
text-decoration: inherit;
|
|
20
|
-
}
|
|
21
|
-
a:hover {
|
|
22
|
-
color: #535bf2;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
body {
|
|
26
|
-
margin: 0;
|
|
27
|
-
display: flex;
|
|
28
|
-
place-items: center;
|
|
29
|
-
min-width: 320px;
|
|
30
|
-
min-height: 100vh;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
h1 {
|
|
34
|
-
font-size: 3.2em;
|
|
35
|
-
line-height: 1.1;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
#app {
|
|
39
|
-
max-width: 1280px;
|
|
40
|
-
margin: 0 auto;
|
|
41
|
-
padding: 2rem;
|
|
42
|
-
text-align: center;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
.logo {
|
|
46
|
-
height: 6em;
|
|
47
|
-
padding: 1.5em;
|
|
48
|
-
will-change: filter;
|
|
49
|
-
}
|
|
50
|
-
.logo:hover {
|
|
51
|
-
filter: drop-shadow(0 0 2em #646cffaa);
|
|
52
|
-
}
|
|
53
|
-
.logo.vanilla:hover {
|
|
54
|
-
filter: drop-shadow(0 0 2em #3178c6aa);
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
.card {
|
|
58
|
-
padding: 2em;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
.read-the-docs {
|
|
62
|
-
color: #888;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
button {
|
|
66
|
-
border-radius: 8px;
|
|
67
|
-
border: 1px solid transparent;
|
|
68
|
-
padding: 0.6em 1.2em;
|
|
69
|
-
font-size: 1em;
|
|
70
|
-
font-weight: 500;
|
|
71
|
-
font-family: inherit;
|
|
72
|
-
background-color: #1a1a1a;
|
|
73
|
-
cursor: pointer;
|
|
74
|
-
transition: border-color 0.25s;
|
|
75
|
-
}
|
|
76
|
-
button:hover {
|
|
77
|
-
border-color: #646cff;
|
|
78
|
-
}
|
|
79
|
-
button:focus,
|
|
80
|
-
button:focus-visible {
|
|
81
|
-
outline: 4px auto -webkit-focus-ring-color;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
@media (prefers-color-scheme: light) {
|
|
85
|
-
:root {
|
|
86
|
-
color: #213547;
|
|
87
|
-
background-color: #ffffff;
|
|
88
|
-
}
|
|
89
|
-
a:hover {
|
|
90
|
-
color: #747bff;
|
|
91
|
-
}
|
|
92
|
-
button {
|
|
93
|
-
background-color: #f9f9f9;
|
|
94
|
-
}
|
|
95
|
-
}
|
package/core/src/typescript.svg
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="32" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path fill="#007ACC" d="M0 128v128h256V0H0z"></path><path fill="#FFF" d="m56.612 128.85l-.081 10.483h33.32v94.68h23.568v-94.68h33.321v-10.28c0-5.69-.122-10.444-.284-10.566c-.122-.162-20.4-.244-44.983-.203l-44.74.122l-.121 10.443Zm149.955-10.742c6.501 1.625 11.459 4.51 16.01 9.224c2.357 2.52 5.851 7.111 6.136 8.208c.08.325-11.053 7.802-17.798 11.988c-.244.162-1.22-.894-2.317-2.52c-3.291-4.795-6.745-6.867-12.028-7.233c-7.76-.528-12.759 3.535-12.718 10.321c0 1.992.284 3.17 1.097 4.795c1.707 3.536 4.876 5.649 14.832 9.956c18.326 7.883 26.168 13.084 31.045 20.48c5.445 8.249 6.664 21.415 2.966 31.208c-4.063 10.646-14.14 17.879-28.323 20.276c-4.388.772-14.79.65-19.504-.203c-10.28-1.828-20.033-6.908-26.047-13.572c-2.357-2.6-6.949-9.387-6.664-9.874c.122-.163 1.178-.813 2.356-1.504c1.138-.65 5.446-3.129 9.509-5.485l7.355-4.267l1.544 2.276c2.154 3.29 6.867 7.801 9.712 9.305c8.167 4.307 19.383 3.698 24.909-1.26c2.357-2.153 3.332-4.388 3.332-7.68c0-2.966-.366-4.266-1.91-6.501c-1.99-2.845-6.054-5.242-17.595-10.24c-13.206-5.69-18.895-9.224-24.096-14.832c-3.007-3.25-5.852-8.452-7.03-12.8c-.975-3.617-1.22-12.678-.447-16.335c2.723-12.76 12.353-21.659 26.25-24.3c4.51-.853 14.994-.528 19.424.569Z"></path></svg>
|
package/core/src/vite-env.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
/// <reference types="vite/client" />
|
package/postcss.config.js
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
module.exports = {
|
|
2
|
-
prefix: 'wd-',
|
|
3
|
-
purge: {
|
|
4
|
-
enabled: true,
|
|
5
|
-
mode: 'layers',
|
|
6
|
-
layers: ['base', 'components', 'utilities'],
|
|
7
|
-
content: [
|
|
8
|
-
'../../views/debugger/console.blade.php',
|
|
9
|
-
// './src/**/*.vue',
|
|
10
|
-
],
|
|
11
|
-
},
|
|
12
|
-
darkMode: 'media', // or 'media' or 'class'
|
|
13
|
-
theme: {
|
|
14
|
-
container: {
|
|
15
|
-
center: true,
|
|
16
|
-
padding: {
|
|
17
|
-
default: '1rem',
|
|
18
|
-
sm: '2rem',
|
|
19
|
-
lg: '3rem',
|
|
20
|
-
xl: '4rem',
|
|
21
|
-
},
|
|
22
|
-
},
|
|
23
|
-
extend: {},
|
|
24
|
-
},
|
|
25
|
-
variants: {
|
|
26
|
-
extend: {},
|
|
27
|
-
},
|
|
28
|
-
plugins: [
|
|
29
|
-
require('@tailwindcss/ui'),
|
|
30
|
-
require('@tailwindcss/custom-forms'),
|
|
31
|
-
],
|
|
32
|
-
}
|
package/tailwind.config.js
DELETED
package/vite.config.debugger.ts
DELETED
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
import vuePlugin from '@vitejs/plugin-vue';
|
|
2
|
-
import fs from 'fs-extra';
|
|
3
|
-
import { resolve } from 'node:path';
|
|
4
|
-
import { rimraf } from 'rimraf';
|
|
5
|
-
import { defineConfig } from 'vite';
|
|
6
|
-
import publicPath from 'vite-plugin-public-path';
|
|
7
|
-
import { injectSystemJS, resolveModuleRealpath, systemCSSFix } from './dist/next';
|
|
8
|
-
|
|
9
|
-
// const dependencies = JSON.parse(readFileSync('./package.json', 'utf8')).dependencies || {};
|
|
10
|
-
|
|
11
|
-
export default defineConfig(({ mode }) => {
|
|
12
|
-
return {
|
|
13
|
-
resolve: {
|
|
14
|
-
alias: {
|
|
15
|
-
'@': resolve('./src')
|
|
16
|
-
}
|
|
17
|
-
},
|
|
18
|
-
base: '/__vite_base__/',
|
|
19
|
-
build: {
|
|
20
|
-
rollupOptions: {
|
|
21
|
-
input: {
|
|
22
|
-
debugger: './src/debugger/debugger.js',
|
|
23
|
-
console: './scss/debugger-console.scss',
|
|
24
|
-
},
|
|
25
|
-
output: {
|
|
26
|
-
format: 'system',
|
|
27
|
-
inlineDynamicImports: false,
|
|
28
|
-
entryFileNames(chunkInfo) {
|
|
29
|
-
if (chunkInfo.name === 'debugger') {
|
|
30
|
-
return 'debugger.js';
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
if (chunkInfo.name === 'console') {
|
|
34
|
-
return 'debugger-console.css';
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
return '[name].js';
|
|
38
|
-
},
|
|
39
|
-
chunkFileNames(chunkInfo) {
|
|
40
|
-
return '[name]-[hash].js';
|
|
41
|
-
},
|
|
42
|
-
assetFileNames(assetInfo) {
|
|
43
|
-
if (assetInfo.name === 'console.css') {
|
|
44
|
-
return 'debugger-console.css';
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
return '[name][extname]';
|
|
48
|
-
},
|
|
49
|
-
},
|
|
50
|
-
// preserveEntrySignatures: 'strict',
|
|
51
|
-
// external: []
|
|
52
|
-
},
|
|
53
|
-
outDir: 'dist/debugger',
|
|
54
|
-
emptyOutDir: false,
|
|
55
|
-
minify: mode === 'production',
|
|
56
|
-
},
|
|
57
|
-
css: {
|
|
58
|
-
preprocessorOptions: {
|
|
59
|
-
scss: {
|
|
60
|
-
silenceDeprecations: ['mixed-decls', 'color-functions', 'global-builtin', 'import']
|
|
61
|
-
},
|
|
62
|
-
}
|
|
63
|
-
},
|
|
64
|
-
plugins: [
|
|
65
|
-
vuePlugin(),
|
|
66
|
-
{
|
|
67
|
-
name: 'custom',
|
|
68
|
-
async buildStart() {
|
|
69
|
-
await rimraf('./dist/debugger');
|
|
70
|
-
},
|
|
71
|
-
writeBundle() {
|
|
72
|
-
fs.moveSync('./dist/debugger/debugger-console.css', './dist/debugger-console.css', { overwrite: true });
|
|
73
|
-
|
|
74
|
-
const systemJSFile = resolveModuleRealpath(import.meta.url, 'systemjs/dist/system.min.js');
|
|
75
|
-
fs.copySync(systemJSFile, './dist/debugger/system.min.js', { overwrite: true });
|
|
76
|
-
}
|
|
77
|
-
},
|
|
78
|
-
publicPath({
|
|
79
|
-
publicPathExpression: "window.externalPublicPath",
|
|
80
|
-
html: true,
|
|
81
|
-
}),
|
|
82
|
-
systemCSSFix(),
|
|
83
|
-
// injectSystemJS(resolveModuleRealpath(import.meta.url, 'systemjs/dist/system.min.js'))
|
|
84
|
-
// dtsPlugin({
|
|
85
|
-
// outDir: 'dist',
|
|
86
|
-
// // tsconfigPath: './tsconfig.json',
|
|
87
|
-
// insertTypesEntry: true,
|
|
88
|
-
// // merge to 1 file
|
|
89
|
-
// rollupTypes: true,
|
|
90
|
-
// // include: ['./src/next/index.ts'],
|
|
91
|
-
// })
|
|
92
|
-
]
|
|
93
|
-
};
|
|
94
|
-
});
|