Registry / devops / dumber

dumber

JSON →
library3.1.3jsnpmunverified

Dumber is a JavaScript bundler specifically designed for Single Page Applications (SPAs), prioritizing simplicity and ease of use. Currently at version 3.1.3, it is actively maintained with a focus on integrating seamlessly into existing build workflows, primarily through its companion Gulp plugin, `gulp-dumber`. Dumber's release cadence follows a semantic versioning approach, with minor and patch releases addressing new features, bug fixes, and performance improvements, while major versions may introduce breaking changes to its core API or configuration. It differentiates itself by being primarily consumed as a build tool integration rather than a standalone CLI or direct programmatic API, providing a streamlined experience for Gulp users. The project encourages using a generator (`npx makes dumberjs`) to scaffold new projects with Dumber pre-configured, highlighting its integration-first philosophy for modern web development.

npm install dumber
INSTALL
IMPORT
SIG · DUMBER
D
dumber
devopsjavascriptv3.1.3
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.

dumber (Gulp plugin)
import dumber from 'gulp-dumber';
import { dumber } from 'dumber';
This is the primary method of interacting with Dumber. `gulp-dumber` exports a default function that acts as a Gulp plugin factory, taking Dumber's configuration.
dumber (Gulp plugin, CommonJS)
const dumber = require('gulp-dumber');
const { dumber } = require('dumber');
CommonJS import for the `gulp-dumber` plugin, which is the recommended way to use Dumber in a `gulpfile.js`.
dumber (core programmatic API)
import { dumber } from 'dumber';
import dumber from 'dumber';
While discouraged for direct use by end-users, the core `dumber` package exports a named `dumber` function that serves as its programmatic API. This is primarily consumed by wrapper plugins like `gulp-dumber` for advanced or custom bundling scenarios. It expects a configuration object and returns a bundler instance.

This quickstart demonstrates how to set up a `gulpfile.js` to build a JavaScript SPA using `gulp-dumber`. It configures dumber to create application and vendor bundles, includes basic error handling, and outputs to a specified directory.

const gulp = require('gulp'); const dumber = require('gulp-dumber'); const plumber = require('gulp-plumber'); const path = require('path'); // Initialize dumber with configuration const dr = dumber({ // Base folder for source files. All relative paths will be resolved from here. cwd: path.resolve(__dirname, 'src'), // Defines entry points and resulting bundles entryBundle: { 'app.js': ['main.js'], // Main application entry point 'vendor.js': ['../node_modules/lodash/lodash.js', '../node_modules/moment/moment.js'] // Example vendor bundle }, // Output directory for bundled files output: path.resolve(__dirname, 'dist'), // Optional: sourcemap generation sourcemap: 'inline', // Optional: enables HMR/live-reload during development onCache: function(filename) { console.log(`Cached: ${filename}`); } }); function build() { return gulp.src('src/**/*.js') // You can include other file types like .html, .css here .pipe(plumber()) // Basic error handling plugin .pipe(dr()) // Call the dumber Gulp plugin to process files .pipe(gulp.dest('dist')); // Output bundled files } // Define build task for Gulp exports.default = build; exports.build = build;
Debug
Known issues
gotchaThe `dumber` npm package is a low-level core library and is not intended for direct use by application developers. Its primary interface is through `gulp-dumber` or similar build tool integrations.
fix
Instead of attempting to import or configure `dumber` directly, install and use `gulp-dumber` within your Gulp build pipeline. Refer to the `gulp-dumber` documentation for correct usage patterns.
affects: >=1.0.0
breakingMajor version upgrades (e.g., from v2 to v3) for `dumber` may introduce breaking changes in configuration options or the underlying bundling engine. These changes often propagate to `gulp-dumber`.
fix
Always consult the release notes and migration guides for both `dumber` and `gulp-dumber` when upgrading major versions. Carefully review your `gulpfile.js` for deprecated options or required structural changes.
affects: >=3.0.0
gotchaDumber's bundling relies on CommonJS or ESM module syntax. Using global scripts or non-standard module patterns might require manual configuration or lead to bundling issues.
fix
Ensure your application code adheres to standard ES Modules or CommonJS patterns. For legacy scripts, consider using Dumber's configuration options for globals or external libraries, as demonstrated in `gulp-dumber` examples.
affects: >=1.0.0
Errors
Common errors & fixes
TypeError: dumber is not a function
This typically occurs when attempting to `require('dumber')` or `import { dumber } from 'dumber'` and then calling the result as a Gulp plugin directly, which is incorrect. The `dumber` core package doesn't expose a direct Gulp plugin.
fix
Ensure you are importing `gulp-dumber` (e.g., `const dumber = require('gulp-dumber');`) in your `gulpfile.js` and using its default export as the plugin.
Error: Cannot find module 'dumber'
The `dumber` package or `gulp-dumber` is not installed, or the Node.js module resolution path is incorrect.
fix
Verify that both `dumber` and `gulp-dumber` are listed in your `package.json` dependencies and installed (`npm install`). Check your import/require paths to ensure they match the package names exactly.
Bundle output is empty or missing expected files.
Incorrect `entryBundle` configuration, missing `cwd` setting, or source files not being picked up by `gulp.src()` correctly.
fix
Double-check your `dumber` configuration within `gulp-dumber`. Ensure `cwd` is correctly pointing to your source root, `entryBundle` specifies valid entry points relative to `cwd`, and your `gulp.src()` pattern matches your source files.
Upgrade
Version history
3.1.3latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
dumber — npm install dumber · libregistry