diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..3a3a7b4 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +**/node_modules +.DS_Store +Thumbs.db \ No newline at end of file diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 0000000..6cb7cfd --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,7 @@ +Copyright 2015 Analytical Graphics, Inc. + +Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. \ No newline at end of file diff --git a/bin/wetzel.js b/bin/wetzel.js new file mode 100644 index 0000000..bd9b122 --- /dev/null +++ b/bin/wetzel.js @@ -0,0 +1,5 @@ +#!/usr/bin/env node +"use strict"; +var generateMarkdown = require('../'); + +process.stdout.write(generateMarkdown()); \ No newline at end of file diff --git a/index.js b/index.js new file mode 100644 index 0000000..084b594 --- /dev/null +++ b/index.js @@ -0,0 +1,2 @@ +"use strict"; +module.exports = require('./lib/generateMarkdown'); \ No newline at end of file diff --git a/lib/defaultValue.js b/lib/defaultValue.js new file mode 100644 index 0000000..fa49486 --- /dev/null +++ b/lib/defaultValue.js @@ -0,0 +1,11 @@ +"use strict"; +var defined = require('./defined'); + +module.exports = defaultValue; + +function defaultValue(a, b) { + if (defined(a)) { + return a; + } + return b; +} \ No newline at end of file diff --git a/lib/defined.js b/lib/defined.js new file mode 100644 index 0000000..7d364ba --- /dev/null +++ b/lib/defined.js @@ -0,0 +1,7 @@ +"use strict"; + +module.exports = defined; + +function defined(value) { + return (value !== undefined) && (value !== null); +} \ No newline at end of file diff --git a/lib/generateMarkdown.js b/lib/generateMarkdown.js new file mode 100644 index 0000000..bf199a7 --- /dev/null +++ b/lib/generateMarkdown.js @@ -0,0 +1,9 @@ +"use strict"; +var defined = require('./defined'); +var defaultValue = require('./defaultValue'); + +module.exports = generateMarkdown; + +function generateMarkdown() { + return 'generateMarkdown'; +} \ No newline at end of file diff --git a/package.json b/package.json new file mode 100644 index 0000000..2991888 --- /dev/null +++ b/package.json @@ -0,0 +1,33 @@ +{ + "name": "wetzel", + "version": "0.0.1", + "description": "Generate Markdown documentation from JSON Schema", + "license": "Apache-2.0", + "author": { + "name": "Patrick Cozzi", + "email": "pcozzi@agi.com", + "url": "https://twitter.com/pjcozzi" + }, + "keywords": [ + "json schema", + "markdown" + ], + "homepage": "https://github.com/AnalyticalGraphicsInc/wetzel", + "repository": { + "type": "git", + "url": "git@github.com:AnalyticalGraphicsInc/wetzel.git" + }, + "bugs": { + "url": "https://github.com/AnalyticalGraphicsInc/wetzel/issues" + }, + "scripts": { + "jshint": "./node_modules/jshint/bin/jshint *.js **/*.js --exclude build/**/*.js" + }, + "directories": { + "bin": "./bin", + "lib": "./lib" + }, + "devDependencies": { + "jshint": "^2.6.0" + } +} \ No newline at end of file