UNPKG

@quasarbright/projection

Version:

A static site generator that creates a beautiful, interactive gallery to showcase your coding projects. Features search, filtering, tags, responsive design, and an admin UI.

67 lines (61 loc) 2.06 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.build = build; const build_helper_1 = require("../utils/build-helper"); const logger_1 = require("../utils/logger"); /** * Display help for the build command */ function showBuildHelp() { console.log(` Projection Build - Generate Static Site USAGE: projection build [options] DESCRIPTION: Generates the static portfolio site from your project data. Creates HTML, CSS, and JavaScript files in the output directory. OPTIONS: --config <path> Path to custom config file --output <path> Custom output directory (default: dist) --clean Clean output directory before build --help Show this help message EXAMPLES: projection build # Build with defaults projection build --output public # Custom output directory projection build --config my-config.json # Custom config file projection build --clean # Clean before building OUTPUT: The generated site will be in the dist/ directory (or custom --output path). This directory can be deployed to any static hosting service. `); } /** * Build command - generates the static site from project data */ async function build(options = {}) { if (options.help) { showBuildHelp(); return; } try { // Use shared build helper const result = await build_helper_1.BuildHelper.runBuild({ cwd: process.cwd(), configPath: options.config, outputDir: options.output, clean: options.clean }); // Display success message logger_1.Logger.info('Next steps:'); logger_1.Logger.list([ `Run 'projection admin' to manage your projects and see a live preview`, `Run 'projection dev' to start development server` ]); logger_1.Logger.newline(); } catch (error) { // Error already logged by BuildHelper process.exit(1); } } //# sourceMappingURL=build.js.map