first commit
This commit is contained in:
commit
672f0deb6a
18 changed files with 1274 additions and 0 deletions
32
frontend.ts
Normal file
32
frontend.ts
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
import SSSG, { Plugin } from "sssg";
|
||||
import Dev from "sssg/src/plugins/dev";
|
||||
import TSCompiler from "sssg/src/plugins/ts-compiler";
|
||||
import PostCSS from "sssg/src/plugins/postcss"
|
||||
import tailwindcss from "@tailwindcss/postcss"
|
||||
import * as path from "path";
|
||||
|
||||
let isProd = process.argv.at(2) == "prod"
|
||||
|
||||
const sssg = new SSSG({
|
||||
outputFolder: path.join(import.meta.dir, "dist"),
|
||||
inputFolder: path.join(import.meta.dir, "frontend"),
|
||||
});
|
||||
|
||||
const plugins: Plugin[] = [
|
||||
new TSCompiler(isProd),
|
||||
new PostCSS([
|
||||
tailwindcss({
|
||||
base: path.join(import.meta.dir, "frontend"),
|
||||
})
|
||||
]),
|
||||
]
|
||||
|
||||
if(!isProd) {
|
||||
plugins.push(new Dev(sssg, {}, 8080))
|
||||
}
|
||||
|
||||
await sssg.run({
|
||||
plugins,
|
||||
});
|
||||
|
||||
await sssg.build();
|
||||
Loading…
Add table
Add a link
Reference in a new issue