Compare commits
No commits in common. "main" and "v0.1.0" have entirely different histories.
4 changed files with 8 additions and 26 deletions
20
CHANGELOG.md
20
CHANGELOG.md
|
|
@ -2,26 +2,6 @@
|
||||||
All notable changes to this project will be documented in this file. See [conventional commits](https://www.conventionalcommits.org/) for commit guidelines.
|
All notable changes to this project will be documented in this file. See [conventional commits](https://www.conventionalcommits.org/) for commit guidelines.
|
||||||
|
|
||||||
- - -
|
- - -
|
||||||
## v0.1.3 - 2025-04-14
|
|
||||||
#### Bug Fixes
|
|
||||||
- use raw string to prevent quote issues - (a1b480f) - aleidk
|
|
||||||
#### Documentation
|
|
||||||
- fix example - (f6077d4) - aleidk
|
|
||||||
|
|
||||||
- - -
|
|
||||||
|
|
||||||
## v0.1.2 - 2025-04-11
|
|
||||||
#### Bug Fixes
|
|
||||||
- add shebang to entrypoint - (b4a5514) - aleidk
|
|
||||||
|
|
||||||
- - -
|
|
||||||
|
|
||||||
## v0.1.1 - 2025-04-11
|
|
||||||
#### Bug Fixes
|
|
||||||
- remove unecesary dependency - (cf7bf3f) - aleidk
|
|
||||||
|
|
||||||
- - -
|
|
||||||
|
|
||||||
## v0.1.0 - 2025-04-11
|
## v0.1.0 - 2025-04-11
|
||||||
#### Features
|
#### Features
|
||||||
- first release - (154eca7) - aleidk
|
- first release - (154eca7) - aleidk
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@ fn main() {
|
||||||
let output = Command::new("bun")
|
let output = Command::new("bun")
|
||||||
.args([
|
.args([
|
||||||
"run",
|
"run",
|
||||||
"tmpl-build-and-load",
|
"scripts/build.ts",
|
||||||
"--outdir",
|
"--outdir",
|
||||||
out_dir.as_str(),
|
out_dir.as_str(),
|
||||||
"--globs",
|
"--globs",
|
||||||
|
|
|
||||||
9
index.ts
9
index.ts
|
|
@ -1,5 +1,3 @@
|
||||||
#!/usr/bin/env bun
|
|
||||||
|
|
||||||
import sassPlugin from "@alecodes/bun-plugin-sass";
|
import sassPlugin from "@alecodes/bun-plugin-sass";
|
||||||
import { parseArgs } from "node:util";
|
import { parseArgs } from "node:util";
|
||||||
import path from "node:path";
|
import path from "node:path";
|
||||||
|
|
@ -56,9 +54,11 @@ out += "|env: &mut minijinja::Environment| {\n";
|
||||||
|
|
||||||
for (const res of result.outputs) {
|
for (const res of result.outputs) {
|
||||||
// Can be consumed as blobs
|
// Can be consumed as blobs
|
||||||
const asset_text = await res.text();
|
let asset_text = await res.text();
|
||||||
|
asset_text = asset_text.replaceAll(/\n/g, "\\n");
|
||||||
|
asset_text = asset_text.replaceAll(/"/g, `\\"`);
|
||||||
const asset_path = path.normalize(res.path);
|
const asset_path = path.normalize(res.path);
|
||||||
out += `env.add_template("${asset_path}", r##"${asset_text}"##).expect("Embedded an invalid template");\n`;
|
out += `env.add_template("${asset_path}", "${asset_text}").expect("Embedded an invalid template");\n`;
|
||||||
}
|
}
|
||||||
|
|
||||||
out += "}";
|
out += "}";
|
||||||
|
|
@ -69,3 +69,4 @@ Bun.write(
|
||||||
);
|
);
|
||||||
|
|
||||||
console.log("Assets compiled!");
|
console.log("Assets compiled!");
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,12 @@
|
||||||
{
|
{
|
||||||
"version": "0.1.3",
|
"version": "0.1.0",
|
||||||
"name": "@alecodes/tmpl-build-and-load",
|
"name": "@alecodes/tmpl-build-and-load",
|
||||||
"module": "index.ts",
|
"module": "index.ts",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"bin": "./index.ts",
|
"bin": "./index.ts",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@alecodes/bun-plugin-sass": "^0.1.3",
|
"@alecodes/bun-plugin-sass": "^0.1.3",
|
||||||
|
"@alecodes/bun-static-builder": "^0.1.0",
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/bun": "latest"
|
"@types/bun": "latest"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue