{"library":"skypager-project-bundler","title":"Skypager Project Bundler","description":"The Skypager Project Bundler is a utility that packages entire project folders, including source code, dependency mappings, version control data, component registries, configurations, tests, and documentation, into a single, 'universal-javascript friendly' package. It provides an abstraction over project files, treating them as an active record style ORM, which allows for targeted edits directly to the source code through various interfaces (UI, API, CLI) while maintaining seamless integration with Git version control. Currently stable at version 4.6.1, its release cadence is tied to the broader Skypager ecosystem. A key differentiator is its ability to serve specific 'slices' of a project on demand, minimizing the exposed surface area for editing tasks. It also wraps the Webpack compiler, providing pre-configured presets for common development setups, abstracting away much of the underlying Webpack complexity.","language":"javascript","status":"active","last_verified":"Sun Apr 19","install":{"commands":["npm install skypager-project-bundler"],"cli":{"name":"skypager","version":null}},"imports":["import { ProjectBundler } from 'skypager-project-bundler'","import { ProjectBundler as Bundler } from 'skypager-project-bundler'","const { ProjectBundler } = require('skypager-project-bundler')"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import { ProjectBundler as Bundler } from 'skypager-project-bundler'\n\n// Initialize a standalone ProjectBundler instance.\n// This example depends on 'skypager-preset-bootstrap-react' being installed.\nconst exampleBundler = Bundler.create({\n  // Specify a preset and its options. Presets configure webpack loaders, plugins, etc.\n  preset: ['bootstrap-react', {\n    theme: 'dashboard-dark'\n  }],\n\n  // Define pages for a React Router application, mapping them to routes.\n  // If omitted, the bundler might infer pages from a directory structure.\n  pages: ['about', 'home', 'terms', 'privacy'],\n\n  // Optional: Specify an output directory for the bundled files\n  output: {\n    path: './dist/my-app'\n  },\n\n  // Optional: Configure Webpack directly if needed, merging with preset config\n  webpack: {\n    entry: './src/index.js'\n  }\n})\n\n// Compile the project and then save the bundled output.\nexampleBundler\n  .compile()\n  .then(() => {\n    console.log('Project compilation successful. Saving bundle...')\n    return exampleBundler.save()\n  })\n  .then(() => {\n    console.log('Bundle saved to disk.')\n  })\n  .catch(error => {\n    console.error('Error during bundling process:', error)\n  })\n","lang":"javascript","description":"This quickstart demonstrates standalone usage of the ProjectBundler, showing how to create an instance, apply a preset, define pages, compile the project, and save the resulting bundle to disk.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}