Skip to content

Commit

Permalink
bug(documentation-website,mindmap,history-website): provide logo and … (
Browse files Browse the repository at this point in the history
  • Loading branch information
Idrinth authored Apr 12, 2024
1 parent 1518d10 commit aa3e318
Show file tree
Hide file tree
Showing 15 changed files with 93 additions and 66 deletions.
1 change: 1 addition & 0 deletions .github/workflows/global.test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,7 @@ jobs:
package-lock.json
- run: cd documentation-website && npm ci
- run: cd documentation-website && npm run language
- run: cd documentation-website && npm run assets
- run: cd documentation-website && npm run test
- run: mv ./documentation-website/coverage ./
- run: sed -i 's/SF:src/SF:documentation-website\/src/' ./coverage/lcov.info
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/mindmap.validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,5 @@ jobs:
mindmap/package-lock.json
package-lock.json
- run: cd mindmap && npm ci
- run: cd mindmap && npm run assets
- run: cd mindmap && npm run validate
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# ROOT
/node_modules
./cypress.config.ts

# CLI
/cli/src/**/*.js
Expand Down Expand Up @@ -48,6 +47,8 @@
/documentation-website/public/assets/profile-*.jpg
/documentation-website/public/assets/*-*.min.css
/documentation-website/dump.txt
/documentation-website/src/assets/iab.svg
/documentation-website/src/assets/favicon.svg

# History Microservice
/history-microservice/node_modules
Expand All @@ -60,13 +61,17 @@
/history-website/cypress/screenshots
/history-website/src/locales
/history-website/dump.txt
/history-website/src/assets/iab.svg
/history-website/src/assets/favicon.svg

#Mindmap
/mindmap/node_modules
/mindmap/dist
/mindmap/cache
/mindmap/src/*.js
/mindmap/coverage
/mindmap/assets/iab.svg
/mindmap/assets/favicon.svg

# Editor directories and files
.DS_Store
Expand Down
File renamed without changes
File renamed without changes
5 changes: 3 additions & 2 deletions documentation-website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"scripts": {
"start": "npm run build && npm run serve",
"dev": "irfbrgr && vite",
"build": "npm run drop-dist && npm run routes && npm run language && npm run contributors && tsc && vite build && irfbrgf",
"build": "npm run assets && npm run drop-dist && npm run routes && npm run language && npm run contributors && tsc && vite build && irfbrgf",
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
"lint-fix": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0 --fix",
"preview": "vite preview",
Expand All @@ -32,7 +32,8 @@
"pure-build": "npm run drop-dist && npm run routes && npm run language && tsc && vite build && irfbrgf",
"drop-dist": "node tools/drop-dist.js",
"spellcheck": "itlfy dump && spellchecker",
"knip": "knip"
"knip": "knip",
"assets": "node tools/copy-assets.js"
},
"dependencies": {
"@fontsource/roboto": "^5.0.12",
Expand Down
27 changes: 27 additions & 0 deletions documentation-website/tools/copy-assets.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import {
existsSync,
mkdirSync,
readdirSync,
readFileSync,
rmSync,
writeFileSync,
} from 'fs';

const target = '/src/assets';
if (! existsSync(process.cwd() + target,)) {
mkdirSync(process.cwd() + target,);
}

for (const file of readdirSync(process.cwd() + '/../assets', 'utf8',)) {
if (! existsSync(process.cwd() + target,)) {
mkdirSync(process.cwd() + target,);
}
if (existsSync(process.cwd() + target + '/' + file,)) {
rmSync(process.cwd() + target + '/' + file,);
}
writeFileSync(
process.cwd() + target + '/' + file,
readFileSync(process.cwd() + '/../assets/' + file, 'binary',),
'binary',
);
}
2 changes: 1 addition & 1 deletion history-website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"type": "module",
"scripts": {
"dev": "vite",
"build": "vite build",
"build": "node tools/copy-assets.js && npm run language && vite build",
"preview": "vite preview",
"check": "svelte-check --tsconfig tsconfig.json",
"lint-md": "markdownlint *.md",
Expand Down
1 change: 0 additions & 1 deletion history-website/src/assets/favicon.svg

This file was deleted.

29 changes: 0 additions & 29 deletions history-website/src/assets/iab.svg

This file was deleted.

27 changes: 27 additions & 0 deletions history-website/tools/copy-assets.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import {
existsSync,
mkdirSync,
readdirSync,
readFileSync,
rmSync,
writeFileSync,
} from 'fs';

const target = '/src/assets';
if (! existsSync(process.cwd() + target,)) {
mkdirSync(process.cwd() + target,);
}

for (const file of readdirSync(process.cwd() + '/../assets', 'utf8',)) {
if (! existsSync(process.cwd() + target,)) {
mkdirSync(process.cwd() + target,);
}
if (existsSync(process.cwd() + target + '/' + file,)) {
rmSync(process.cwd() + target + '/' + file,);
}
writeFileSync(
process.cwd() + target + '/' + file,
readFileSync(process.cwd() + '/../assets/' + file, 'binary',),
'binary',
);
}
1 change: 0 additions & 1 deletion mindmap/assets/favicon.svg

This file was deleted.

Loading

0 comments on commit aa3e318

Please sign in to comment.