
Product
Rust Support Now in Beta
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.
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
Simply install the cli
npm install -g pacmod
And you can get started!
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)
Assuming your project is organized in package-module structure you can get started by simply running
pacmod
In the project directory. pacmod will look for a packages
folder and compile all packages present. You should always define a main entry point that will be invoked once the file is loaded (defaults to the main.js package)
pacmod will also copy files in the public folder of your project to the dist folder. Once complete, pacmod will open your projects dev environment in your default browser. pacmod will continue watching your files for changes and reloading them in the browser.
To configure pacmod, create a pacmod.json file in your project directory. The following configuration options are available:
temp_folder
Default: '_build'
The directory to use for temporary build files. You should have this directory in your project's .gitignore
package_name
Default: Package.json.name
('pacmod'
if not available)
The name of your module and the subsequent file to be built
build_target
Default: 'dist'
The folder to to build the application to
script_path
Default: ''
The folder relative to the BUILD_TARGET
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.
port
Default: 4000
The port to serve development files from.
test_port
Default: 4001
The port to serve test files from
pacmod has QUnit support built in! You can write all of your tests in the /tests
folder of the respective package. To run your tests, run
pacmod test
from your project directory. Your tests will be built and a window will open in your default browser to run the tests. You can even run pacmod
and pacmod test
simultaneously while developing.
FAQs
A package module development environment tool
The npm package pacmod-cli receives a total of 3 weekly downloads. As such, pacmod-cli popularity was classified as not popular.
We found that pacmod-cli demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.
Product
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
Security News
Socket CEO Feross Aboukhadijeh joins Risky Business Weekly to unpack recent npm phishing attacks, their limited impact, and the risks if attackers get smarter.