Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
monorepo
/
venus
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
1
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit d3ed6757
authored
Aug 03, 2024
by
vben
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix: unbuild version reduced to 2.0
1 parent
27ffc9e7
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
12 additions
and
14 deletions
.github/workflows/action-build.yml → .github/workflows/build.yml
internal/node-utils/src/fs.ts
internal/tailwind-config/src/plugins/entry.ts
internal/vite-config/src/plugins/inject-app-loading/index.ts
internal/vite-config/src/utils/env.ts
package.json
pnpm-lock.yaml
scripts/vsh/src/lint/index.ts
.github/workflows/
action-
build.yml
→
.github/workflows/build.yml
View file @
d3ed675
name
:
Dependabot post-update
# name: Dependabot post-update
name
:
Build detection
on
:
on
:
pull_request_target
:
pull_request_target
:
types
:
[
opened
,
synchronize
,
reopened
]
types
:
[
opened
,
synchronize
,
reopened
]
...
@@ -14,7 +15,7 @@ concurrency:
...
@@ -14,7 +15,7 @@ concurrency:
jobs
:
jobs
:
post-update
:
post-update
:
if
:
${{ github.actor == 'dependabot[bot]' }}
#
if: ${{ github.actor == 'dependabot[bot]' }}
runs-on
:
ubuntu-latest
runs-on
:
ubuntu-latest
strategy
:
strategy
:
matrix
:
matrix
:
...
@@ -45,5 +46,4 @@ jobs:
...
@@ -45,5 +46,4 @@ jobs:
-
name
:
Test and Build
-
name
:
Test and Build
run
:
|
run
:
|
pnpm run test:unit
pnpm run build
pnpm run build
internal/node-utils/src/fs.ts
View file @
d3ed675
...
@@ -11,7 +11,6 @@ export async function outputJSON(
...
@@ -11,7 +11,6 @@ export async function outputJSON(
await
fs
.
mkdir
(
dir
,
{
recursive
:
true
});
await
fs
.
mkdir
(
dir
,
{
recursive
:
true
});
const
jsonData
=
JSON
.
stringify
(
data
,
null
,
spaces
);
const
jsonData
=
JSON
.
stringify
(
data
,
null
,
spaces
);
await
fs
.
writeFile
(
filePath
,
jsonData
,
'utf8'
);
await
fs
.
writeFile
(
filePath
,
jsonData
,
'utf8'
);
console
.
log
(
`JSON data written to
${
filePath
}
`
);
}
catch
(
error
)
{
}
catch
(
error
)
{
console
.
error
(
'Error writing JSON file:'
,
error
);
console
.
error
(
'Error writing JSON file:'
,
error
);
throw
error
;
throw
error
;
...
@@ -22,8 +21,7 @@ export async function ensureFile(filePath: string) {
...
@@ -22,8 +21,7 @@ export async function ensureFile(filePath: string) {
try
{
try
{
const
dir
=
dirname
(
filePath
);
const
dir
=
dirname
(
filePath
);
await
fs
.
mkdir
(
dir
,
{
recursive
:
true
});
await
fs
.
mkdir
(
dir
,
{
recursive
:
true
});
await
fs
.
writeFile
(
filePath
,
''
,
{
flag
:
'a'
});
// 'a' flag to append if file exists, otherwise create
await
fs
.
writeFile
(
filePath
,
''
,
{
flag
:
'a'
});
console
.
log
(
`File ensured:
${
filePath
}
`
);
}
catch
(
error
)
{
}
catch
(
error
)
{
console
.
error
(
'Error ensuring file:'
,
error
);
console
.
error
(
'Error ensuring file:'
,
error
);
throw
error
;
throw
error
;
...
...
internal/tailwind-config/src/plugins/entry.ts
View file @
d3ed675
import
*
as
plugin
from
'tailwindcss/plugin.js'
;
import
plugin
from
'tailwindcss/plugin.js'
;
// @ts-expect-error Parameter 'addUtilities' implicitly has an 'any' type.
const
enterAnimationPlugin
=
plugin
(({
addUtilities
})
=>
{
const
enterAnimationPlugin
=
plugin
(({
addUtilities
})
=>
{
const
maxChild
=
5
;
const
maxChild
=
5
;
const
utilities
:
Record
<
string
,
any
>
=
{};
const
utilities
:
Record
<
string
,
any
>
=
{};
...
...
internal/vite-config/src/plugins/inject-app-loading/index.ts
View file @
d3ed675
import
fs
from
'node:fs'
;
import
fs
from
'node:fs'
;
import
fsp
from
'node:fs/promises'
;
import
{
join
}
from
'node:path'
;
import
{
join
}
from
'node:path'
;
import
{
fileURLToPath
}
from
'node:url'
;
import
{
fileURLToPath
}
from
'node:url'
;
...
@@ -62,7 +63,7 @@ async function getLoadingRawByHtmlTemplate(loadingTemplate: string) {
...
@@ -62,7 +63,7 @@ async function getLoadingRawByHtmlTemplate(loadingTemplate: string) {
return
;
return
;
}
}
const
htmlRaw
=
fs
.
readFileSync
(
loadingPath
,
'utf8'
);
const
htmlRaw
=
await
fsp
.
readFile
(
loadingPath
,
'utf8'
);
return
htmlRaw
;
return
htmlRaw
;
}
}
...
...
internal/vite-config/src/utils/env.ts
View file @
d3ed675
...
@@ -4,7 +4,7 @@ import { join } from 'node:path';
...
@@ -4,7 +4,7 @@ import { join } from 'node:path';
import
{
fs
}
from
'@vben/node-utils'
;
import
{
fs
}
from
'@vben/node-utils'
;
import
*
as
dotenv
from
'dotenv'
;
import
dotenv
from
'dotenv'
;
/**
/**
* 获取当前环境下生效的配置文件名
* 获取当前环境下生效的配置文件名
...
...
package.json
View file @
d3ed675
...
@@ -81,7 +81,7 @@
...
@@ -81,7 +81,7 @@
"tailwindcss"
:
"^3.4.7"
,
"tailwindcss"
:
"^3.4.7"
,
"turbo"
:
"^2.0.11"
,
"turbo"
:
"^2.0.11"
,
"typescript"
:
"^5.5.4"
,
"typescript"
:
"^5.5.4"
,
"unbuild"
:
"^
3.0.0-rc.7
"
,
"unbuild"
:
"^
2.0.0
"
,
"vite"
:
"^5.3.5"
,
"vite"
:
"^5.3.5"
,
"vitest"
:
"^2.0.5"
,
"vitest"
:
"^2.0.5"
,
"vue-tsc"
:
"^2.0.29"
"vue-tsc"
:
"^2.0.29"
...
...
pnpm-lock.yaml
View file @
d3ed675
This diff is collapsed.
Click to expand it.
scripts/vsh/src/lint/index.ts
View file @
d3ed675
...
@@ -16,9 +16,9 @@ async function runLint({ format }: LintCommandOptions) {
...
@@ -16,9 +16,9 @@ async function runLint({ format }: LintCommandOptions) {
await
execaCommand
(
`stylelint "**/*.{vue,css,less.scss}" --cache --fix`
,
{
await
execaCommand
(
`stylelint "**/*.{vue,css,less.scss}" --cache --fix`
,
{
stdio
:
'inherit'
,
stdio
:
'inherit'
,
});
});
//
await execaCommand(`eslint . --cache --fix`, {
await
execaCommand
(
`eslint . --cache --fix`
,
{
//
stdio: 'inherit',
stdio
:
'inherit'
,
//
});
});
await
execaCommand
(
`prettier . --write --cache --log-level warn`
,
{
await
execaCommand
(
`prettier . --write --cache --log-level warn`
,
{
stdio
:
'inherit'
,
stdio
:
'inherit'
,
});
});
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment