Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Sharkey
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Dima Krasner
Sharkey
Commits
7bd0a5b7
Unverified
Commit
7bd0a5b7
authored
1 year ago
by
かっこかり
Committed by
GitHub
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
(refactor) do generateDTS in build-assets (#11812)
parent
c0838c47
No related branches found
Branches containing commit
Tags
2023.9.0-beta.7
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
locales/generateDTS.js
+6
-1
6 additions, 1 deletion
locales/generateDTS.js
packages/frontend/vite.config.ts
+0
-5
0 additions, 5 deletions
packages/frontend/vite.config.ts
scripts/build-assets.mjs
+3
-0
3 additions, 0 deletions
scripts/build-assets.mjs
with
9 additions
and
6 deletions
locales/generateDTS.js
+
6
−
1
View file @
7bd0a5b7
import
*
as
fs
from
'
node:fs
'
;
import
{
fileURLToPath
}
from
'
node:url
'
;
import
{
dirname
}
from
'
node:path
'
;
import
*
as
yaml
from
'
js-yaml
'
;
import
*
as
ts
from
'
typescript
'
;
import
ts
from
'
typescript
'
;
const
__filename
=
fileURLToPath
(
import
.
meta
.
url
);
const
__dirname
=
dirname
(
__filename
);
function
createMembers
(
record
)
{
return
Object
.
entries
(
record
)
...
...
This diff is collapsed.
Click to expand it.
packages/frontend/vite.config.ts
+
0
−
5
View file @
7bd0a5b7
...
...
@@ -6,7 +6,6 @@ import { type UserConfig, defineConfig } from 'vite';
import
ReactivityTransform
from
'
@vue-macros/reactivity-transform/vite
'
;
import
locales
from
'
../../locales
'
;
import
generateDTS
from
'
../../locales/generateDTS
'
;
import
meta
from
'
../../package.json
'
;
import
pluginUnwindCssModuleClassName
from
'
./lib/rollup-plugin-unwind-css-module-class-name
'
;
import
pluginJson5
from
'
./vite.json5
'
;
...
...
@@ -67,10 +66,6 @@ export function getConfig(): UserConfig {
}),
]
:
[],
{
name
:
'
locale:generateDTS
'
,
buildStart
:
generateDTS
,
},
],
resolve
:
{
...
...
This diff is collapsed.
Click to expand it.
scripts/build-assets.mjs
+
3
−
0
View file @
7bd0a5b7
...
...
@@ -10,6 +10,7 @@ import postcss from 'postcss';
import
*
as
terser
from
'
terser
'
;
import
locales
from
'
../locales/index.js
'
;
import
generateDTS
from
'
../locales/generateDTS.js
'
;
import
meta
from
'
../package.json
'
assert
{
type
:
"
json
"
};
async
function
copyFrontendFonts
()
{
...
...
@@ -21,6 +22,8 @@ async function copyFrontendTablerIcons() {
}
async
function
copyFrontendLocales
()
{
generateDTS
();
await
fs
.
mkdir
(
'
./built/_frontend_dist_/locales
'
,
{
recursive
:
true
});
const
v
=
{
'
_version_
'
:
meta
.
version
};
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment