UNPKG

ap-ssg

Version:

A fast, modular, SEO-optimized static site generator that minifies CSS, JS, and HTML for improved performance. It also supports JSON-LD, sitemap generation, and more, making it ideal for production-ready websites.

35 lines (28 loc) 922 B
#!/usr/bin/env node const folderSetup = require("../lib/utils/folderSetup"); const generateConfig = require("../lib/utils/generateConfig"); switch (process.argv[2]) { case "build": const { ssg } = require("../lib"); ssg.generate({ shouldExitAfterBuild: true }); break; case "watch": const { ssg: ssgWatch } = require("../lib"); ssgWatch.watch(); break; case "folder-setup": folderSetup(); break; case "init": generateConfig().then(console.log); break; default: console.log("Unknown command."); console.log(" - use `npx ap-ssg build` to generate build"); // console.log(" - use `npx ap-ssg watch` to watch for changes"); console.log(" - use `npx ap-ssg folder-setup` to setup folder structure"); console.log( " - use `npx ap-ssg init` to initialize the config file and structure" ); break; }