mirror of
https://github.com/sourcey/spectacle.git
synced 2024-08-16 17:00:24 +03:00
Update Grunt dependencies
This commit is contained in:
parent
775437299c
commit
c448c63485
@ -136,6 +136,15 @@ Some parts of testing can be configured using environment variables.
|
||||
|
||||
Include environment variables before calling `npm test`. For example, `OFFLINE` mode can be enabled via `OFFLINE=true npm test`.
|
||||
|
||||
|
||||
<!-- ## Contributors
|
||||
|
||||
Thanks to all the great developers who make Spectacle great!
|
||||
|
||||
TODO
|
||||
-->
|
||||
|
||||
|
||||
## More Information
|
||||
|
||||
More info is available on the [Spectacle homepage](http://sourcey.com/spectacle).
|
||||
|
@ -1,3 +1,10 @@
|
||||
/**
|
||||
* Copyright (c) 2015 Nils Knappmeier
|
||||
* https://github.com/bootprint/bootprint-openapi
|
||||
*
|
||||
* @license MIT
|
||||
**/
|
||||
|
||||
/**
|
||||
* Checks whether two values a equal as in (==)
|
||||
* @param value1
|
||||
|
@ -1,3 +1,10 @@
|
||||
/**
|
||||
* Copyright (c) 2015 Nils Knappmeier
|
||||
* https://github.com/bootprint/bootprint-openapi
|
||||
*
|
||||
* @license MIT
|
||||
**/
|
||||
|
||||
module.exports = function(code) {
|
||||
// Comments refer to the section number in rfc2616
|
||||
// If an rfc number is specified, the code is
|
||||
|
@ -1,3 +1,10 @@
|
||||
/**
|
||||
* Copyright (c) 2015 Nils Knappmeier
|
||||
* https://github.com/bootprint/bootprint-openapi
|
||||
*
|
||||
* @license MIT
|
||||
**/
|
||||
|
||||
/**
|
||||
* Returns a descriptive string for a datatype
|
||||
* @param value
|
||||
|
@ -7,10 +7,11 @@ var httpMethods = ['get', 'put', 'post', 'delete', 'options', 'head', 'patch', '
|
||||
// out of the template.
|
||||
|
||||
module.exports = function(options, specData) {
|
||||
if(!options.specFile) {
|
||||
if (!options.specFile) {
|
||||
console.warn("[WARNING] preprocessor must be given 'options.specFile'. Defaulting to 'cwd'.")
|
||||
options.specFile = process.cwd()
|
||||
}
|
||||
|
||||
// Don't normalize x-spec-path to posix path. It must be a platoform specific.
|
||||
specData["x-spec-path"] = options.specFile;
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
{{!
|
||||
Show a subschema for additionaProperties of a `object` definition.
|
||||
}}
|
||||
{{!--
|
||||
Show a subschema for additionaProperties of a `object` definition.
|
||||
--}}
|
||||
<section class="json-schema-additionalProperties">
|
||||
<span class="json-property-type">{{>json-schema/datatype}}</span>
|
||||
{{>json-schema/body}}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{{!--
|
||||
{{!
|
||||
Renders a json-schema "allOf"-definition.
|
||||
--}}
|
||||
}}
|
||||
<section class="json-schema-allOf">
|
||||
{{! Display ref (i.e. superclasses)}}
|
||||
<section class="json-schema-allOf-inherited">
|
||||
|
@ -1,6 +1,6 @@
|
||||
{{!--
|
||||
{{!
|
||||
Renders a json-schema "anyOf"-definition.
|
||||
--}}
|
||||
}}
|
||||
<section class="json-schema-anyOf">
|
||||
{{! Display ref (i.e. superclasses)}}
|
||||
<dl>
|
||||
|
@ -1,5 +1,5 @@
|
||||
{{!
|
||||
renders a json-schema "items"-definition of array-types.
|
||||
Renders a json-schema "items"-definition of array-types.
|
||||
}}
|
||||
<section class="json-schema-array-items">
|
||||
{{>json-schema/datatype .}}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{{!
|
||||
Renders a json-schema without the surrounding panel.
|
||||
@param {boolean} showType whether or not to show the plain datatype for primitives
|
||||
Renders a json-schema without the surrounding panel.
|
||||
@param {boolean} showType whether or not to show the plain datatype for primitives
|
||||
}}
|
||||
|
||||
{{#if description}}
|
||||
|
@ -1,3 +1,10 @@
|
||||
{{!
|
||||
Copyright (c) 2015 Nils Knappmeier
|
||||
https://github.com/bootprint/bootprint-json-schema
|
||||
|
||||
@license MIT
|
||||
}}
|
||||
|
||||
{{!
|
||||
When properties are renderered this partial renders the datatype of a property,
|
||||
with a link to the type-definition (in case of a $ref).
|
||||
|
@ -1,3 +1,10 @@
|
||||
{{!
|
||||
Copyright (c) 2015 Nils Knappmeier
|
||||
https://github.com/bootprint/bootprint-json-schema
|
||||
|
||||
@license MIT
|
||||
}}
|
||||
|
||||
{{!Renders json-schema object properties.}}
|
||||
{{#if properties}}
|
||||
<section class="json-schema-properties">
|
||||
|
@ -1,3 +1,10 @@
|
||||
{{!
|
||||
Copyright (c) 2015 Nils Knappmeier
|
||||
https://github.com/bootprint/bootprint-json-schema
|
||||
|
||||
@license MIT
|
||||
}}
|
||||
|
||||
{{!Renders a reference to a subschema}}
|
||||
{{#if $ref}}
|
||||
<span class="{{#if type}}json-schema-ref-{{type}}{{/if}}">
|
||||
|
11
index.js
11
index.js
@ -26,7 +26,8 @@ var defaults = {
|
||||
configFile: path.resolve(__dirname, 'app/lib/config.js'),
|
||||
cacheDir: tmp.dirSync({ unsafeCleanup: true, prefix: 'spectacle-' }).name,
|
||||
oneFile: false
|
||||
};
|
||||
}
|
||||
|
||||
function resolveOptions(options) {
|
||||
var opts = _.extend({}, defaults, options)
|
||||
|
||||
@ -36,7 +37,7 @@ function resolveOptions(options) {
|
||||
if (opts.logoFile && opts.logoFile.indexOf('test/fixtures') === 0)
|
||||
opts.logoFile = path.resolve(__dirname, opts.logoFile)
|
||||
|
||||
return opts;
|
||||
return opts
|
||||
}
|
||||
|
||||
/**
|
||||
@ -50,9 +51,9 @@ module.exports = function (options) {
|
||||
|
||||
function loadData() {
|
||||
var specPath = path.resolve(opts.specFile)
|
||||
delete require.cache[specPath];
|
||||
return require(path.resolve(opts.appDir + '/lib/preprocessor'))(
|
||||
options, require(specPath))
|
||||
delete require.cache[specPath]
|
||||
var specData = require(opts.appDir + '/lib/resolve-references.js').fetchReference(specPath)
|
||||
return require(path.resolve(opts.appDir + '/lib/preprocessor'))(options, specData)
|
||||
}
|
||||
|
||||
var config = require(path.resolve(opts.configFile))(grunt, opts, loadData())
|
||||
|
1004
package-lock.json
generated
1004
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
22
package.json
22
package.json
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "spectacle-docs",
|
||||
"version": "1.0.4",
|
||||
"version": "1.0.3",
|
||||
"description": "Generate beautiful static API documentation from OpenAPI/Swagger 2.0 specifications",
|
||||
"preferGlobal": true,
|
||||
"bin": {
|
||||
@ -39,17 +39,17 @@
|
||||
"clarify": "^1.0.5",
|
||||
"commander": "*",
|
||||
"foundation-sites": "^6.4.1",
|
||||
"grunt": "^0.4.5",
|
||||
"grunt-compile-handlebars": "^2.0.0",
|
||||
"grunt-contrib-clean": "^0.7.0",
|
||||
"grunt-contrib-concat": "^0.5.1",
|
||||
"grunt-contrib-connect": "^0.11.2",
|
||||
"grunt-contrib-copy": "^0.8.2",
|
||||
"grunt-contrib-cssmin": "^0.14.0",
|
||||
"grunt-contrib-handlebars": "^0.11.0",
|
||||
"grunt": "^1.0.3",
|
||||
"grunt-contrib-clean": "^1.1.0",
|
||||
"grunt-contrib-concat": "^1.0.1",
|
||||
"grunt-contrib-connect": "^1.0.2",
|
||||
"grunt-contrib-copy": "^1.0.0",
|
||||
"grunt-contrib-cssmin": "^2.2.1",
|
||||
"grunt-contrib-jshint": "^1.1.0",
|
||||
"grunt-contrib-uglify": "^0.11.0",
|
||||
"grunt-contrib-watch": "^0.6.1",
|
||||
"grunt-contrib-uglify": "^3.3.0",
|
||||
"grunt-contrib-watch": "^1.1.0",
|
||||
"grunt-contrib-handlebars": "^1.0.0",
|
||||
"grunt-compile-handlebars": "^2.0.0",
|
||||
"grunt-embed": "^0.2.1",
|
||||
"grunt-prettify": "^0.4.0",
|
||||
"grunt-sass": "^3.0.0",
|
||||
|
@ -2149,7 +2149,7 @@
|
||||
<div class="prop-row prop-group">
|
||||
<div class="prop-name">
|
||||
<div class="prop-title">200 OK</div>
|
||||
<div class="prop-ref"></div>
|
||||
<div class="prop-ref"> </div>
|
||||
<!-- <span class="swagger-global"></span> <span class="json-schema-reference"><a href=""></a></span> -->
|
||||
</div>
|
||||
<div class="prop-value">
|
||||
@ -2641,7 +2641,8 @@
|
||||
<div id="definition-Order" class="definition panel" data-traverse-target="definition-Order">
|
||||
<h2 class="panel-title">
|
||||
<a name="/definitions/Order"></a>Order: object
|
||||
<!-- <span class="json-property-type"><span class="json-property-type">object</span>
|
||||
<!-- <span class="json-property-type">
|
||||
<span class="json-property-type">object</span>
|
||||
<span class="json-property-range" title="Value limits"></span>
|
||||
|
||||
|
||||
@ -2717,7 +2718,8 @@
|
||||
<div id="definition-Category" class="definition panel" data-traverse-target="definition-Category">
|
||||
<h2 class="panel-title">
|
||||
<a name="/definitions/Category"></a>Category: object
|
||||
<!-- <span class="json-property-type"><span class="json-property-type">object</span>
|
||||
<!-- <span class="json-property-type">
|
||||
<span class="json-property-type">object</span>
|
||||
<span class="json-property-range" title="Value limits"></span>
|
||||
|
||||
|
||||
@ -2757,7 +2759,8 @@
|
||||
<div id="definition-Customer" class="definition panel" data-traverse-target="definition-Customer">
|
||||
<h2 class="panel-title">
|
||||
<a name="/definitions/Customer"></a>Customer: object
|
||||
<!-- <span class="json-property-type"><span class="json-property-type">object</span>
|
||||
<!-- <span class="json-property-type">
|
||||
<span class="json-property-type">object</span>
|
||||
<span class="json-property-range" title="Value limits"></span>
|
||||
|
||||
|
||||
@ -2848,7 +2851,8 @@
|
||||
<div id="definition-Error" class="definition panel" data-traverse-target="definition-Error">
|
||||
<h2 class="panel-title">
|
||||
<a name="/definitions/Error"></a>Error: object
|
||||
<!-- <span class="json-property-type"><span class="json-property-type">object</span>
|
||||
<!-- <span class="json-property-type">
|
||||
<span class="json-property-type">object</span>
|
||||
<span class="json-property-range" title="Value limits"></span>
|
||||
|
||||
|
||||
@ -2894,7 +2898,8 @@
|
||||
<div id="definition-ValidationError" class="definition panel" data-traverse-target="definition-ValidationError">
|
||||
<h2 class="panel-title">
|
||||
<a name="/definitions/ValidationError"></a>ValidationError: object
|
||||
<!-- <span class="json-property-type"><span class="json-property-type">object</span>
|
||||
<!-- <span class="json-property-type">
|
||||
<span class="json-property-type">object</span>
|
||||
<span class="json-property-range" title="Value limits"></span>
|
||||
|
||||
|
||||
@ -2940,7 +2945,8 @@
|
||||
<div id="definition-NotFoundError" class="definition panel" data-traverse-target="definition-NotFoundError">
|
||||
<h2 class="panel-title">
|
||||
<a name="/definitions/NotFoundError"></a>NotFoundError: object
|
||||
<!-- <span class="json-property-type"><span class="json-property-type">object</span>
|
||||
<!-- <span class="json-property-type">
|
||||
<span class="json-property-type">object</span>
|
||||
<span class="json-property-range" title="Value limits"></span>
|
||||
|
||||
|
||||
@ -2986,7 +2992,8 @@
|
||||
<div id="definition-Cheese" class="definition panel" data-traverse-target="definition-Cheese">
|
||||
<h2 class="panel-title">
|
||||
<a name="/definitions/Cheese"></a>Cheese: object
|
||||
<!-- <span class="json-property-type"><span class="json-property-type">object</span>
|
||||
<!-- <span class="json-property-type">
|
||||
<span class="json-property-type">object</span>
|
||||
<span class="json-property-range" title="Value limits"></span>
|
||||
|
||||
|
||||
@ -3096,7 +3103,8 @@
|
||||
<div id="definition-tag.yml--Tag" class="definition panel" data-traverse-target="definition-tag.yml--Tag">
|
||||
<h2 class="panel-title">
|
||||
<a name="/definitions/tag.yml#/Tag"></a>tag.yml#/Tag: object
|
||||
<!-- <span class="json-property-type"><span class="json-property-type">object</span>
|
||||
<!-- <span class="json-property-type">
|
||||
<span class="json-property-type">object</span>
|
||||
<span class="json-property-range" title="Value limits"></span>
|
||||
|
||||
|
||||
|
2
public/javascripts/spectacle.min.js
vendored
2
public/javascripts/spectacle.min.js
vendored
@ -1 +1 @@
|
||||
function Traverse(a,b){this.$element=a,this.options=$.extend({},Traverse.defaults,this.$element.data(),b),this._init()}$(function(){var a=$("#sidebar");if(a.length){var b=($("#docs"),a.find("nav"));new Traverse(b,{threshold:10,barOffset:a.position().top});b.on("update.traverse",function(a,c){b.find("section").removeClass("expand");var d=c.parents("section:first");d.length&&d.addClass("expand")});var c=$(".drawer-layout"),d=c.find(".drawer"),e=function(){return d.removeClass("slide-right slide-left"),d.find(".drawer-overlay").remove(),c.removeClass("drawer-open drawer-slide-left-large drawer-slide-right-large"),!1};c.find("[data-drawer-slide]").click(function(a){var b=$(this),f=b.data("drawer-slide");c.addClass("drawer-open"),d.addClass("slide-"+f);var g=$('<a href="#" class="drawer-overlay"></a>');return d.append(g),g.click(e),!1}),c.find("[data-drawer-close]").click(e)}}),Traverse.defaults={animationDuration:500,animationEasing:"linear",threshold:50,activeClass:"active",deepLinking:!1,barOffset:0},Traverse.prototype._init=function(){var a=this.$element[0].id;this.$targets=$("[data-traverse-target]"),this.$links=this.$element.find("a"),this.$element.attr({"data-resize":a,"data-scroll":a,id:a}),this.$active=$(),this.scrollPos=parseInt(window.pageYOffset,10),this._events()},Traverse.prototype.calcPoints=function(){var a=this,b=document.body,c=document.documentElement;this.points=[],this.winHeight=Math.round(Math.max(window.innerHeight,c.clientHeight)),this.docHeight=Math.round(Math.max(b.scrollHeight,b.offsetHeight,c.clientHeight,c.scrollHeight,c.offsetHeight)),this.$targets.each(function(){var b=$(this),c=b.offset().top;b.targetPoint=c,a.points.push(c)})},Traverse.prototype._events=function(){var a=this,b=$("html, body"),c={duration:a.options.animationDuration,easing:a.options.animationEasing};$(window).one("load",function(){a.calcPoints(),a._updateActive(),$(this).resize(function(b){a.reflow()}).scroll(function(b){a._updateActive()})}),this.$element.on("click",'a[href^="#"]',function(d){d.preventDefault();var e=this.getAttribute("href").replace(".","\\."),f=$(e).offset().top-a.options.barOffset;b.stop(!0).animate({scrollTop:f},c)})},Traverse.prototype.reflow=function(){this.calcPoints(),this._updateActive()},Traverse.prototype._updateActive=function(){var a,b=parseInt(window.pageYOffset,10);if(b+this.winHeight===this.docHeight)a=this.points.length-1;else if(b<this.points[0])a=0;else{var c=this.scrollPos<b,d=this,e=this.points.filter(function(a,e){return c?a<=b+d.options.barOffset+d.options.threshold:a-(d.options.barOffset+d.options.threshold)<=b});a=e.length?e.length-1:0}var f=this.$active,g=this.$links.eq(a);if(this.$active.removeClass(this.options.activeClass),this.$active=g.addClass(this.options.activeClass),this.options.deepLinking){var h=this.$active[0].getAttribute("href");window.history.pushState?window.history.pushState(null,null,h):window.location.hash=h}this.scrollPos=b;var i=f[0]!==g[0];i&&this.$element.trigger("update.traverse",[this.$active])};
|
||||
function Traverse(t,e){this.$element=t,this.options=$.extend({},Traverse.defaults,this.$element.data(),e),this._init()}$(function(){var t=$("#sidebar");if(t.length){$("#docs");var s=t.find("nav");new Traverse(s,{threshold:10,barOffset:t.position().top});s.on("update.traverse",function(t,e){s.find("section").removeClass("expand");var i=e.parents("section:first");i.length&&i.addClass("expand")});var a=$(".drawer-layout"),n=a.find(".drawer"),r=function(){return n.removeClass("slide-right slide-left"),n.find(".drawer-overlay").remove(),a.removeClass("drawer-open drawer-slide-left-large drawer-slide-right-large"),!1};a.find("[data-drawer-slide]").click(function(t){var e=$(this).data("drawer-slide");a.addClass("drawer-open"),n.addClass("slide-"+e);var i=$('<a href="#" class="drawer-overlay"></a>');return n.append(i),i.click(r),!1}),a.find("[data-drawer-close]").click(r)}}),Traverse.defaults={animationDuration:500,animationEasing:"linear",threshold:50,activeClass:"active",deepLinking:!1,barOffset:0},Traverse.prototype._init=function(){var t=this.$element[0].id;this.$targets=$("[data-traverse-target]"),this.$links=this.$element.find("a"),this.$element.attr({"data-resize":t,"data-scroll":t,id:t}),this.$active=$(),this.scrollPos=parseInt(window.pageYOffset,10),this._events()},Traverse.prototype.calcPoints=function(){var i=this,t=document.body,e=document.documentElement;this.points=[],this.winHeight=Math.round(Math.max(window.innerHeight,e.clientHeight)),this.docHeight=Math.round(Math.max(t.scrollHeight,t.offsetHeight,e.clientHeight,e.scrollHeight,e.offsetHeight)),this.$targets.each(function(){var t=$(this),e=t.offset().top;t.targetPoint=e,i.points.push(e)})},Traverse.prototype._events=function(){var s=this,a=$("html, body"),n={duration:s.options.animationDuration,easing:s.options.animationEasing};$(window).one("load",function(){s.calcPoints(),s._updateActive(),$(this).resize(function(t){s.reflow()}).scroll(function(t){s._updateActive()})}),this.$element.on("click",'a[href^="#"]',function(t){t.preventDefault();var e=this.getAttribute("href").replace(".","\\."),i=$(e).offset().top-s.options.barOffset;a.stop(!0).animate({scrollTop:i},n)})},Traverse.prototype.reflow=function(){this.calcPoints(),this._updateActive()},Traverse.prototype._updateActive=function(){var t,i=parseInt(window.pageYOffset,10);if(i+this.winHeight===this.docHeight)t=this.points.length-1;else if(i<this.points[0])t=0;else{var s=this.scrollPos<i,a=this,e=this.points.filter(function(t,e){return s?t<=i+a.options.barOffset+a.options.threshold:t-(a.options.barOffset+a.options.threshold)<=i});t=e.length?e.length-1:0}var n=this.$active,r=this.$links.eq(t);if(this.$active.removeClass(this.options.activeClass),this.$active=r.addClass(this.options.activeClass),this.options.deepLinking){var o=this.$active[0].getAttribute("href");window.history.pushState?window.history.pushState(null,null,o):window.location.hash=o}this.scrollPos=i,n[0]!==r[0]&&this.$element.trigger("update.traverse",[this.$active])};
|
2
public/stylesheets/foundation.min.css
vendored
2
public/stylesheets/foundation.min.css
vendored
File diff suppressed because one or more lines are too long
2
public/stylesheets/spectacle.min.css
vendored
2
public/stylesheets/spectacle.min.css
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user