Registry / devops / skypager-project-bundler

skypager-project-bundler

JSON →
library4.6.1jsnpmunverified

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.

npm install skypager-project-bundler
INSTALL
IMPORT
SIG · SKYPAGER-PROJECT-B
S
skypager-project-bundler
devopsjavascriptv4.6.1
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

ProjectBundler
import { ProjectBundler } from 'skypager-project-bundler'
import ProjectBundler from 'skypager-project-bundler'
The primary class is exported as a named export.
Bundler (aliased)
import { ProjectBundler as Bundler } from 'skypager-project-bundler'
Common practice to alias ProjectBundler to Bundler for brevity.
ProjectBundler (CommonJS)
const { ProjectBundler } = require('skypager-project-bundler')
const ProjectBundler = require('skypager-project-bundler')
Even for CJS, it's a named export, so destructuring is necessary.

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.

import { ProjectBundler as Bundler } from 'skypager-project-bundler' // Initialize a standalone ProjectBundler instance. // This example depends on 'skypager-preset-bootstrap-react' being installed. const exampleBundler = Bundler.create({ // Specify a preset and its options. Presets configure webpack loaders, plugins, etc. preset: ['bootstrap-react', { theme: 'dashboard-dark' }], // Define pages for a React Router application, mapping them to routes. // If omitted, the bundler might infer pages from a directory structure. pages: ['about', 'home', 'terms', 'privacy'], // Optional: Specify an output directory for the bundled files output: { path: './dist/my-app' }, // Optional: Configure Webpack directly if needed, merging with preset config webpack: { entry: './src/index.js' } }) // Compile the project and then save the bundled output. exampleBundler .compile() .then(() => { console.log('Project compilation successful. Saving bundle...') return exampleBundler.save() }) .then(() => { console.log('Bundle saved to disk.') }) .catch(error => { console.error('Error during bundling process:', error) })
skypager --version
Debug
Known issues
gotchaThe Project Bundler relies heavily on underlying Webpack configurations and presets. Debugging compilation issues often requires understanding Webpack's intricate loader and plugin system, which can be complex.
fix
Familiarize yourself with Webpack fundamentals, consult the Skypager preset documentation, and leverage Webpack's verbose logging options during compilation.
affects: >=1.0.0
gotchaUsage often requires specific 'skypager-preset-*' packages to be installed as dependencies (or devDependencies). Omitting these or using incorrect preset names will lead to configuration errors.
fix
Ensure the required 'skypager-preset-*' packages are explicitly installed in your project and verify the preset name in the `Bundler.create()` options.
affects: >=1.0.0
gotchaVersion compatibility between the `skypager-project-bundler`, specific `skypager-preset-*` packages, and underlying `webpack` versions can sometimes lead to unexpected build failures. Presets might be designed for specific `webpack` or `bundler` versions.
fix
Always check the documentation for `skypager-preset-*` packages for their compatibility requirements. If issues arise, try aligning major versions of all Skypager-related packages and Webpack.
affects: >=1.0.0
gotchaThe bundler's ORM-like approach to source code implies that direct manual edits to generated bundle files or conflicting changes made outside its API might not be gracefully reconciled, potentially leading to data loss or version control conflicts.
fix
Always interact with the project source code through the Bundler's provided APIs or established Git workflows. Use its mechanisms for re-absorbing changes made externally.
affects: >=1.0.0
Errors
Common errors & fixes
Module not found: Can't resolve 'webpack'
Webpack or a required loader/plugin for a preset is not installed or incorrectly configured in the project's dependencies.
fix
Install `webpack` and any specific `webpack-cli`, loaders (e.g., `babel-loader`), or plugins required by your chosen preset: `npm install --save-dev webpack webpack-cli`
TypeError: ProjectBundler is not a constructor or function
The `ProjectBundler` symbol was incorrectly imported (e.g., as a default import instead of a named import) or `require`d without destructuring.
fix
Use a named import: `import { ProjectBundler } from 'skypager-project-bundler'` or for CommonJS: `const { ProjectBundler } = require('skypager-project-bundler')`
Error: Unknown preset: 'bootstrap-react'
The specified Skypager preset (e.g., 'bootstrap-react') is either not installed or its name is misspelled in the `Bundler.create()` options.
fix
Ensure the corresponding preset package (e.g., `skypager-preset-bootstrap-react`) is installed: `npm install --save-dev skypager-preset-bootstrap-react` and verify the name used in `preset` option.
Cannot read properties of undefined (reading 'create')
This usually indicates that `ProjectBundler` itself was not successfully imported, often due to an incorrect path or a failed module resolution.
fix
Double-check the import statement `import { ProjectBundler } from 'skypager-project-bundler'` and ensure `skypager-project-bundler` is installed correctly in `node_modules`.
Upgrade
Version history
4.6.1latest on npm
Audit
Dependencies
webpackrequiredCore underlying compiler technology; many functionalities wrap webpack modules, loaders, and plugins.
skypager-preset-*optionalCommon usage involves installing specific Skypager presets (e.g., 'skypager-preset-bootstrap-react') to configure the bundler.
Agent activity
3 hits · last 30 days
node
2
Resources