Skip to content

Commit 2a783bf

Browse files
committed
Pushing bulk of content
1 parent b24ce53 commit 2a783bf

File tree

319 files changed

+437308
-4
lines changed

Some content is hidden

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

319 files changed

+437308
-4
lines changed

404.html

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
---
2+
3+
layout: default
4+
title: 404 - MontageJS
5+
6+
---
7+
8+
<section>
9+
<div class="wrapper">
10+
<div class="cols">
11+
<aside class="col col-1-2">
12+
<h1 class="title-404">404</h1>
13+
</aside>
14+
<div class="col col-1-2">
15+
<p>Oops... looks like the page you were looking for was either moved or removed from our site.</p>
16+
<p>Please return to our
17+
<a href="http://montage.org">home page</a>
18+
or use the links above to find the information you want.</p>
19+
<p>You can also
20+
<a href="http://montage.org/company/contact-us/">contact us</a>
21+
with further questions.</p>
22+
</div>
23+
</div>
24+
</div>
25+
</section>
26+
27+
<script type="text/javascript">
28+
29+
var path = window.location.pathname;
30+
31+
// sets the title so we know which URLs are broken
32+
document.title = "404 - " + path;
33+
34+
// redirect old API docs from /apis/ to /api/
35+
var oldApiDocMatcher = /\/apis\/([^.]*).html/;
36+
var oldApiDocMatch = path.match(oldApiDocMatcher);
37+
38+
if (oldApiDocMatch) {
39+
window.location = "/api/" + oldApiDocMatch[1] + ".html";
40+
}
41+
42+
</script>

CNAME

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
montage.org

Gemfile

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
source 'https://rubygems.org'
2+
3+
gem 'github-pages'

Gemfile.lock

+143
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,143 @@
1+
GEM
2+
remote: https://rubygems.org/
3+
specs:
4+
RedCloth (4.2.9)
5+
activesupport (4.2.5)
6+
i18n (~> 0.7)
7+
json (~> 1.7, >= 1.7.7)
8+
minitest (~> 5.1)
9+
thread_safe (~> 0.3, >= 0.3.4)
10+
tzinfo (~> 1.1)
11+
addressable (2.3.8)
12+
blankslate (2.1.2.4)
13+
classifier-reborn (2.0.4)
14+
fast-stemmer (~> 1.0)
15+
coffee-script (2.4.1)
16+
coffee-script-source
17+
execjs
18+
coffee-script-source (1.10.0)
19+
colorator (0.1)
20+
ethon (0.8.0)
21+
ffi (>= 1.3.0)
22+
execjs (2.6.0)
23+
faraday (0.9.2)
24+
multipart-post (>= 1.2, < 3)
25+
fast-stemmer (1.0.2)
26+
ffi (1.9.10)
27+
gemoji (2.1.0)
28+
github-pages (40)
29+
RedCloth (= 4.2.9)
30+
github-pages-health-check (= 0.5.3)
31+
jekyll (= 2.4.0)
32+
jekyll-coffeescript (= 1.0.1)
33+
jekyll-feed (= 0.3.1)
34+
jekyll-gist (= 1.4.0)
35+
jekyll-mentions (= 0.2.1)
36+
jekyll-paginate (= 1.1.0)
37+
jekyll-redirect-from (= 0.8.0)
38+
jekyll-sass-converter (= 1.3.0)
39+
jekyll-sitemap (= 0.9.0)
40+
jemoji (= 0.5.0)
41+
kramdown (= 1.9.0)
42+
liquid (= 2.6.2)
43+
maruku (= 0.7.0)
44+
mercenary (~> 0.3)
45+
pygments.rb (= 0.6.3)
46+
rdiscount (= 2.1.8)
47+
redcarpet (= 3.3.3)
48+
terminal-table (~> 1.4)
49+
github-pages-health-check (0.5.3)
50+
addressable (~> 2.3)
51+
net-dns (~> 0.8)
52+
public_suffix (~> 1.4)
53+
typhoeus (~> 0.7)
54+
html-pipeline (1.9.0)
55+
activesupport (>= 2)
56+
nokogiri (~> 1.4)
57+
i18n (0.7.0)
58+
jekyll (2.4.0)
59+
classifier-reborn (~> 2.0)
60+
colorator (~> 0.1)
61+
jekyll-coffeescript (~> 1.0)
62+
jekyll-gist (~> 1.0)
63+
jekyll-paginate (~> 1.0)
64+
jekyll-sass-converter (~> 1.0)
65+
jekyll-watch (~> 1.1)
66+
kramdown (~> 1.3)
67+
liquid (~> 2.6.1)
68+
mercenary (~> 0.3.3)
69+
pygments.rb (~> 0.6.0)
70+
redcarpet (~> 3.1)
71+
safe_yaml (~> 1.0)
72+
toml (~> 0.1.0)
73+
jekyll-coffeescript (1.0.1)
74+
coffee-script (~> 2.2)
75+
jekyll-feed (0.3.1)
76+
jekyll-gist (1.4.0)
77+
octokit (~> 4.2)
78+
jekyll-mentions (0.2.1)
79+
html-pipeline (~> 1.9.0)
80+
jekyll (~> 2.0)
81+
jekyll-paginate (1.1.0)
82+
jekyll-redirect-from (0.8.0)
83+
jekyll (>= 2.0)
84+
jekyll-sass-converter (1.3.0)
85+
sass (~> 3.2)
86+
jekyll-sitemap (0.9.0)
87+
jekyll-watch (1.3.0)
88+
listen (~> 3.0)
89+
jemoji (0.5.0)
90+
gemoji (~> 2.0)
91+
html-pipeline (~> 1.9)
92+
jekyll (>= 2.0)
93+
json (1.8.3)
94+
kramdown (1.9.0)
95+
liquid (2.6.2)
96+
listen (3.0.5)
97+
rb-fsevent (>= 0.9.3)
98+
rb-inotify (>= 0.9)
99+
maruku (0.7.0)
100+
mercenary (0.3.5)
101+
mini_portile2 (2.0.0)
102+
minitest (5.8.3)
103+
multipart-post (2.0.0)
104+
net-dns (0.8.0)
105+
nokogiri (1.6.7.1)
106+
mini_portile2 (~> 2.0.0.rc2)
107+
octokit (4.2.0)
108+
sawyer (~> 0.6.0, >= 0.5.3)
109+
parslet (1.5.0)
110+
blankslate (~> 2.0)
111+
posix-spawn (0.3.11)
112+
public_suffix (1.5.3)
113+
pygments.rb (0.6.3)
114+
posix-spawn (~> 0.3.6)
115+
yajl-ruby (~> 1.2.0)
116+
rb-fsevent (0.9.7)
117+
rb-inotify (0.9.5)
118+
ffi (>= 0.5.0)
119+
rdiscount (2.1.8)
120+
redcarpet (3.3.3)
121+
safe_yaml (1.0.4)
122+
sass (3.4.20)
123+
sawyer (0.6.0)
124+
addressable (~> 2.3.5)
125+
faraday (~> 0.8, < 0.10)
126+
terminal-table (1.5.2)
127+
thread_safe (0.3.5)
128+
toml (0.1.2)
129+
parslet (~> 1.5.0)
130+
typhoeus (0.8.0)
131+
ethon (>= 0.8.0)
132+
tzinfo (1.2.2)
133+
thread_safe (~> 0.1)
134+
yajl-ruby (1.2.1)
135+
136+
PLATFORMS
137+
ruby
138+
139+
DEPENDENCIES
140+
github-pages
141+
142+
BUNDLED WITH
143+
1.11.2

