# sponge-rod

> Sponge Rod is a cli tool that change your development work flow.

Latest version **3.10.1** (published 2019-02-13) · MIT license · 0 weekly downloads

## Install

```sh
npm install sponge-rod
pnpm add sponge-rod
yarn add sponge-rod
bun add sponge-rod
```

Provides the command `sponge`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 3.10.1 |
| Published | 2019-02-13 |
| First published | 2018-07-16 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 23 |
| Unpacked size | 46.2 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| Author | rodrigogalura3rd@gmail.com |
| Maintainers | rodz3rdy |
| Keywords | minimization, optimization, gulp, plugin, javascript |

## Links

- npm: https://www.npmjs.com/package/sponge-rod
- Repository: https://github.com/rodrigoiii/sponge
- Homepage: https://github.com/rodrigoiii/sponge#readme
- Issues: https://github.com/rodrigoiii/sponge/issues
- npm.io page: https://npm.io/package/sponge-rod

## Dependencies (23)

- [del](https://npm.io/package/del.md) ^2.2.2
- [gulp](https://npm.io/package/gulp.md) ^3.9.1
- [lodash](https://npm.io/package/lodash.md) ^4.17.11
- [gulp-if](https://npm.io/package/gulp-if.md) ^2.0.2
- [fs-extra](https://npm.io/package/fs-extra.md) ^5.0.0
- [commander](https://npm.io/package/commander.md) ^2.14.1
- [gulp-sass](https://npm.io/package/gulp-sass.md) ^3.1.0
- [gulp-cache](https://npm.io/package/gulp-cache.md) ^0.4.6
- [underscore](https://npm.io/package/underscore.md) ^1.9.1
- [gulp-uglify](https://npm.io/package/gulp-uglify.md) ^2.1.2
- [gulp-useref](https://npm.io/package/gulp-useref.md) 3.1.5
- [event-stream](https://npm.io/package/event-stream.md) 3.3.4
- [gulp-csscomb](https://npm.io/package/gulp-csscomb.md) ^3.0.8
- [gulp-cssnano](https://npm.io/package/gulp-cssnano.md) ^2.1.2
- [gulp-flatten](https://npm.io/package/gulp-flatten.md) ^0.3.1
- [gulp-plumber](https://npm.io/package/gulp-plumber.md) ^1.1.0
- [run-sequence](https://npm.io/package/run-sequence.md) ^1.2.2
- [gulp-imagemin](https://npm.io/package/gulp-imagemin.md) ^4.1.0
- [node-notifier](https://npm.io/package/node-notifier.md) ^5.3.0
- [webpack-stream](https://npm.io/package/webpack-stream.md) ^4.0.2
- [gulp-autoprefixer](https://npm.io/package/gulp-autoprefixer.md) ^3.1.1
- [gulp-load-plugins](https://npm.io/package/gulp-load-plugins.md) ^1.5.0
- [gulp-merge-media-queries](https://npm.io/package/gulp-merge-media-queries.md) ^0.2.1

## Recent versions

- 3.10.1 (latest) — 2019-02-13
- 3.9.2 — 2019-02-11
- 3.9.1 — 2018-12-07
- 3.9.0 — 2018-12-07
- 3.8.0 — 2018-07-26
- 3.7.2 — 2018-07-18
- 3.7.1 — 2018-07-18
- 3.7.0-dev — 2018-07-18
- 3.6.0 — 2018-07-16

## README

# Sponge Rod

## What is Sponge Rod?

Sponge Rod is a cli tool that build your assets css, js and images.

## Installation
 - Use `npm install --save-dev sponge` command in your terminal to install the dependency.
 - Also `gulp-cli` must be installed in your computer. To do that, use `npm install -g gulp-cli`.

## Commands
 - `node node_modules/.bin/sponge [-h|--help]` - Show command list.
 - `node node_modules/.bin/sponge init` - Create file sponge.config.js.
 - `node node_modules/.bin/sponge sass` - Compile the css file.
 - `node node_modules/.bin/sponge sass:watch` - Compile the css file on every changes of sass file.
 - `node node_modules/.bin/sponge scripts` - Compile the js file.
 - `node node_modules/.bin/sponge scripts:watch` - Compile the js file on every changes of source js file.
 - `node node_modules/.bin/sponge build:views` - Apply gulp-useref plugin and minify css and js files.
 - `node node_modules/.bin/sponge build:images` - Optimize the file size of image and move the output file in 'build_images destination' provided of config file.
 - `node node_modules/.bin/sponge build:fonts` - Just move the fonts in `build_fonts destination` provided of config file.

 - `node node_modules/.bin/sponge watch` - Run commands `node node_modules/.bin/sponge sass:watch` and `node node_modules/.bin/sponge scripts:watch`.
 - `node node_modules/.bin/sponge delete:dist` - Remove dist folder.
 - `node node_modules/.bin/sponge build:dist` - Run commands `node node_modules/.bin/sponge delete:dist`, `node node_modules/.bin/sponge sass`, `node node_modules/.bin/sponge scripts`, `node node_modules/.bin/sponge build:views`, `node node_modules/.bin/sponge build:images` and `node node_modules/.bin/sponge build:fonts`.

## Suggestion

I suggest to install `npx` node package in your local machine to execute the command simple.

Instead of for example `node node_modules/.bin/sponge watch`, you can achieve that with this very simple command `npx sponge watch`. Pretty cool ha!

## Features

 - Sponge Rod used `autoprefixer`, `csscomb` and `merge media query` plugins after compile the sass file into css file.
 - It used webpack comes from `webpack-stream` plugin.
 - It decrease the file size of images without change the quality.

## Sponge Rod configuration schema.

### sass

##### Required
 - `src`[array|string] - Source files to be compiled.
 - `dest`[string] - Output destination.

##### Optional
 - `callback`[function] - This will be trigger after the sass command execute.
 - `options`[json] - The option of `gulp.src` function.
 - `command`[string] - It would override the `sass` command.
 - `watch_command`[string] - It would override the `sass:watch` command.
 - `notify`[boolean] - Show toast message after sass command task completed.

### scripts

##### Required
 - `entries`[json] - Key is to be filename and the source file to be compiled.
 - `dest`[string] - Output destination.

##### Optional
 - `callback`[function] - This will be trigger after the scripts command execute.
 - `options`[json] - The option of `gulp.src` function.
 - `command`[string] - It would override the `scripts` command.
 - `watch_command`[string] - It would override the `scripts:watch` command.
 - `notify`[boolean] - Show toast message after scripts command task completed.

### build_views

##### Required
 - `src`[array|string] - Source files to be compiled.
 - `dest`[string] - Output destination.

##### Optional
 - `callback`[function] - This will be trigger after the build:views command execute.
 - `options`[json] - The option of `gulp.src` function.
 - `command`[string] - It would override the `build:views` command.
 - `notify`[boolean] - Show toast message after build:views command task completed.

### build_images

##### Required
 - `src`[array|string] - Source files to be compiled.
 - `dest`[string] - Output destination.

##### Optional
 - `callback`[function] - This will be trigger after the build:images command execute.
 - `options`[json] - The option of `gulp.src` function.
 - `command`[string] - It would override the `build:images` command.
 - `use_flatten`[boolean] - Make the output files flatten.
 - `notify`[boolean] - Show toast message after build:images command task completed.

### build_fonts

##### Required
 - `src`[array|string] - Source files to be compiled.
 - `dest`[string] - Output destination.

##### Optional
 - `callback`[function] - This will be trigger after the build:fonts command execute.
 - `options`[json] - The option of `gulp.src` function.
 - `command`[string] - It would override the `build:fonts` command.
 - `use_flatten`[boolean] - Make the output files flatten.
 - `notify`[boolean] - Show toast message after build:fonts command task completed.

### build

##### Optional
 - `callback`[function] - To be call after build task completed.
 - `notify`[boolean] - Show toast message after build command task completed.

### unbuild

##### Optional
 - `dir`[string|glob] - Files or directory to be delete.
 - `callback`[function] - To be call after unbuild task completed.
 - `notify`[boolean] - Show toast message after unbuild command task completed.

## Example

Checkout the [example](https://github.com/rodrigoiii/sponge-rod/blob/master/app) and test it in your local machine.

## LICENSE
Sponge Rod is released under the MIT Licence.

---
_Source: https://npm.io/package/sponge-rod · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
