generated from alecodes/base-template
chore: update dev environment
This commit is contained in:
parent
f5e398c933
commit
9246964edb
5 changed files with 84 additions and 26 deletions
8
.idea/runConfigurations/Dev.xml
generated
Normal file
8
.idea/runConfigurations/Dev.xml
generated
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
<component name="ProjectRunConfigurationManager">
|
||||||
|
<configuration default="false" name="Dev" type="CompoundRunConfigurationType">
|
||||||
|
<toRun name="Run compendium" targetId="RsBuildProfile:dev" type="CargoCommandRunConfiguration" />
|
||||||
|
<toRun name="dev-database-pg" type="docker-deploy" />
|
||||||
|
<toRun name="Vite Dev Server" type="js.build_tools.npm" />
|
||||||
|
<method v="2" />
|
||||||
|
</configuration>
|
||||||
|
</component>
|
||||||
16
.idea/runConfigurations/Vite_Dev_Server.xml
generated
Normal file
16
.idea/runConfigurations/Vite_Dev_Server.xml
generated
Normal file
|
|
@ -0,0 +1,16 @@
|
||||||
|
<component name="ProjectRunConfigurationManager">
|
||||||
|
<configuration default="false" name="Vite Dev Server" type="js.build_tools.npm">
|
||||||
|
<package-json value="$PROJECT_DIR$/package.json" />
|
||||||
|
<command value="run" />
|
||||||
|
<scripts>
|
||||||
|
<script value="dev" />
|
||||||
|
</scripts>
|
||||||
|
<node-interpreter value="$USER_HOME$/.bun/bin/bun" />
|
||||||
|
<package-manager value="$USER_HOME$/.bun/bin/bun" />
|
||||||
|
<envs />
|
||||||
|
<EXTENSION ID="com.intellij.lang.javascript.buildTools.npm.rc.StartBrowserRunConfigurationExtension">
|
||||||
|
<browser start="true" url="http://localhost:3000" />
|
||||||
|
</EXTENSION>
|
||||||
|
<method v="2" />
|
||||||
|
</configuration>
|
||||||
|
</component>
|
||||||
36
.idea/runConfigurations/dev_database_pg.xml
generated
Normal file
36
.idea/runConfigurations/dev_database_pg.xml
generated
Normal file
|
|
@ -0,0 +1,36 @@
|
||||||
|
<component name="ProjectRunConfigurationManager">
|
||||||
|
<configuration default="false" name="dev-database-pg" type="docker-deploy" factoryName="docker-image" activateToolWindowBeforeRun="false" server-name="Podman">
|
||||||
|
<deployment type="docker-image">
|
||||||
|
<settings>
|
||||||
|
<option name="imageTag" value="docker.io/library/postgres:latest" />
|
||||||
|
<option name="containerName" value="dev-database-pg" />
|
||||||
|
<option name="envVars">
|
||||||
|
<list>
|
||||||
|
<DockerEnvVarImpl>
|
||||||
|
<option name="name" value="POSTGRES_PASSWORD" />
|
||||||
|
<option name="value" value="password" />
|
||||||
|
</DockerEnvVarImpl>
|
||||||
|
</list>
|
||||||
|
</option>
|
||||||
|
<option name="portBindings">
|
||||||
|
<list>
|
||||||
|
<DockerPortBindingImpl>
|
||||||
|
<option name="containerPort" value="5432" />
|
||||||
|
<option name="hostPort" value="5432" />
|
||||||
|
</DockerPortBindingImpl>
|
||||||
|
</list>
|
||||||
|
</option>
|
||||||
|
<option name="showCommandPreview" value="true" />
|
||||||
|
<option name="volumeBindings">
|
||||||
|
<list>
|
||||||
|
<DockerVolumeBindingImpl>
|
||||||
|
<option name="containerPath" value="/var/lib/postgresql/data" />
|
||||||
|
<option name="hostPath" value="dev-database-pg-data" />
|
||||||
|
</DockerVolumeBindingImpl>
|
||||||
|
</list>
|
||||||
|
</option>
|
||||||
|
</settings>
|
||||||
|
</deployment>
|
||||||
|
<method v="2" />
|
||||||
|
</configuration>
|
||||||
|
</component>
|
||||||
43
package.json
43
package.json
|
|
@ -1,22 +1,25 @@
|
||||||
{
|
{
|
||||||
"name": "compendium",
|
"name": "compendium",
|
||||||
"module": "index.ts",
|
"module": "index.ts",
|
||||||
"version": "0.1.0",
|
"version": "0.1.0",
|
||||||
"devDependencies": {
|
"scripts": {
|
||||||
"@alecodes/tmpl-build-and-load": "^0.1.3",
|
"dev": "vite"
|
||||||
"@biomejs/biome": "1.9.4",
|
},
|
||||||
"@types/bun": "^1.2.10",
|
"devDependencies": {
|
||||||
"sass-embedded": "^1.86.3",
|
"@alecodes/tmpl-build-and-load": "^0.1.3",
|
||||||
"vite": "^6.3.1"
|
"@biomejs/biome": "1.9.4",
|
||||||
},
|
"@types/bun": "^1.2.10",
|
||||||
"peerDependencies": {
|
"sass-embedded": "^1.86.3",
|
||||||
"typescript": "^5.7.3"
|
"vite": "^6.3.1"
|
||||||
},
|
},
|
||||||
"type": "module",
|
"peerDependencies": {
|
||||||
"dependencies": {
|
"typescript": "^5.7.3"
|
||||||
"@mini-strap/core": "^0.1.2",
|
},
|
||||||
"@picocss/pico": "^2.1.1",
|
"type": "module",
|
||||||
"feather-icons": "^4.29.2",
|
"dependencies": {
|
||||||
"htmx.org": "2.0.4"
|
"@mini-strap/core": "^0.1.2",
|
||||||
}
|
"@picocss/pico": "^2.1.1",
|
||||||
|
"feather-icons": "^4.29.2",
|
||||||
|
"htmx.org": "2.0.4"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ use axum::response::Html;
|
||||||
use minijinja::{path_loader, Environment};
|
use minijinja::{path_loader, Environment};
|
||||||
use minijinja_autoreload::AutoReloader;
|
use minijinja_autoreload::AutoReloader;
|
||||||
use serde::Serialize;
|
use serde::Serialize;
|
||||||
use vite_rs::{ViteFile, ViteProcess};
|
use vite_rs::ViteFile;
|
||||||
|
|
||||||
#[derive(vite_rs::Embed)]
|
#[derive(vite_rs::Embed)]
|
||||||
#[root = "."]
|
#[root = "."]
|
||||||
|
|
@ -15,7 +15,6 @@ struct Static;
|
||||||
|
|
||||||
pub struct Assets {
|
pub struct Assets {
|
||||||
templates: Environment<'static>,
|
templates: Environment<'static>,
|
||||||
_guard: Option<ViteProcess>,
|
|
||||||
_reloader: Option<AutoReloader>,
|
_reloader: Option<AutoReloader>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -23,7 +22,6 @@ impl Clone for Assets {
|
||||||
fn clone(&self) -> Self {
|
fn clone(&self) -> Self {
|
||||||
Self {
|
Self {
|
||||||
templates: self.templates.clone(),
|
templates: self.templates.clone(),
|
||||||
_guard: None,
|
|
||||||
_reloader: None,
|
_reloader: None,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -34,13 +32,11 @@ impl Assets {
|
||||||
let mut templates = Environment::new();
|
let mut templates = Environment::new();
|
||||||
load_functions(&mut templates);
|
load_functions(&mut templates);
|
||||||
templates.set_loader(minijinja::path_loader("frontend/templates"));
|
templates.set_loader(minijinja::path_loader("frontend/templates"));
|
||||||
let mut _guard = None;
|
|
||||||
let mut _reloader = None;
|
let mut _reloader = None;
|
||||||
|
|
||||||
// Load in dev mode
|
// Load in dev mode
|
||||||
#[cfg(debug_assertions)]
|
#[cfg(debug_assertions)]
|
||||||
{
|
{
|
||||||
_guard = Static::start_dev_server(true);
|
|
||||||
_reloader = Some(AutoReloader::new(|notifier| {
|
_reloader = Some(AutoReloader::new(|notifier| {
|
||||||
let template_path = "frontend/templates";
|
let template_path = "frontend/templates";
|
||||||
let mut env = Environment::new();
|
let mut env = Environment::new();
|
||||||
|
|
@ -60,7 +56,6 @@ impl Assets {
|
||||||
|
|
||||||
Self {
|
Self {
|
||||||
templates,
|
templates,
|
||||||
_guard,
|
|
||||||
_reloader,
|
_reloader,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue