Skip to content

Commit

Permalink
Ensured Jade and HAML are valid extensions.
Browse files Browse the repository at this point in the history
  • Loading branch information
cballou committed Oct 31, 2011
1 parent 4e03517 commit 4bff3cd
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 8 deletions.
36 changes: 32 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Usage

```bash
./watchdog --types styl --watch /var/www/vhosts/clients/ReTargeter/public/css/
./watchdog --types styl,sass,scss,less --watch /var/www/vhosts/clients/ReTargeter/public/css/
./watchdog --types styl,sass,scss,less,jade,haml --watch /var/www/vhosts/clients/ReTargeter/public/css/
./watchdog --config /path/to/config
./watchdog --help
```
Expand All @@ -25,7 +25,7 @@ Example Config File (written in PHP, requires return):
```php
<?php
return array(
'types' => array('sass', 'scss', 'less', 'styl'),
'types' => array('sass', 'scss', 'less', 'styl', 'jade', 'haml'),
'watch' => array(
'/path/to/public/css',
'/path/to/alternate/css'
Expand Down Expand Up @@ -56,12 +56,16 @@ watchdog assumes that you have one or more of the following modules installed
* SASS
* LESS
* Stylus
* Jade
* HAML

Each of these applications have their own set of dependencies.

* SASS - Requires Ruby and RubyGems
* LESS - Requires nodejs and npm
* Stylus - Requires nodejs and npm
* Jade - Requires nodejs and npm
* HAML - Requires Ruby and RubyGems

"sass: command not found"
---------------------
Expand All @@ -83,6 +87,8 @@ ensure you have the LESS npm module installed globally:
sudo npm install -g less
```

We specify the global option because you would otherwise be left with modules installed to your base installation directory.

"stylus: command not found"
---------------------

Expand All @@ -93,11 +99,33 @@ ensure you have the stylus npm module installed globally:
sudo npm install -g stylus
```

Otherwise, you are left with modules installed to your base installation directory.
We specify the global option because you would otherwise be left with modules installed to your base installation directory.

"jade: command not found"
---------------------

If you are receiving the error "jade: command not found", you will need to
ensure you have the Jade npm module installed globally:

```bash
sudo npm install -g jade`
```

"haml: command not found"
---------------------

If you are receiving the error "haml: command not found", you will need to
ensure you have the HAML ruby gem installed:

```bash
sudo gem install haml-edge`
```

We specify the global option because you would otherwise be left with modules installed to your base installation directory.

I'm still getting command not found
---------------------
For Node.JS NPM modules (stylus and less), ensure you have the NODE_PATH variable
For Node.JS NPM modules (stylus, less, and jade), ensure you have the NODE_PATH variable
appropriately set:
```bash
Expand Down
12 changes: 8 additions & 4 deletions inc/cli
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ $validExtensions = array(
'sass' => 1,
'scss' => 1,
'styl' => 1,
'less' => 1
'less' => 1,
'haml' => 1,
'jade' => 1
);

// retrieve options
Expand All @@ -42,7 +44,7 @@ watchdog [options]

Options:

-t\t--types <extension>\t\tSpecify the file extensions to watch, separated by commas with no spaces (supports sass, scss, less, styl).
-t\t--types <extension>\t\tSpecify the file extensions to watch, separated by commas with no spaces (supports sass, scss, less, styl, haml, jade).
-w\t--watch <directories>\t\tSpecify the directories to watch for file changes, separated by commas with no spaces.
-c\t--config <file>\t\t\tSpecify an absolute/relative path to a config file to load options.
-m\t--minify\t\t\tFlag to indicate you wish to minify/compress output.
Expand All @@ -52,7 +54,7 @@ Example Config File (written in PHP, requires return):

<?php
return array(
'types' => array('sass', 'scss', 'less', 'styl'),
'types' => array('sass', 'scss', 'less', 'styl', 'haml', 'jade'),
'watch' => array(
'/path/to/public/css',
'/path/to/alternate/css'
Expand Down Expand Up @@ -127,7 +129,9 @@ if (!empty($config['types'])) {
'sass',
'scss',
'styl',
'less'
'less',
'haml',
'jade'
);
}

Expand Down

0 comments on commit 4bff3cd

Please sign in to comment.