pacmod - A package module environment
pacmod is a package module environment that can be used to develop browser modules with es6. Using babel and browserify, pacmod will compile your packages into a single distribution file.
Warning: Please note that releases before 1.0.0 may not be backwards compatable
Usage
At the moment, pacmod the pacmod files should be downloaded and put into your project directory. Once complete, run
npm install -g gulp
npm install
You can then use pacmod by running gulp. The main entry point of pacmod defaults to the index.js
file of the main package.
You may also put files in the /public
folder to be included in the /dist directory
Configuration
To configure pacmod, create a pacmod.json file in your project directory. The following configuration options are available:
BUILD_DESTINATION
Default: '_build'
The directory to use for temporary build files. You should have this directory in your project's .gitignore
PACKAGE_NAME
Default: 'pacmod'
The name of your module and the subsequent file to be built
DIST_FOLDER
Default: ''
The folder relative to /dist
that the compiled JS file should be moved to
MAIN_PACKAGE
Default: 'main'
The name of the package that should be used as the main entry point for the application. This file will be invoked on script load.
Package Structure
Packages are defined as self contained components or module packs that are distributed with their own unit tests. Each package should be independant and have no dependencies outside of itself. The package folder structure is
- /package-name
--- /lib
----- /index.js (entry point)
--- /tests
--- /readme.md (optional)