_build/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
node_modules

_build/build.js

+174
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,174 @@
1+
#!/usr/bin/env node
2+
/*jshint node:true */
3+
4+
var FS = require("fs");
5+
var PATH = require("path");
6+
var Q = require("q");
7+
var Writable = require("stream").Writable;
8+
var shell = require('shelljs'); // nicer scripting interface
9+
var generateJsdoc = require("./jsdoc/jsdoc");
10+
11+
var spawn = require("child_process").spawn;
12+
/**
13+
* Wrap executing a command in a promise
14+
* @param {string} command command to execute
15+
* @param {Array<string>} args Arguments to the command.
16+
* @param {string} cwd The working directory to run the command in.
17+
* @return {Promise} A promise for the completion of the command.
18+
*/
19+
var exec = function (command, args, cwd, silent) {
20+
var deferred = Q.defer();
21+
cwd = cwd || process.cwd();
22+
23+
if (!silent) {
24+
console.log("+", command, args.join(" "), "# in", cwd);
25+
}
26+
var proc = spawn(command, args, {
27+
cwd: cwd,
28+
stdio: silent ? "ignore" : "inherit"
29+
});
30+
proc.on('exit', function(code) {
31+
if (code !== 0) {
32+
deferred.reject(new Error(command + " " + args.join(" ") + " in " + cwd + " exited with code " + code));
33+
} else {
34+
deferred.resolve();
35+
}
36+
});
37+
return deferred.promise;
38+
};
39+
40+
var SOURCE_PATH = PATH.join(__dirname, "..");
41+
var APPS = {
42+
"popcorn": {url: "https://github.com/montagejs/popcorn.git", commit: "v0.12"}
43+
};
44+
45+
var TEMP_DIR = PATH.join(SOURCE_PATH, "tmp");
46+
47+
function cloneAndMopApps(apps) {
48+
return Q.all(Object.keys(apps).map(function (name) {
49+
var repo = apps[name].url;
50+
var commit = apps[name].commit || "master";
51+
52+
var outPath = PATH.join(SOURCE_PATH, "apps", name);
53+
var clonePath = PATH.join(TEMP_DIR, name);
54+
55+
return exec("git", ["clone", repo, clonePath])
56+
.then(function () {
57+
return exec("git", ["checkout", commit], clonePath);
58+
})
59+
.then(function () {
60+
return exec("npm", ["install"], clonePath);
61+
})
62+
.then(function () {
63+
var montageVersion = JSON.parse(FS.readFileSync(PATH.join(clonePath, "package.json"))).dependencies.montage;
64+
montageVersion = montageVersion.match(/\d\.\d+/)[0];
65+
return exec("npm", ["install", "mop@" + montageVersion], clonePath);
66+
})
67+
.then(function () {
68+
// need devDeps in Montage (q-io/fs) for Mop to work
69+
return exec("npm", ["install"], PATH.join(clonePath, "node_modules", "montage"));
70+
})
71+
.then(function () {
72+
return exec("./node_modules/.bin/mop", [], clonePath);
73+
})
74+
.then(function () {
75+
return exec("rm", ["-r", outPath], clonePath);
76+
})
77+
.then(function () {
78+
return exec("cp", ["-r", PATH.join("builds", name), outPath], clonePath);
79+
})
80+
.then(function () {
81+
// Put a file in the app dir with the hash it was built from
82+
shell.pushd(clonePath);
83+
var hash = shell.exec("git rev-parse --short HEAD").output;
84+
shell.popd();
85+
FS.writeFileSync(PATH.join(outPath, "HASH"), hash);
86+
})
87+
.then(function () {
88+
console.log(name + " built");
89+
});
90+
}));
91+
}
92+
93+
function mopHomeExample() {
94+
var sourcePath = PATH.join(__dirname, "home-example");
95+
var buildPath = PATH.join(sourcePath, "builds", "montagejs.org");
96+
var outPath = SOURCE_PATH;
97+
98+
// Files to copy out of the build
99+
var paths = ["packages", "index.html.bundle-0.js"];
100+
101+
return exec("npm", ["install"], sourcePath)
102+
.then(function () {
103+
return exec("npm", ["install"], PATH.join(sourcePath, "node_modules", "montage"));
104+
})
105+
.then(function () {
106+
return exec("./node_modules/.bin/mop", [], sourcePath);
107+
})
108+
.then(function () {
109+
// Remove generated files from root
110+
return Q.all(paths.map(function (path) {
111+
return exec("rm", ["-r", PATH.join(outPath, path)]);
112+
}));
113+
})
114+
.then(function () {
115+
// Copy generated files back to root
116+
return Q.all(paths.map(function (path) {
117+
return exec("cp", ["-r", PATH.join(buildPath, path), PATH.join(outPath, path)]);
118+
}));
119+
})
120+
.then(function () {
121+
// Copy home-example include
122+
return exec("cp", [PATH.join(buildPath, "index.html"), PATH.join(outPath, "_includes", "home-example.html")]);
123+
});
124+
}
125+
126+
function usage() {
127+
console.log(process.argv[0], process.argv[1], "<what>");
128+
console.log();
129+
console.log("Where 'what' is one or more of:");
130+
console.log();
131+
console.log(" all Build everything");
132+
console.log(" apps Update and Mop the example apps");
133+
console.log(" api Build the API docs");
134+
console.log(" home Mop the embedded home page example");
135+
}
136+
137+
if (require.main === module) {
138+
var argv = process.argv.slice(2);
139+
140+
var buildAll = argv.indexOf("all") !== -1;
141+
var buildApps = buildAll || argv.indexOf("apps") !== -1;
142+
var buildApi = buildAll || argv.indexOf("api") !== -1;
143+
var buildHome = buildAll || argv.indexOf("home") !== -1;
144+
145+
if (!buildApps && !buildApi && !buildHome) {
146+
usage();
147+
process.exit(1);
148+
}
149+
150+
exec("rm", ["-rf", TEMP_DIR])
151+
.then(function () {
152+
return exec("mkdir", [TEMP_DIR]);
153+
})
154+
.then(function () {
155+
if (buildApps) {
156+
return cloneAndMopApps(APPS);
157+
}
158+
})
159+
.then(function () {
160+
if (buildApi) {
161+
return generateJsdoc("montage", "latest", PATH.join(SOURCE_PATH, "api"));
162+
}
163+
})
164+
.then(function () {
165+
if (buildHome) {
166+
return mopHomeExample();
167+
}
168+
})
169+
.then(function () {
170+
console.log("done");
171+
})
172+
.done();
173+
174+
}

0 commit comments

Comments
 (0)