Skip to content

Commit 933f355

Browse files
committed
v0.3.2
Generated navigation improvements and documentation Inner navigation for subheadings and current section highlight 404 page Initial .src files support Clarify enchancements, now runs fast with jsdom and phantomjs is optional New code highlighter (prism.js) /client -> /client-side Grunt task renamed - deployServer -> deployRemote Less Middleware
1 parent 337ab2d commit 933f355

File tree

168 files changed

+3684
-4590
lines changed

Some content is hidden

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

168 files changed

+3684
-4590
lines changed

.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ node_modules
88
/build
99

1010
# Git ignore fo initing
11-
!/client/init/.gitignore
11+
!/client-side/init/.gitignore
1212

1313
# Custom client-side plugins folder, managed with volo packet manager
14-
/client/plugins
14+
/client-side/plugins
1515

1616
# Custom user folder for Source server side
1717
/user

Gruntfile.js

Lines changed: 71 additions & 71 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
# Source - Front-end documentation engine
22

3-
**v.0.3.1**
3+
**v.0.3.2**
44

5-
Main project aim is to give front-end development team a **best tool** for documenting web interfaces and **for productive team work**.
5+
The most powerful tool for documenting web interfaces and building productive team work.
6+
7+
Source powered workflow allows developers to write directly **in the documentation**, it combines front-end interfaces building with documentation process and gives us powerful features for productive development and team work.
68

79
Documentation engine originally was developed at [Odnoklassniki.ru](http://corp.mail.ru/en/communications/odnoklassniki) front-end developers team and **is recommended for big and middle sized projects**, expecially for fast growing web portals.
810

@@ -15,17 +17,17 @@ ___
1517

1618
## Updates
1719
* 23.09.13. Published [video recording](http://www.youtube.com/watch?v=3HNW5Bru0Ws) of Source engine presentation from [RIT++](http://ritconf.ru/) 2013 (RU)
18-
* 09.10.13. Engine [presentation](http://rhr.me/pres/source-min/) on [Fronteers Jam](http://fronteers.nl/congres/2013/jam-session) (video will be available soon)
20+
* 09.10.13. Engine [presentation](http://rhr.me/pres/source-min/) on [Fronteers Jam](http://fronteers.nl/congres/2013/jam-session) ([video](https://vimeo.com/77989211))
21+
* 31.12.13. **0.3.2** release
1922

2023
## Upcoming updates
2124

22-
* Video recording of engine presentation with live demo in english
2325
* Open project blog with news, updates and best practises
2426
* Markdown support in spec pages
25-
* .src files for easier spec pages creation (v.0.3.2)
2627
* Screencasts and engine usage demos
2728
* Full english documentation stack for core API
2829
* Auto spec pages builder
30+
* Comments plugins major updates
2931

3032
___
3133

app.js

Lines changed: 37 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,28 @@
77
/* Module dependencies */
88
var express = require('express')
99
, colors = require('colors')
10-
, fs = require('fs');
10+
, fs = require('fs')
11+
, lessMiddleware = require('less-middleware')
12+
, os = require('os')
13+
, ejs = require('ejs')
14+
, headerFooter = require('./core/headerFooter');
1115

1216
global.app = express();
1317
global.opts = require('./core/options/');
1418

1519
global.app.set('views', __dirname + '/core/views');
1620
global.app.set('specs path', __dirname + '/' + global.opts.common.pathToSpecs);
1721

22+
/* LESS processing */
23+
//TODO: add config and move to other module, and add configurable varibles (/public folder etc)
24+
var tmpDir = os.tmpDir();
25+
global.app.use(lessMiddleware({
26+
src: global.app.get('specs path'),
27+
dest: tmpDir,
28+
force: true
29+
}));
30+
/* /LESS processing */
31+
1832
/* Clarify module */
1933
var clarify = require('./core/clarify');
2034
app.use(clarify);
@@ -36,9 +50,6 @@ global.app.use(logErrors);
3650
global.app.use(clientErrorHandler);
3751
global.app.use(errorHandler);
3852

39-
/* serve static content */
40-
global.app.use(express.static(global.app.get('specs path')));
41-
4253
try {
4354
/* Routes */
4455
global.routes = require('./core/routes');
@@ -53,6 +64,28 @@ try {
5364
process.exit(e.code);
5465
}
5566

67+
/* serve static content */
68+
global.app.use(express.static(global.app.get('specs path')));
69+
app.use(express.static(tmpDir));
70+
71+
app.use(function(req, res, next){
72+
73+
var path = req.url.replace('/index.html', '');
74+
75+
if (req.accepts('html')) {
76+
77+
var headerFooterHTML = headerFooter.getHeaderAndFooter();
78+
res.render(__dirname + '/core/views/404.ejs', {
79+
section: path,
80+
header: headerFooterHTML.header,
81+
footer: headerFooterHTML.footer
82+
})
83+
84+
return;
85+
}
86+
87+
});
88+
5689
if (!module.parent) {
5790
global.app.listen(80);
5891
console.log('[SOURCE] is working on 80 port...'.blue);

client-side/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Client-side part of Source engine, read more about file structure in [docs](http://sourcejs.com/docs/base/#2!).
File renamed without changes.
File renamed without changes.

client/init/index.html renamed to client-side/init/index.html

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<!--[if gt IE 9]><!--> <html> <!--<![endif]-->
66
<head>
77
<meta charset="UTF-8">
8-
<meta http-equiv="X-UA-Compatible" content="IE=10">
8+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
99
<meta name="source-page-role" content="navigation">
1010

1111
<title>Source!</title>
@@ -25,8 +25,6 @@ <h1>Source - Front-end Documentation Engine</h1>
2525

2626
<div class="source_col">
2727
<div class="source_catalog" data-nav="docs">
28-
<h2><a class="source_a_bl" href="/docs">Documentation and Examples</a></h2>
29-
3028
<ul class="source_catalog_list">
3129
<!--Navigation generated dynamically via Global Navigation module-->
3230
<img src="/core/i/process.gif" alt="Loading..."/>
File renamed without changes.
File renamed without changes.

client/init/user/templates/footer.inc.html renamed to client-side/init/user/templates/footer.inc.html

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,12 @@
66
<h2>Sorcerers</h2>
77
<ul class="source_ul">
88
<li><a class="source_a_l" href="http://twitter.com/operatino_en">Robert Haritonov</a></li>
9-
<li><a class="source_a_l" href="http://twitter.com/ostroffsky">Alexey Ostrovsky</a></li>
109
<li><a class="source_a_l" href="mailto:[email protected]">Eugeny Khoroshilov</a></li>
10+
<li><a class="source_a_l" href="http://twitter.com/lapynow">Dmitry Lapynow</a></li>
11+
<li><a class="source_a_l" href="http://twitter.com/from_anywhere">Ivan Metelev</a></li>
12+
<li><a class="source_a_l" href="mailto:[email protected]">Dennis Przendzinski</a></li>
13+
<li><a class="source_a_l" href="http://twitter.com/ostroffsky">Alexey Ostrovsky</a></li>
14+
1115
<li><a class="source_a_l" href="mailto:[email protected]">Juris Pukitis</a></li>
1216
<li><a class="source_a_l" href="http://twitter.com/korochinskiy">Anton Korochinsky</a></li>
1317
</ul>
File renamed without changes.

0 commit comments

Comments
 (0)