Skip to content

Commit

Permalink
Updated dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
dcrockwell committed Mar 26, 2015
1 parent 7ed6f58 commit 57b8c77
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 20 deletions.
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,17 +38,17 @@ $ npm install tonto --save
**1. Each instance of Tonto is a version-specific apache config _document object_ that you add directives to by calling it's _directive functions_:**

```javascript
var document = new Tonto('2.4');
var tonto = new Tonto('2.4');
```

**2. There are _solo directive functions_ that take a single value argument, and _block directive functions_ which take a _sub-directive setter_ object as the second argument:**

```javascript
document.serverName('somesite.com');
tonto.serverName('somesite.com');
```

```javascript
document.virtualHost('*:80', function (subDirectiveDocument) {
tonto.virtualHost('*:80', function (subDirectiveDocument) {
// Here, you can call any directive function directly on subDirectiveDocument, and it will be added as a sub-directive.
subDirectiveDocument.serverName('somesite.com');
});
Expand All @@ -57,13 +57,13 @@ document.virtualHost('*:80', function (subDirectiveDocument) {
**3. When the _document object_ has all directives added to it, you can render the document to string by calling:**

```javascript
document.render();
tonto.render();
```

**4. All directives are chainable:**

```javascript
var renderedDocument = document
var renderedDocument = tonto
.loadModule('some_module /some/path/to/module.so')
.serverSignature('Off')
.traceEnable('Off')
Expand Down Expand Up @@ -106,7 +106,7 @@ Block directives require a function as the second argument. This function has on
Here is an example of a sub-directive setter defined as a named function:

```javascript
document.virtualHost('*:80', subDirectiveSetter);
tonto.virtualHost('*:80', subDirectiveSetter);

function subDirectiveSetter(subDirectives) {
subDirectives.serverName('somesite.com');
Expand All @@ -126,14 +126,14 @@ This example will render:
If you are using a 3rd party mod that provides custom directives, there is an easy way to extend tonto.js with custom functions for this purpose:

```javascript
document.extend([
tonto.extend([
'CustomDirective',
'<CustomBlock>'
]);

document.customDirective('some value'); // Solo directive
tonto.customDirective('some value'); // Solo directive

document.customBlock('some value', function (subDirectives) {
tonto.customBlock('some value', function (subDirectives) {
// Because CustomBlock is surrounded in < and >, it is processed as a block directive
});
```
16 changes: 5 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,28 +1,21 @@
{
"name": "tonto",
"version": "0.0.0",
"version": "0.0.1",
"author": "FreeAllMedia, LLC <fam-operations@freeallmedia.com>",
"description": "Tonto.js: Apache Config File Generator",
"repository": {
"type": "git",
"url": "https://github.com/FreeAllMedia/tonto"
},
"contributors": [
{
"name": "Dallas John Slieker",
"email": "dslieker@freeallmedia.com"
}
],
"scripts": {
"test": "mocha -w ./tests/*.js -R spec"
},
"main": "./lib/tonto.js",
"dependencies": {
"methodical": "0.0.x",
"is-js": "0.1.x",
"js-yaml": "3.0.x",
"change-case": "1.0.x",
"grunt-complexity": "~0.1.4"
"js-yaml": "3.2.x",
"change-case": "2.0.x"
},
"config": {
"travis-cov": { "threshold": 100 },
Expand All @@ -39,7 +32,8 @@
"grunt": "0.4.x",
"grunt-mocha-cov": "0.2.x",
"grunt-cli": "0.1.x",
"grunt-contrib-jshint": "0.8.x"
"grunt-contrib-jshint": "0.8.x",
"grunt-complexity": "0.3.x"
},
"license": "GPLv3"
}

0 comments on commit 57b8c77

Please sign in to comment.