This commit is contained in:
18
Cakefile
18
Cakefile
@@ -1,6 +1,7 @@
|
|||||||
fs = require 'fs'
|
fs = require 'fs'
|
||||||
path = require 'path'
|
path = require 'path'
|
||||||
{exec} = require 'child_process'
|
{exec} = require 'child_process'
|
||||||
|
less = require 'less'
|
||||||
|
|
||||||
sourceFiles = [
|
sourceFiles = [
|
||||||
'SwaggerUi'
|
'SwaggerUi'
|
||||||
@@ -71,13 +72,25 @@ task 'dist', 'Build a distribution', ->
|
|||||||
console.log ' : Minifying all...'
|
console.log ' : Minifying all...'
|
||||||
exec 'java -jar "./bin/yuicompressor-2.4.7.jar" --type js -o ' + 'dist/swagger-ui.min.js ' + 'dist/swagger-ui.js', (err, stdout, stderr) ->
|
exec 'java -jar "./bin/yuicompressor-2.4.7.jar" --type js -o ' + 'dist/swagger-ui.min.js ' + 'dist/swagger-ui.js', (err, stdout, stderr) ->
|
||||||
throw err if err
|
throw err if err
|
||||||
pack()
|
lessc()
|
||||||
|
|
||||||
|
lessc = ->
|
||||||
|
# Someone who knows CoffeeScript should make this more Coffee-licious
|
||||||
|
console.log ' : Compiling LESS...'
|
||||||
|
|
||||||
|
less.render fs.readFileSync("src/main/less/screen.less", 'utf8'), (err, css) ->
|
||||||
|
console.log err
|
||||||
|
fs.writeFileSync("src/main/html/css/screen.css", css)
|
||||||
|
pack()
|
||||||
|
|
||||||
pack = ->
|
pack = ->
|
||||||
console.log ' : Packaging...'
|
console.log ' : Packaging...'
|
||||||
exec 'cp -r lib dist'
|
exec 'cp -r lib dist'
|
||||||
|
console.log ' : Copied swagger-ui libs'
|
||||||
exec 'cp -r node_modules/swagger-client/lib/swagger.js dist/lib'
|
exec 'cp -r node_modules/swagger-client/lib/swagger.js dist/lib'
|
||||||
|
console.log ' : Copied swagger dependencies'
|
||||||
exec 'cp -r src/main/html/* dist'
|
exec 'cp -r src/main/html/* dist'
|
||||||
|
console.log ' : Copied html dependencies'
|
||||||
console.log ' !'
|
console.log ' !'
|
||||||
|
|
||||||
task 'spec', "Run the test suite", ->
|
task 'spec', "Run the test suite", ->
|
||||||
@@ -107,6 +120,7 @@ task 'watch', 'Watch source files for changes and autocompile', ->
|
|||||||
watchFiles("src/main/template")
|
watchFiles("src/main/template")
|
||||||
watchFiles("src/main/javascript")
|
watchFiles("src/main/javascript")
|
||||||
watchFiles("src/main/html")
|
watchFiles("src/main/html")
|
||||||
|
watchFiles("src/main/less")
|
||||||
watchFiles("src/test")
|
watchFiles("src/test")
|
||||||
|
|
||||||
notify = (message) ->
|
notify = (message) ->
|
||||||
@@ -115,4 +129,4 @@ notify = (message) ->
|
|||||||
# options =
|
# options =
|
||||||
# title: 'CoffeeScript'
|
# title: 'CoffeeScript'
|
||||||
# image: 'bin/CoffeeScript.png'
|
# image: 'bin/CoffeeScript.png'
|
||||||
# try require('growl') message, options
|
# try require('growl') message, options
|
||||||
|
|||||||
2798
dist/css/screen.css
vendored
2798
dist/css/screen.css
vendored
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
50
src/main/less/reset.less
Normal file
50
src/main/less/reset.less
Normal file
@@ -0,0 +1,50 @@
|
|||||||
|
/* http://meyerweb.com/eric/tools/css/reset/ v2.0 | 20110126 */
|
||||||
|
html, body, div, span, applet, object, iframe,
|
||||||
|
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
|
||||||
|
a, abbr, acronym, address, big, cite, code,
|
||||||
|
del, dfn, em, img, ins, kbd, q, s, samp,
|
||||||
|
small, strike, strong, sub, sup, tt, var,
|
||||||
|
b, u, i, center,
|
||||||
|
dl, dt, dd, ol, ul, li,
|
||||||
|
fieldset, form, label, legend,
|
||||||
|
table, caption, tbody, tfoot, thead, tr, th, td,
|
||||||
|
article, aside, canvas, details, embed,
|
||||||
|
figure, figcaption, footer, header, hgroup,
|
||||||
|
menu, nav, output, ruby, section, summary,
|
||||||
|
time, mark, audio, video {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
border: 0;
|
||||||
|
font-size: 100%;
|
||||||
|
font: inherit;
|
||||||
|
vertical-align: baseline;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* HTML5 display-role reset for older browsers */
|
||||||
|
article, aside, details, figcaption, figure,
|
||||||
|
footer, header, hgroup, menu, nav, section {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
line-height: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
ol, ul {
|
||||||
|
list-style: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
blockquote, q {
|
||||||
|
quotes: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
blockquote:before, blockquote:after,
|
||||||
|
q:before, q:after {
|
||||||
|
content: '';
|
||||||
|
content: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
table {
|
||||||
|
border-collapse: collapse;
|
||||||
|
border-spacing: 0;
|
||||||
|
}
|
||||||
67
src/main/less/screen.less
Normal file
67
src/main/less/screen.less
Normal file
@@ -0,0 +1,67 @@
|
|||||||
|
@import 'src/main/less/reset.less';
|
||||||
|
@import 'src/main/less/specs.less';
|
||||||
|
|
||||||
|
#header {
|
||||||
|
background-color: #89bf04;
|
||||||
|
padding: 14px;
|
||||||
|
a#logo {
|
||||||
|
font-size: 1.5em;
|
||||||
|
font-weight: bold;
|
||||||
|
text-decoration: none;
|
||||||
|
background: transparent url(../images/logo_small.png) no-repeat left center;
|
||||||
|
padding: 20px 0 20px 40px;
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
form#api_selector {
|
||||||
|
display: block;
|
||||||
|
clear: none;
|
||||||
|
float: right;
|
||||||
|
.input {
|
||||||
|
display: block;
|
||||||
|
clear: none;
|
||||||
|
float: left;
|
||||||
|
margin: 0 10px 0 0;
|
||||||
|
input#input_apiKey {
|
||||||
|
width: 200px;
|
||||||
|
}
|
||||||
|
input#input_baseUrl {
|
||||||
|
width: 400px;
|
||||||
|
}
|
||||||
|
a#explore {
|
||||||
|
display: block;
|
||||||
|
text-decoration: none;
|
||||||
|
font-weight: bold;
|
||||||
|
padding: 6px 8px;
|
||||||
|
font-size: 0.9em;
|
||||||
|
color: white;
|
||||||
|
background-color: #547f00;
|
||||||
|
-moz-border-radius: 4px;
|
||||||
|
-webkit-border-radius: 4px;
|
||||||
|
-o-border-radius: 4px;
|
||||||
|
-ms-border-radius: 4px;
|
||||||
|
-khtml-border-radius: 4px;
|
||||||
|
border-radius: 4px;
|
||||||
|
}
|
||||||
|
a#explore:hover {
|
||||||
|
background-color: #547f00;
|
||||||
|
}
|
||||||
|
input {
|
||||||
|
font-size: 0.9em;
|
||||||
|
padding: 3px;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#content_message {
|
||||||
|
margin: 10px 15px;
|
||||||
|
font-style: italic;
|
||||||
|
color: #999999;
|
||||||
|
}
|
||||||
|
|
||||||
|
#message-bar {
|
||||||
|
min-height: 30px;
|
||||||
|
text-align: center;
|
||||||
|
padding-top: 10px;
|
||||||
|
}
|
||||||
1004
src/main/less/specs.less
Normal file
1004
src/main/less/specs.less
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user