README
Skypager Project Bundler
ProjectBundler
automatically packages project folders and the files in a data structure that contains the source code, the dependency mappings, the version control data, component registry, configuration, tests, documentation and every thing else in a universal-javascript friendly package that can treated as a single file that can be expanded or contracted to expose the right amount of surface area to make the changes you want to the code.
This Bundle is used to power application interfaces that can be used to allow other people or systems to make targeted edits directly to our source code, without separating the source code from the project's version history. Whether this is done through a UI form, an API endpoint, a Command Line Prompt, or by hand in your favorite IDE, the Bundler provides APIs for working with the project and treating it not just as a collection of source code files, but as an active record style ORM that happens to persists its data in source code files, and make its changes through git commits.
This allows for different slices of the project to be served up on demand, providing just the right amount of details for the editing task at hand, and seamless integration with Git version control.
Examples
Standalone Usage
The Project Bundler is just a wrapper around the Webpack compiler, and can be used in a standalone way without the Skypager Project tooling. This provides you with common presets of devDependencies, all powered by the Webpack modules, loaders, and plugins we love, as well as a declarative way to list out all of the pages and files you want to have bundled up and packaged.
import { ProjectBundler as Bundler } from 'skypager-project-bundler'
export const standalone = ProjectBundler.create({
// this depends on the skypager-preset-bootstrap-react
preset: ['bootstrap-react', {
theme: 'dashboard-dark'
}]
// this will create a react router app that uses these pages as routes.
// if you didn't specify this, it would just render every thing matching
// `pages//route`
pages: [ 'about', 'home', 'terms', 'privacy' ]
})
example
.compile()
.then(() => example.save())
Transporting Packages
The Project Bundler can package up all of the necessary files and metadata in a single file that can be emailed or uploaded to a backup server. It can also package up any slice of the files necessary for a particular task, hand them off to be edited somewhere else, and then re-absorbed and re-incorporated into the master development source.