mirror of
https://github.com/aliasvault/aliasvault.git
synced 2026-04-08 00:27:44 -04:00
Add separate build file for password-generator (#900)
This commit is contained in:
committed by
Leendert de Borst
parent
6ab20501e9
commit
62224c86cd
@@ -5,5 +5,5 @@ This folder contains the output of the shared `password-generator` module from t
|
||||
**Do not edit any of these files manually.**
|
||||
|
||||
To make changes:
|
||||
1. Update the source files in `packages/password-generator/src`
|
||||
2. Run the `build-and-distribute.sh` script at the root of the project to regenerate the outputs and copy them here.
|
||||
1. Update the source files in the `/shared/password-generator/src` directory
|
||||
2. Run the `build.sh` script in the module directory to regenerate the outputs and copy them here.
|
||||
|
||||
@@ -5,5 +5,5 @@ This folder contains the output of the shared `password-generator` module from t
|
||||
**Do not edit any of these files manually.**
|
||||
|
||||
To make changes:
|
||||
1. Update the source files in `packages/password-generator/src`
|
||||
2. Run the `build-and-distribute.sh` script at the root of the project to regenerate the outputs and copy them here.
|
||||
1. Update the source files in the `/shared/password-generator/src` directory
|
||||
2. Run the `build.sh` script in the module directory to regenerate the outputs and copy them here.
|
||||
|
||||
@@ -5,5 +5,5 @@ This folder contains the output of the shared `password-generator` module from t
|
||||
**Do not edit any of these files manually.**
|
||||
|
||||
To make changes:
|
||||
1. Update the source files in `packages/password-generator/src`
|
||||
2. Run the `build-and-distribute.sh` script at the root of the project to regenerate the outputs and copy them here.
|
||||
1. Update the source files in the `/shared/password-generator/src` directory
|
||||
2. Run the `build.sh` script in the module directory to regenerate the outputs and copy them here.
|
||||
|
||||
46
shared/password-generator/build.sh
Executable file
46
shared/password-generator/build.sh
Executable file
@@ -0,0 +1,46 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e # Stop on error
|
||||
set -u # Treat unset variables as errors
|
||||
|
||||
# Define output targets for password-generator
|
||||
TARGETS=(
|
||||
"../../apps/browser-extension/src/utils/shared/password-generator"
|
||||
"../../apps/mobile-app/utils/shared/password-generator"
|
||||
"../../apps/server/AliasVault.Client/wwwroot/js/shared/password-generator"
|
||||
)
|
||||
|
||||
# Build and distribute password-generator
|
||||
package_name="password-generator"
|
||||
package_path="."
|
||||
|
||||
echo "📦 Building $package_name..."
|
||||
npm install && npm run lint && npm run test && npm run build
|
||||
|
||||
dist_path="dist"
|
||||
files_to_copy=("index.js" "index.mjs" "index.d.ts" "index.js.map" "index.mjs" "index.mjs.map")
|
||||
|
||||
for target in "${TARGETS[@]}"; do
|
||||
echo "📂 Copying $package_name → $target"
|
||||
mkdir -p "$target"
|
||||
|
||||
# Copy specific build outputs
|
||||
for file in "${files_to_copy[@]}"; do
|
||||
cp "$dist_path/$file" "$target/"
|
||||
done
|
||||
|
||||
# Write README
|
||||
cat > "$target/README.md" <<EOF
|
||||
# ⚠️ Auto-Generated Files
|
||||
|
||||
This folder contains the output of the shared \`$package_name\` module from the \`/shared\` directory in the AliasVault project.
|
||||
|
||||
**Do not edit any of these files manually.**
|
||||
|
||||
To make changes:
|
||||
1. Update the source files in the \`/shared/password-generator/src\` directory
|
||||
2. Run the \`build.sh\` script in the module directory to regenerate the outputs and copy them here.
|
||||
EOF
|
||||
done
|
||||
|
||||
echo "✅ Password generator build and copy completed."
|
||||
Reference in New Issue
Block a user