Skip to content

Commit 5d57173

Browse files
committed
162 - add site
1 parent c4fee92 commit 5d57173

File tree

228 files changed

+44105
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

228 files changed

+44105
-0
lines changed

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,5 @@ build
77
dist
88
docs/
99
guides/
10+
site/node_modules/
11+
!site/app/lib/

CNAME

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
funcunit.com

Makefile

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
publish-docs:
2+
git checkout -b gh-pages-test
3+
$(MAKE) -C site build
4+
npm install
5+
./node_modules/.bin/documentjs -fd
6+
git add -f docs/
7+
git add -f guides/
8+
git add -f site/
9+
git add -f index.html
10+
git add -f CNAME
11+
git commit -m "Publish docs"
12+
git push -f origin gh-pages-test
13+
git checkout -
14+
git branch -D gh-pages-test

documentjs.json

+4
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,9 @@
1616
"parent": "Guides",
1717
"pageConfig": {"page":"guides"}
1818
}
19+
},
20+
"siteDefaults": {
21+
"static":"site/theme/static",
22+
"templates": "site/theme/templates"
1923
}
2024
}

index.html

+181
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,181 @@
1+
<!DOCTYPE html>
2+
3+
<!--[if lt IE 7]>
4+
<html class="no-js ie lt-ie9 lt-ie8 lt-ie7" lang="en">
5+
<![endif]-->
6+
<!--[if IE 7]>
7+
<html class="no-js ie lt-ie9 lt-ie8" lang="en">
8+
<![endif]-->
9+
<!--[if IE 8]>
10+
<html class="no-js ie lt-ie9" lang="en">
11+
<![endif]-->
12+
<!--[if IE 9]>
13+
<html class="no-js ie ie9" lang="en">
14+
<![endif]-->
15+
<!--[if gt IE 9]><!-->
16+
<html class="no-js" lang="en">
17+
<!--<![endif]-->
18+
<head>
19+
<meta charset="utf-8">
20+
<title></title>
21+
<meta name="description" content="">
22+
<meta name="author" content="">
23+
<link rel="shortcut icon" type="image/png" href="site/static/img/funcunit-logo-32x32.png">
24+
25+
<link rel="stylesheet" type="text/css" href='./site/static/bundles/static.css'/>
26+
27+
<!--[if lt IE 9]>
28+
<script type="text/javascript" src="site/app/lib/html5shiv.js"></script>
29+
<!--<![endif]-->
30+
</head>
31+
32+
<body class="">
33+
<header>
34+
<nav class="container">
35+
36+
<div class="logo-menu">
37+
<a class="brand funcunit" href="index.html">FuncUnit</a>
38+
<ul class="dropdown-menu">
39+
<li><a href="http://donejs.com">DoneJS</a></li>
40+
<li><a href="http://javascriptmvc.com">JavaScriptMVC</a></li>
41+
<li><a href="http://canjs.com">CanJS</a></li>
42+
<li><a href="http://jquerypp.com">jQuery++</a></li>
43+
<li><a href="http://stealjs.com">StealJS</a></li>
44+
<li class="active"><a href="index.html">FuncUnit</a></li>
45+
<li><a href="http://documentjs.com">DocumentJS</a></li>
46+
</ul>
47+
</div>
48+
<ul class="nav">
49+
<li class="active">
50+
<a href="index.html">Home</a>
51+
</li>
52+
<li class="guides"><a href="guides/index.html">Guides</a></li>
53+
<li class="docs"><a href="docs/index.html">API</a></li>
54+
<li class="community"><a href="https://github.com/bitovi/funcunit" target="_blank">GitHub</a></li>
55+
<li class="chat"><a href="https://gitter.im/bitovi/funcunit" target="_blank">Chat</a></li>
56+
<li class="forum"><a href="http://forums.donejs.com/c/testing" target="_blank">Forums</a></li>
57+
</ul>
58+
<div class="pull-right">
59+
<div class="bitovi-menu">
60+
<a href="http://bitovi.com" class="bitovi icon-bits">Bitovi</a>
61+
<ul class="dropdown-menu">
62+
<li><a href="http://bitovi.com">Bitovi.com</a></li>
63+
<li><a href="http://bitovi.com/blog">Blog</a></li>
64+
<li><a href="http://bitovi.com/design">Design</a></li>
65+
<li><a href="http://bitovi.com/development">Development</a></li>
66+
<li><a href="http://bitovi.com/training">Training</a></li>
67+
<li><a href="http://bitovi.com/open-source">Open Source</a></li>
68+
<li><a href="http://bitovi.com/about">About</a></li>
69+
<li><a href="http://bitovi.com/contact">Contact Us</a></li>
70+
</ul>
71+
</div>
72+
</div>
73+
</nav>
74+
</header>
75+
76+
77+
78+
79+
80+
81+
82+
<div class="hero">
83+
<div class="container">
84+
<span class="hero-background iconNew-fu-logo-icon"></span>
85+
<div id="hero-download" class="pull-right">
86+
<h1>Write better tests, faster.</h1>
87+
88+
<a href="https://raw.githubusercontent.com/bitovi/funcunit/v3.0.0/dist/funcunit.js" download="funcunit.js">
89+
<button class="download">Download 3.0.0<span>(One file. Everything you need.)</span></button>
90+
</a>
91+
</div>
92+
93+
</div>
94+
</div>
95+
96+
<div class="content">
97+
<div class="container benefits">
98+
<h1>Superpower your tests</h1>
99+
100+
<p>FuncUnit enhances assertion libraries like QUnit and Jasmine, enabling them to simulate user actions, easily test asynchronous behavior, and support black box testing. Use its terse jQuery-like syntax to superpower your functional or unit tests.</p>
101+
102+
</div>
103+
104+
<div class="container twitter">
105+
106+
<a href="https://twitter.com/funcunit" class="twitter-follow-button" data-show-count="true" data-dnt="true">Follow @funcunit</a>
107+
108+
<iframe src="http://ghbtns.com/github-btn.html?user=bitovi&repo=funcunit&type=watch&count=true"
109+
allowtransparency="true" frameborder="0" scrolling="0" width="110" height="20"></iframe>
110+
111+
<iframe src="http://ghbtns.com/github-btn.html?user=bitovi&repo=funcunit&type=fork&count=true"
112+
allowtransparency="true" frameborder="0" scrolling="0" width="95" height="20"></iframe>
113+
114+
</div>
115+
116+
<div class="dark social">
117+
<div class="container">
118+
<ul class="social-stats">
119+
<li class="irc"><a href="http://bithub.com/greatest/funcunit/article">articles</a></li>
120+
<li class="apps"><a href="http://bithub.com/greatest/funcunit/app">apps submitted</a></li>
121+
<li class="plugins"><a href="http://bithub.com/greatest/funcunit/plugin">plugins submitted</a></li>
122+
<li class="forums"><a href="http://bithub.com/greatest/funcunit/question">forum posts</a></li>
123+
<li class="commits"><a href="http://bithub.com/greatest/funcunit/code">commits</a></li>
124+
</ul>
125+
</div>
126+
</div>
127+
128+
<div class="container example">
129+
<h1>It's This Easy</h1>
130+
131+
<ul class="navigation">
132+
<li class="header">Pick a Test Runner:</li>
133+
<li class="tab selected">QUnit</li>
134+
<li class="tab">Jasmine</li>
135+
</ul>
136+
137+
<div class="content"></div>
138+
139+
<input type="button" class="runner" value="Run Tests"/>
140+
</div>
141+
142+
<div class="color get-started">
143+
<div class="container">
144+
<h1>Get Started</h1>
145+
146+
<h2>You'll be up and running in no time</h2>
147+
<ul class="wizard">
148+
<li class="download"><a href="https://raw.githubusercontent.com/bitovi/funcunit/v3.0.0/dist/funcunit.js" download="funcunit.js">Download</a></li>
149+
<li class="guide"><a href="/guides/index.html">Read the Guide</a></li>
150+
<li>Superpower your Tests!</li>
151+
</ul>
152+
</div>
153+
</div>
154+
</div>
155+
156+
157+
158+
159+
160+
161+
162+
163+
164+
165+
166+
<footer>
167+
<nav class="container">
168+
<a class="brand javascriptmvc" href="index.html"></a>
169+
<ul class="nav">
170+
<li class="guides"><a href="guides/index.html">Guides</a></li>
171+
<li class="docs"><a href="docs/index.html">API</a></li>
172+
<li class="community"><a href="https://github.com/bitovi/funcunit">GitHub</a></li>
173+
</ul>
174+
</nav>
175+
</footer>
176+
<!-- <script src="./node_modules/steal/steal.production.js" data-main="app/app" bundles-path="static"></script> -->
177+
<script src="./site/static/app/app.js" config="../../package.json!npm" base-url='../../'></script>
178+
179+
</body>
180+
181+
</html>

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
"syn": "^0.2.0"
4646
},
4747
"devDependencies": {
48+
"less": "^1.7.0",
4849
"documentjs": "^0.3.0-pre.4",
4950
"can-define": "^0.8.0",
5051
"can-zone": "^0.4.4",

site/Gruntfile.js

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
module.exports = function (grunt) {
2+
grunt.initConfig({
3+
"steal-build": {
4+
bundle: {
5+
options: {
6+
system: {
7+
config: "package.json!npm"
8+
},
9+
buildOptions:{
10+
bundleSteal:true
11+
}
12+
}
13+
}
14+
}
15+
});
16+
grunt.loadNpmTasks("steal-tools");
17+
grunt.registerTask("build", ["steal-build"]);
18+
};

site/Makefile

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
build:
2+
npm install
3+
npm run build

site/app/app.js

+82
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
/* global window, document, $, Bitovi, prettyPrint, Grayscale */
2+
3+
import 'jquery';
4+
import 'can';
5+
import 'can/construct/super/';
6+
import Bitovi from './bitovi';
7+
8+
import './lib/grayscale';
9+
import './lib/moment';
10+
import './lib/pretty-print';
11+
import './models/';
12+
import Controls from './controls/';
13+
14+
Bitovi.OSS.initTwitterWidgets = function() {
15+
if($('.twitter-follow-button').length) {
16+
// replace the "Follow @canjs!" link with a little wiget with follower count.
17+
$('#twitter-wjs').remove();
18+
!function (d, s, id) {
19+
var js, fjs = d.getElementsByTagName(s)[0];
20+
if (!d.getElementById(id)) {
21+
js = d.createElement(s);
22+
js.id = id;
23+
js.src = '//platform.twitter.com/widgets.js';
24+
fjs.parentNode.insertBefore(js, fjs);
25+
}
26+
}(document, 'script', 'twitter-wjs');
27+
}
28+
};
29+
30+
Bitovi.OSS.redrawFont = function() {
31+
var style = $('<style>:before,:after{content:none !important}</style>');
32+
$('head').append(style);
33+
34+
window.setTimeout(function() {
35+
style.remove();
36+
}, 0);
37+
};
38+
39+
40+
var initControls = function(mappings) {
41+
can.each(mappings, function(name, selector) {
42+
$(selector).each(function() {
43+
var widget = $(this);
44+
new Controls[name](widget);
45+
});
46+
});
47+
};
48+
49+
$(function() {
50+
Bitovi.OSS.initTwitterWidgets();
51+
initControls({
52+
'.social': 'SocialStats',
53+
'.cdn': 'CDNChooser',
54+
'.communityTabs': 'CommunityTabs',
55+
'.sidebar': 'Menu'
56+
});
57+
58+
new Controls.Example('.container.example', {});
59+
60+
// Syntax highlighting
61+
$('pre code').each(function() {
62+
var el = $(this).parent();
63+
el.addClass('prettyprint');
64+
if(!el.hasClass('nolinenums')) {
65+
el.addClass('linenums');
66+
}
67+
});
68+
69+
prettyPrint();
70+
});
71+
72+
// feature-test for canvas
73+
var canvas = !!((document.createElement('canvas')).getContext);
74+
75+
if(canvas) {
76+
// this needs to wait until everything is loaded.
77+
$(window).load(function() {
78+
79+
// Grayscaling for our featured apps.
80+
Grayscale($('.carousel img'), 300);
81+
});
82+
}

site/app/bitovi.js

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
// This is in the current version of FuncUnit.com, but I can't
2+
// find where it is created. A Heroku variable, maybe?
3+
4+
var Bitovi = window.Bitovi = {
5+
URL: {
6+
BITHUB: 'http://api.bithub.com/api/events/',
7+
BUILDER: 'http://bitbuilder.herokuapp.com/can.custom.js',
8+
BUILDER_DATA: 'http://bitbuilder.herokuapp.com/canjs',
9+
CDN: '//canjs.com/release/'
10+
}
11+
};
12+
13+
export default Bitovi;

site/app/controls/apiSignature.js

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
export default can.Control({}, {
2+
'h2 click': function(el, ev) {
3+
this.element.toggleClass('collapsed');
4+
}
5+
});

site/app/controls/benefitTabs.js

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
export default can.Control({
2+
/*defaults: {
3+
tabs: {
4+
flexible: {
5+
className: 'flexible',
6+
title: 'Flexible',
7+
tagline: 'Works with jQuery, Dojo, Mootools, YUI, and Zepto. Reuse your existing templates.',
8+
link: 'guides/Why.html#Flexible'
9+
},
10+
powerful: {
11+
className: 'powerful',
12+
title: 'Powerful',
13+
tagline: 'Live binding, restful models, observables, declarative events, and memory safety.',
14+
link: 'guides/Why.html#Powerful'
15+
},
16+
fast: {
17+
className: 'fast',
18+
title: 'Fast',
19+
tagline: 'Fast templates, responsive widgets, and you can learn it in a day.',
20+
link: 'guides/Why.html#Fast'
21+
}
22+
}
23+
}*/
24+
}, {
25+
init: function() {
26+
this.active = this.element.find('li.active');
27+
},
28+
'li mouseover': function(el, ev) {
29+
// hide old
30+
var name = this.active.removeClass('active').data('benefit');
31+
this.element.find('div.'+name).hide();
32+
33+
name = el.addClass('active').data('benefit');
34+
this.element.find('div.'+name).show();
35+
this.active = el;
36+
}
37+
});

0 commit comments

Comments
 (0)