Want to take your software engineering career to the next level? Join the mailing list for career tips & advice Click here


something like a himalountain.

Subscribe to updates I use smoosh

Statistics on smoosh

Number of watchers on Github 350
Number of open issues 11
Average time to close an issue about 1 month
Main language JavaScript
Average time to merge a PR 19 days
Open pull requests 3+
Closed pull requests 0+
Last commit over 7 years ago
Repo Created over 9 years ago
Repo Last Updated over 2 years ago
Size 3.56 MB
Organization / Authorfat
Page Updated
Do you use smoosh? Leave a review!
View open issues (11)
View smoosh activity
View on github
Book a Mock Interview With Me (Silicon Valley Engineering Leader, 100s of interviews conducted)
Software engineers: It's time to get promoted. Starting NOW! Subscribe to my mailing list and I will equip you with tools, tips and actionable advice to grow in your career.
Evaluating smoosh for your project? Score Explanation
Commits Score (?)
Issues & PR Score (?)


How would you smoosh a lion and a tiger? A tialiganer, right?


SMOOSH is a tool for packaging your CSS & JavaScript projects. It will lint your JavaScript with JSHint, then build and minify your files (if you'd like) with UglifyJS for JavaScript, and Sqwish for CSS.

Smoosh is available as an npm package. To install, run the following command:

$ npm install smoosh


Currently, smoosh requires a config.json file to work. Your config file should look something like this (check the examples folder for a working example):

  "VERSION": "0.1", // optional
  "JSHINT_OPTS": { ... }
    "DIST_DIR": "dist", // optional
    "base": [ ... ],
    "secondary": [ ... ]
  "CSS": {
    "core": [ ... ]

Your config options include:

  • VERSION: an optional version number which will be appended to your built files
  • key: the name of your compiled file (ie: 'mootools-core', 'base-bundle', etc.)
  • value: an array of file paths to be bundled (ie. ['./src/drag.js', './src/drop.js'])
  • DIST_DIR: the directory to output your files to (if no directory is specified, 'dist' will be used)
  • JSHINT_OPTS: the options to use if running jshint


once installed with npm, smoosh can be accessed easily from the command line! Just create your config file (shown above), then run commands. Here's a list of some of them:

//any of these commands will execute all smoosh tasks with config.json
$ smoosh ./config.json
$ smoosh make ./config.json
$ smoosh -m ./config.json

//executing either of these commands will destroy the dist folder
$ smoosh clean ./config.json
$ smoosh -d ./config.json

//these will generate ugliyjs minified versions of your packaged source
$ smoosh compressed ./config.json
$ smoosh -c ./config.json

//these will generate full, uncompressed version of your packaged source
$ smoosh uncompressed
$ smoosh -f ./config.json

//executing either of these commands will build both compressed and uncompressed versions of your source
$ smoosh build ./config.json
$ smoosh -b ./config.json

//these will run jshint against your uncompressed source
$ smoosh run ./config.json
$ smoosh -r ./config.json

//the -a flag will run analyze.. you must include a build type for analyze to work
$ smoosh -ca ./config
$ smoosh -ba ./config
$ smoosh -fa ./config

//as you might have guessed, you can specify multiple flags at the same time
$ smoosh -dba ./config //<-- this will clean the dist folder, build new files, and then analyze them


once installed, smoosh is pretty easy to use...

var smoosh = require('smoosh');

Once required there are several methods available to you:


As stated above, smoosh requires that you pass it the path to your configuration json file. To do that, you would do:



The clean method will remove your distribution directory. Warning This will empty your entire DIST directory. So this may be unwanted behavior if your DIST directory is ./. It is preferred that this is only used when you have a dedicated dist folder. Eg: ./src/build or ./dist



Run takes one argument; a string which specifies what to run. Currently run only works with jslint, therefore you can do either:


In the future we may add more useful things here.


Build is used to build your sources together. You can build uncompressed or compressed files or both! You can use it like this:

smoosh.build() // <-- this will build both compressed and uncompressed


Analyze is useful when you're curious if you're making your files larger or smaller. It will return relevant file size for uncompressed, compressed, or gzipped files.

smoosh.analyze('gzipped'); //it gzips the compressed files only
smoosh.analyze(); //which will do analyze all types


Done is used to execute a callback at a certain point in the smoosh command chain. Typically, it is used at the end of the chain when smoosh has completed, but it can also be added between steps.

smoosh.config('smoosh.json').clean().run().build.done(function() {
  console.log('Smoosh is finished!');


Make can currently be used as a shortcut to run all smoosh methods... It requires one argument, the path to the config file.json.


//is the same as

Happy Smooshing!

smoosh open issues Ask a question     (View All Issues)
  • almost 8 years UglifyJS2
  • over 8 years Output dynamic links to css or js the views
  • over 8 years Add homepage/repo to package.json
  • almost 9 years add .reset() or make .config() reset state
  • about 9 years Feature Proposal: Runing Unit Tests
  • about 9 years Add callbacks
  • over 9 years Don't remove the DIST_DIR from options
  • over 9 years UglifyJS
  • over 9 years Append hash to generated file
smoosh open pull requests (View All Pulls)
  • Add homepage to package.json, fixes #18
  • Fix missing ending semicolon in UglifyJS output
  • Added ability to control UglifyJS options
smoosh questions on Stackoverflow (View All Questions)
  • smoosh 4 similar methods into 1 method
  • Any O(n) algorithm for smoosh method?
smoosh list of languages used
Other projects in JavaScript
Powered by Autocode - Instant Webhooks, Scripts and APIs
Autocode logo wordmark