Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

node modules should be created via npm install

  • Loading branch information...
commit 5e2b88195c1e1d430f158bc4a34288eefdec2880 1 parent e9ee8cf
@pascalopitz authored
View
3  node_modules/yaml/.gitmodules
@@ -1,3 +0,0 @@
-[submodule "spec/lib"]
- path = spec/lib
- url = git://github.com/visionmedia/jspec.git
View
47 node_modules/yaml/History.md
@@ -1,47 +0,0 @@
-
-0.2.3 / 2011-12-05
-==================
-
- * Added a "null.yaml" test case in the examples.
- * Added support for NULL values.
- * Fixed a global leak
-
-0.2.2 / 2011-08-31
-==================
-
- * Made it so the first indentation in the input determines the indentation ammount (instead of it being statically set to 2 spaces) [joelverhagen]
-
-0.2.1 / 2011-05-22
-==================
-
- * Fixed boolean support [Adrian Olaru]
-
-0.2.0 / 2011-05-21
-==================
-
- * Added support for dates [Adrian Olaru]
-
-0.1.1 / 2010-12-15
-==================
-
- * Added package.json
- * Added a regex for unquoted strings as values.
- * Fixed example/run.js so that it actually runs!
- * Fixed problem with nested hashes dedenting too much.
-
-0.1.0 / 2010-02-25
-==================
-
- * Added single quote string
- * Added parse error contexts
- * Added support for spaces in hash keys
- * Added basic --- support
- * Added inline hash whitespace tolerance
- * Added spec for invalid inline hash
- * Added inline hash support
- * Fixed syntax error escaping
-
-0.0.1 / 2010-02-25
-==================
-
- * Initial release
View
14 node_modules/yaml/Makefile
@@ -1,14 +0,0 @@
-
-all: test
-
-test:
- @node spec/node.js
-
-examples:
- @node examples/run.js examples/list.yml
- @node examples/run.js examples/list.nested.yml
- @node examples/run.js examples/hash.yml
- @node examples/run.js examples/config.yml
- @node examples/run.js examples/dates.yml
-
-.PHONY: test examples
View
56 node_modules/yaml/Readme.md
@@ -1,56 +0,0 @@
-
-# YAML
-
-CommonJS JavaScript YAML parser, fast and tiny. Although this implementation
-does not currently support the entire YAML specification, feel free to
-fork the project and submit a patch :)
-
-# Usage
-
- require('yaml').eval(string_of_yaml)
-
-# Currently Supports
-
- * Comments
- * Sequences (arrays)
- * Maps (hashes)
- * Inline sequences
- * Inline maps
- * Nesting
- * Primitive scalars (integers, floats, booleans, etc)
- * Extended bools (enabled, disabled, yes, no, on, off, true, false)
-
-## Installation
-
- $ npm install yaml
-
-# Testing
-
-Update git submodules and run:
-
- $ make test
-
-# License
-
-(The MIT License)
-
-Copyright (c) 2009 TJ Holowaychuk <tj@vision-media.ca>
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-'Software'), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
View
7 node_modules/yaml/examples/boolean.yaml
@@ -1,7 +0,0 @@
----
- title: Some Title
- falseme: I can see this
- what: no
- say: yes
- trueme: found
- hope: to see this
View
8 node_modules/yaml/examples/config.yml
@@ -1,8 +0,0 @@
----
- pid: '/home/www/pids/thin.pid'
- wait: 30
- port: 3000
- timeout: 15
- servers: 2
- require: []
- dbg-mode: false
View
7 node_modules/yaml/examples/dates.yaml
@@ -1,7 +0,0 @@
----
- date0: 2011-05-21
- date1: 2011-5-21
- date2: 2011-1-2
- date3: 2011-02-21 17:56
- date4: 2011-04-21 5:35
- date5: 2011-06-02 20:45:30
View
20 node_modules/yaml/examples/hash.yml
@@ -1,20 +0,0 @@
----
- users:
- tj:
- name: tj
- age: 23
- email: 'tj@vision-media.ca'
- bob:
- name: 'bob'
- age: 27
- ted: { name: ted, age: 32, email: ted@tedtalks.com }
- country:
- name: Österreich
- website: http://en.wikipedia.org/wiki/Austria
- space:
- description: space, the final frontier
- brackets:
- square: Square [brackets] can go in the middle of strings
- squiggle: Squiggle {brackets} can also go in the middle of strings!
- extrasquare: [Scratch that] brackets can go at the beginning as long as they close and have text after.
- extrasquiggle: {Scratch that} squigs can go at the beginning also!
View
8 node_modules/yaml/examples/list.nested.yml
@@ -1,8 +0,0 @@
----
- -
- - 1
- - 2
- -
- - 3
- -
- - 4
View
4 node_modules/yaml/examples/list.yml
@@ -1,4 +0,0 @@
----
- - lots of milk
- - 'cookies'
- - 'something'
View
8 node_modules/yaml/examples/null.yaml
@@ -1,8 +0,0 @@
----
- test: A test for null values
- thisis: null
- thistoo: NULL
- notnull: yes
- tildeis: ~
- capitalized: Null
- end: test passed?
View
15 node_modules/yaml/examples/run.js
@@ -1,15 +0,0 @@
-
-var path = process.argv[2],
- fs = require('fs'),
- yaml = require('../lib/yaml')
-
-if (!path)
- throw new Error('provide path to yaml file')
-
-fs.readFile(path, function(err, fileContents) {
- fileContents = fileContents.toString()
- console.log('\n')
- console.log(fileContents)
- console.log('\noutputs:\n')
- console.log(yaml.eval(fileContents))
-})
View
385 node_modules/yaml/lib/yaml.js
@@ -1,385 +0,0 @@
-// YAML - Core - Copyright TJ Holowaychuk <tj@vision-media.ca> (MIT Licensed)
-
-/**
- * Version triplet.
- */
-
-exports.version = '0.2.3'
-
-// --- Helpers
-
-/**
- * Return 'near "context"' where context
- * is replaced by a chunk of _str_.
- *
- * @param {string} str
- * @return {string}
- * @api public
- */
-
-function context(str) {
- if (typeof str !== 'string') return ''
- str = str
- .slice(0, 25)
- .replace(/\n/g, '\\n')
- .replace(/"/g, '\\\"')
- return 'near "' + str + '"'
-}
-
-// --- Lexer
-
-/**
- * YAML grammar tokens.
- */
-
-var tokens = [
- ['comment', /^#[^\n]*/],
- ['indent', /^\n( *)/],
- ['space', /^ +/],
- ['true', /^\b(enabled|true|yes|on)\b/],
- ['false', /^\b(disabled|false|no|off)\b/],
- ['null', /^\b(null|Null|NULL|~)\b/],
- ['string', /^"(.*?)"/],
- ['string', /^'(.*?)'/],
- ['timestamp', /^((\d{4})-(\d\d?)-(\d\d?)(?:(?:[ \t]+)(\d\d?):(\d\d)(?::(\d\d))?)?)/],
- ['float', /^(\d+\.\d+)/],
- ['int', /^(\d+)/],
- ['doc', /^---/],
- [',', /^,/],
- ['{', /^\{(?![^\n\}]*\}[^\n]*[^\s\n\}])/],
- ['}', /^\}/],
- ['[', /^\[(?![^\n\]]*\][^\n]*[^\s\n\]])/],
- [']', /^\]/],
- ['-', /^\-/],
- [':', /^[:]/],
- ['string', /^(?![^:\n\s]*:[^\/]{2})(([^:,\]\}\n\s]|(?!\n)\s(?!\s*?\n)|:\/\/|,(?=[^\n]*\s*[^\]\}\s\n]\s*\n)|[\]\}](?=[^\n]*\s*[^\]\}\s\n]\s*\n))*)(?=[,:\]\}\s\n]|$)/],
- ['id', /^([\w][\w -]*)/]
-]
-
-/**
- * Tokenize the given _str_.
- *
- * @param {string} str
- * @return {array}
- * @api private
- */
-
-exports.tokenize = function (str) {
- var token, captures, ignore, input,
- indents = 0, lastIndents = 0,
- stack = [], indentAmount = -1
- while (str.length) {
- for (var i = 0, len = tokens.length; i < len; ++i)
- if (captures = tokens[i][1].exec(str)) {
- token = [tokens[i][0], captures],
- str = str.replace(tokens[i][1], '')
- switch (token[0]) {
- case 'comment':
- ignore = true
- break
- case 'indent':
- lastIndents = indents
- // determine the indentation amount from the first indent
- if (indentAmount == -1) {
- indentAmount = token[1][1].length
- }
-
- indents = token[1][1].length / indentAmount
- if (indents === lastIndents)
- ignore = true
- else if (indents > lastIndents + 1)
- throw new SyntaxError('invalid indentation, got ' + indents + ' instead of ' + (lastIndents + 1))
- else if (indents < lastIndents) {
- input = token[1].input
- token = ['dedent']
- token.input = input
- while (--lastIndents > indents)
- stack.push(token)
- }
- }
- break
- }
- if (!ignore)
- if (token)
- stack.push(token),
- token = null
- else
- throw new SyntaxError(context(str))
- ignore = false
- }
- return stack
-}
-
-// --- Parser
-
-/**
- * Initialize with _tokens_.
- */
-
-function Parser(tokens) {
- this.tokens = tokens
-}
-
-/**
- * Look-ahead a single token.
- *
- * @return {array}
- * @api public
- */
-
-Parser.prototype.peek = function() {
- return this.tokens[0]
-}
-
-/**
- * Advance by a single token.
- *
- * @return {array}
- * @api public
- */
-
-Parser.prototype.advance = function() {
- return this.tokens.shift()
-}
-
-/**
- * Advance and return the token's value.
- *
- * @return {mixed}
- * @api private
- */
-
-Parser.prototype.advanceValue = function() {
- return this.advance()[1][1]
-}
-
-/**
- * Accept _type_ and advance or do nothing.
- *
- * @param {string} type
- * @return {bool}
- * @api private
- */
-
-Parser.prototype.accept = function(type) {
- if (this.peekType(type))
- return this.advance()
-}
-
-/**
- * Expect _type_ or throw an error _msg_.
- *
- * @param {string} type
- * @param {string} msg
- * @api private
- */
-
-Parser.prototype.expect = function(type, msg) {
- if (this.accept(type)) return
- throw new Error(msg + ', ' + context(this.peek()[1].input))
-}
-
-/**
- * Return the next token type.
- *
- * @return {string}
- * @api private
- */
-
-Parser.prototype.peekType = function(val) {
- return this.tokens[0] &&
- this.tokens[0][0] === val
-}
-
-/**
- * space*
- */
-
-Parser.prototype.ignoreSpace = function() {
- while (this.peekType('space'))
- this.advance()
-}
-
-/**
- * (space | indent | dedent)*
- */
-
-Parser.prototype.ignoreWhitespace = function() {
- while (this.peekType('space') ||
- this.peekType('indent') ||
- this.peekType('dedent'))
- this.advance()
-}
-
-/**
- * block
- * | doc
- * | list
- * | inlineList
- * | hash
- * | inlineHash
- * | string
- * | float
- * | int
- * | true
- * | false
- * | null
- */
-
-Parser.prototype.parse = function() {
- switch (this.peek()[0]) {
- case 'doc':
- return this.parseDoc()
- case '-':
- return this.parseList()
- case '{':
- return this.parseInlineHash()
- case '[':
- return this.parseInlineList()
- case 'id':
- return this.parseHash()
- case 'string':
- return this.advanceValue()
- case 'timestamp':
- return this.parseTimestamp()
- case 'float':
- return parseFloat(this.advanceValue())
- case 'int':
- return parseInt(this.advanceValue())
- case 'true':
- this.advanceValue(); return true
- case 'false':
- this.advanceValue(); return false
- case 'null':
- this.advanceValue(); return null
- }
-}
-
-/**
- * '---'? indent expr dedent
- */
-
-Parser.prototype.parseDoc = function() {
- this.accept('doc')
- this.expect('indent', 'expected indent after document')
- var val = this.parse()
- this.expect('dedent', 'document not properly dedented')
- return val
-}
-
-/**
- * ( id ':' - expr -
- * | id ':' - indent expr dedent
- * )+
- */
-
-Parser.prototype.parseHash = function() {
- var id, hash = {}
- while (this.peekType('id') && (id = this.advanceValue())) {
- this.expect(':', 'expected semi-colon after id')
- this.ignoreSpace()
- if (this.accept('indent'))
- hash[id] = this.parse(),
- this.expect('dedent', 'hash not properly dedented')
- else
- hash[id] = this.parse()
- this.ignoreSpace()
- }
- return hash
-}
-
-/**
- * '{' (- ','? ws id ':' - expr ws)* '}'
- */
-
-Parser.prototype.parseInlineHash = function() {
- var hash = {}, id, i = 0
- this.accept('{')
- while (!this.accept('}')) {
- this.ignoreSpace()
- if (i) this.expect(',', 'expected comma')
- this.ignoreWhitespace()
- if (this.peekType('id') && (id = this.advanceValue())) {
- this.expect(':', 'expected semi-colon after id')
- this.ignoreSpace()
- hash[id] = this.parse()
- this.ignoreWhitespace()
- }
- ++i
- }
- return hash
-}
-
-/**
- * ( '-' - expr -
- * | '-' - indent expr dedent
- * )+
- */
-
-Parser.prototype.parseList = function() {
- var list = []
- while (this.accept('-')) {
- this.ignoreSpace()
- if (this.accept('indent'))
- list.push(this.parse()),
- this.expect('dedent', 'list item not properly dedented')
- else
- list.push(this.parse())
- this.ignoreSpace()
- }
- return list
-}
-
-/**
- * '[' (- ','? - expr -)* ']'
- */
-
-Parser.prototype.parseInlineList = function() {
- var list = [], i = 0
- this.accept('[')
- while (!this.accept(']')) {
- this.ignoreSpace()
- if (i) this.expect(',', 'expected comma')
- this.ignoreSpace()
- list.push(this.parse())
- this.ignoreSpace()
- ++i
- }
- return list
-}
-
-/**
- * yyyy-mm-dd hh:mm:ss
- *
- * For full format: http://yaml.org/type/timestamp.html
- */
-
-Parser.prototype.parseTimestamp = function() {
- var token = this.advance()[1]
- var date = new Date
- var year = token[2]
- , month = token[3]
- , day = token[4]
- , hour = token[5] || 0
- , min = token[6] || 0
- , sec = token[7] || 0
-
- date.setUTCFullYear(year, month-1, day)
- date.setUTCHours(hour)
- date.setUTCMinutes(min)
- date.setUTCSeconds(sec)
- date.setUTCMilliseconds(0)
- return date
-}
-
-/**
- * Evaluate a _str_ of yaml.
- *
- * @param {string} str
- * @return {mixed}
- * @api public
- */
-
-exports.eval = function(str) {
- return (new Parser(exports.tokenize(str))).parse()
-}
View
25 node_modules/yaml/package.json
@@ -1,25 +0,0 @@
-{
- "name": "yaml",
- "version": "0.2.3",
- "description": "Yaml parser",
- "author": {
- "name": "TJ Holowaychuk",
- "email": "tj@vision-media.ca"
- },
- "main": "./lib/yaml.js",
- "_id": "yaml@0.2.3",
- "dependencies": {},
- "devDependencies": {},
- "optionalDependencies": {},
- "engines": {
- "node": "*"
- },
- "_engineSupported": true,
- "_npmVersion": "1.1.24",
- "_nodeVersion": "v0.6.19",
- "_defaultsLoaded": true,
- "dist": {
- "shasum": "3e9f9afae6b05d6b63d361bc38af74468742f443"
- },
- "_from": "yaml@"
-}
Please sign in to comment.
Something went wrong with that request. Please try again.