Skip to content

Commit

Permalink
Updated documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
notheotherben committed Aug 31, 2015
1 parent 971a2b8 commit d806e89
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[submodule "doc"]
path = doc
url = git://github.com/SierraSoftworks/Iridium.git
url = https://github.com/SierraSoftworks/Iridium.git
branch = gh-pages
34 changes: 18 additions & 16 deletions build/doc.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,59 +4,61 @@ var gulp = require('gulp'),
path = require('path'),
runSequence = require('run-sequence'),
fs = require('fs');

var paths = require('./paths');

gulp.task('doc', function() {
return runSequence('doc-build', 'doc-publish');
});

gulp.task('doc-build', function() {
return runSequence('doc-checkout', 'doc-compile', ['doc-submodule', 'doc-attributes']);
});

gulp.task('doc-checkout', function(cb) {
return git.checkout('gh-pages', { cwd: 'doc', quiet: true }, cb);
});

gulp.task('doc-submodule', function(cb) {
fs.writeFile('doc/.git', 'gitdir: ../.git/modules/doc', cb);
});

gulp.task('doc-attributes', function(cb) {
fs.writeFile('doc/.gitattributes', '* text=auto', cb);
});

gulp.task('doc-publish', function(cb) {
git.exec({ args: 'diff-files --quiet', quiet: true, cwd: 'doc' }, function(err, stdout) {
if(err && err.code === 1) runSequence('doc-commit', 'doc-update-ref', 'doc-push', cb);
else cb();
});
gulp.task('doc-publish', function (cb) {
setTimeout(function () {
git.exec({ args: 'diff-files --quiet', quiet: true, cwd: 'doc' }, function(err, stdout) {
if(err && err.code === 1) runSequence('doc-commit', 'doc-update-ref', 'doc-push', cb);
else cb();
});
}, 5000);
});

gulp.task('doc-commit', function() {
return gulp.src('**', { cwd: 'doc' })
.pipe(git.commit('Updated documentation', { cwd: 'doc' }));
});

gulp.task('doc-update-ref', function() {
return gulp.src('.')
.pipe(git.commit('Updated documentation'));
});

gulp.task('doc-push', function(cb) {
git.push('origin', 'gh-pages', { cwd: 'doc' }, cb);
});

gulp.task('doc-compile', function() {
return gulp.src(paths.docSourceFiles).pipe(typedoc({
module: 'commonjs',
target: 'es5',
mode: 'file',
entryPoint: 'iridium',

out: './doc',

name: "Iridium",
plugin: ['decorator'],
ignoreCompilerErrors: false
Expand Down
2 changes: 1 addition & 1 deletion doc

0 comments on commit d806e89

Please sign in to comment.