Rump and its related modules together make a semi-opinionated workflow for assembling client-side assets, leveraging Gulp tasks. Sensible defaults are provided so no configuration is required. Don't like the defaults? Want to change the folder structure? Configurations can be overriden with ease. In some instances you can just rewrite options as you want with JS. Gulp tasks are provided out of the box to easily assemble assets with one task, or you can use the given tasks and integrate/create your own workflow instead.
If you are not interested in reading and just want to explore, check out the examples repository for some boilerplate examples.
You can easily start by creating a
gulpfile.js file with the following:
This will load all other Rump modules defined in
package.json and add tasks
to Gulp. If you want to overwrite some configurations:
If you don't want to load all modules and prefer loading your own manually:
// Load modules first before calling addGulpTasks
For Rump and modules
<1.0.0, it is strongly recommended to use the same minor
version. (if using Rump
0.3.1, the the modules can be
0.5.1) In addition, make sure to make use of
to have Rump be in sync when modules make use of it.
Load all Rump modules (modules whose names start with
rump-) that are defined
package.json. If the module is not available (such as a module in
devDependencies that was not installed because of
npm install --production)
then no error is raised and is skipped.
Add all tasks from Rump modules to Gulp. If you load other Rump modules after
calling this, you need to call this again. Read the documentation for each Rump
module to see which tasks are defined. For information on source and
Add prefix on Gulp task names. For example, if you set the prefix to
then the task names will become
The following tasks are included:
buildwill build all assets once from source to destination. Rump modules will add to this task. (scripts, styles, etc.)
build:prodis the same as
'production'for a production build.
watchwill build all assets once from source to destination, then monitor for changes and update destination as needed. Rump modules will add to this task. (scripts, styles, etc.)
watch:setupis used to set up for tasks that build continuously, such as
test:watch. This is typically used internally and has no effect by itself.
watch:prodis the same as
'production'for a production build.
cleanwill clean the contents of destination. If used the destination should be considered volatile since files on source may be removed.
clean:safewill clean the contents of destination with respect to
options.clean. This is invoked when running the build or watch task. If used the destination should be considered volatile since files on source may be removed.
infowill display information on this and other Rump modules in a readable format. Rump modules will add to this task (scripts, styles, etc.)
info:prodis the same as
'production'for a production build information.
info:corewill display information on the core module, including the current environment set.
lintwill run code through linters once. Rump modules will add to this task. (scripts, etc.)
lint:watchwill run code through linters continuously. Rump modules will add to this task. (scripts, etc.)
testwill run all tests once. Rump modules will add to this task. (scripts, etc.)
test:watchwill run tests continuously, useful for things like TDD. Rump modules will add to this task. (scripts, etc.)
Redefine options for Rump and Rump modules to follow. Read the documentation of each Rump module to see what options are available.
This is the same as
rump.configure() above. The only difference is this
preserves configurations from a previous
and overrides anything that is specified in
The following options for
reconfigure are available alongside
This will automatically clean the destination folder when a build or watch is
to be done. If set to
false then no clean is automatically done.
This is used by Rump modules to distinguish what kind of build to make. Currently only two values are supported: (using another value is NOT recommended)
developmenttypically does not optimize items and includes useful items such as source maps and more. This is likely something you do not want to be using in production.
productionfocuses on minifications and optimizations for production level builds.
This is the base directory where source code and items are housed for asset
builds. Rump modules will typically reference files/directories relative to
this path for builds. You can specify an absolute path, use the current
'') or other relative paths. (
This is the base directory where assets will be built to. Rump modules will
typically reference files/directories relative to this path for builds. You can
specify an absolute path or other relative paths. (
should be considered a volatile directory as it is subject to cleaning on
rebuilds, so make sure you understand which directory you declare.
These are globs that are to be applied to all Rump modules as an array of
strings. This is useful if you want to ignore certain files or directories. For
example, to ignore files in a directory named
['!**/prototype/**/*'] Use this carefully as too many items will slow down
This will contain references to configurations that are generated either by
default or from
rump.configure. Read the documentation for each Rump module
to see additional items added to this object. The following options are
This contains options with defaults or what has been changed through
rump.reconfigure(). This is used by other Rump modules
and typically does not need to be modified. (except by Rump modules) If you
want to modify just use