Skip to content

Commit

Permalink
Update root package (#176)
Browse files Browse the repository at this point in the history
* Update root package

* Remove traillingComma

* Update package

* prettify all
  • Loading branch information
willybrauner authored Feb 7, 2024
1 parent 291f4f6 commit b662f82
Show file tree
Hide file tree
Showing 42 changed files with 639 additions and 378 deletions.
2 changes: 1 addition & 1 deletion apps/front/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ return new Promise((resolve) => {
// duplicate route with lang if the router is configured on this way
"/fr",
"/fr/work",
"/fr/work/first-work",
"/fr/work/first-work"
])
})
```
Expand Down
2 changes: 1 addition & 1 deletion apps/front/config/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,5 @@ export default {
// Build htaccess
htaccessTemplateFilePath: resolve(
"config/tasks/build-htaccess/templates/.htaccess.template"
),
)
}
12 changes: 6 additions & 6 deletions apps/front/config/tasks/build-htaccess/build-htaccess.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const _createHtpasswdFile = async ({ outputPath, user, password }) => {
log("create htpasswd file", {
outputPath,
user,
password,
password
})

if (!outputPath || !user || !password) {
Expand Down Expand Up @@ -74,7 +74,7 @@ const _htpasswdLinkInHtaccess = async ({ newHtaccessFilePath, serverWebRootPath
AuthType Basic
AuthName "Restricted Area"
Require valid-user
`,
`
]
.join("\n")
.replace(/ +/g, "")
Expand All @@ -90,14 +90,14 @@ const _htpasswdLinkInHtaccess = async ({ newHtaccessFilePath, serverWebRootPath
*/
const _rewriteHttpToHttpsInHtaccess = async (newHtaccessFilePath) => {
debug("rewrite http to https in htaccess", {
newHtaccessFilePath,
newHtaccessFilePath
})

const template = [
`# Force http to https
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R,L]
`,
`
]
.join("\n")
.replace(/ +/g, "")
Expand All @@ -115,12 +115,12 @@ export default async ({
user,
password,
outputPath,
htaccessTemplatePath,
htaccessTemplatePath
}) => {
// create htaccess file and get returned newHtaccessFilePath
const newHtaccessFilePath = await _createHtaccessFile({
outputPath,
htaccessTemplatePath,
htaccessTemplatePath
})

if (!newHtaccessFilePath) return
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export const viteChersiteCustomLogger = ({
protocol,
host,
port,
base,
base
}: {
protocol: "http" | "https"
host: string
Expand Down
4 changes: 2 additions & 2 deletions apps/front/config/vite-plugins/vite-plugin-build-dotenv.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import buildDotenv from "../tasks/build-dotenv/build-dotenv"
export default function buildDotenvPlugin({
envVars = process.env,
dotenvOutDir,
additionalVarKeys,
additionalVarKeys
}: {
envVars: { [x: string]: any }
dotenvOutDir: string[]
Expand All @@ -14,6 +14,6 @@ export default function buildDotenvPlugin({
name: "vite-plugin-dotenv",
buildStart: async () => {
await buildDotenv({ envVars, dotenvOutDir, additionalVarKeys })
},
}
}
}
6 changes: 3 additions & 3 deletions apps/front/config/vite-plugins/vite-plugin-build-htaccess.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export default function buildHtaccessPlugin({
serverWebRootPath,
htaccessTemplatePath,
outputPath,
enable,
enable
}: {
user: string | undefined
password: string | undefined
Expand All @@ -29,8 +29,8 @@ export default function buildHtaccessPlugin({
serverWebRootPath,
password,
htaccessTemplatePath,
outputPath,
outputPath
})
},
}
}
}
2 changes: 1 addition & 1 deletion apps/front/config/vite-plugins/vite-plugin-html.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ export default function htmlPlugin(env) {
name: "html-transform",
transformIndexHtml(html) {
return html.replace(/<!-- VITE_APP_URL -->/gm, `${env.VITE_APP_URL}`)
},
}
}
}
2 changes: 1 addition & 1 deletion apps/front/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
Expand Down
Loading

0 comments on commit b662f82

Please sign in to comment.