Skip to content

Commit

Permalink
JFRA-00: Fix identation, add ignore.
Browse files Browse the repository at this point in the history
  • Loading branch information
Radapls committed Aug 1, 2024
1 parent 5da44a1 commit c979a7b
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 20 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,6 @@ pnpm-debug.log*

# jetbrains setting folder
.idea/

# vscode folder
.vscode/
31 changes: 29 additions & 2 deletions astro.config.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,31 @@
import { defineConfig } from 'astro/config';

// https://astro.build/config
export default defineConfig({});
const isProd = import.meta.env.PROD;
const isDev = import.meta.env.DEV;
const SERVER_PORT = 8888;
const LOCALHOST_URL = `http://localhost:${SERVER_PORT}/`;
const PROD_URL = 'https://radapls.github.com';

let BASE_URL;
if (isProd)
{
BASE_URL = PROD_URL;
} else if (isDev)
{
BASE_URL = LOCALHOST_URL;
}

/**
* This are the current configurations for the project
* More info: https://astro.build/config
*/
export default defineConfig({
site: BASE_URL,
server: {
port: SERVER_PORT,
host: true
},
prefetch: {
prefetchAll: true
}
});
4 changes: 1 addition & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,8 @@
"type": "module",
"version": "1.0.0",
"scripts": {
"dev": "astro dev",
"start": "astro dev",
"build": "astro check && astro build",
"preview": "astro preview",
"preview": "astro check && astro build && astro preview",
"astro": "astro"
},
"dependencies": {
Expand Down
39 changes: 24 additions & 15 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,26 @@
{
"extends": "astro/tsconfigs/strict",
"compilerOptions": {
"plugins": [
{
"name": "@astrojs/ts-plugin"
},
],
"baseUrl": ".",
"paths": {
"@components/*": ["src/components/*"],
"@sections/*": ["src/sections/*"],
"@layouts/*": ["src/layouts/*"],
"@data/*": ["src/data/*"],
}
}
"extends": "astro/tsconfigs/strict",
"compilerOptions": {
"strictPropertyInitialization": false,
"plugins": [
{
"name": "@astrojs/ts-plugin"
},
],
"baseUrl": ".",
"paths": {
"@components/*": [
"src/components/*"
],
"@sections/*": [
"src/sections/*"
],
"@layouts/*": [
"src/layouts/*"
],
"@data/*": [
"src/data/*"
],
}
}
}

0 comments on commit c979a7b

Please sign in to comment.