Skip to content
This repository has been archived by the owner on Apr 29, 2020. It is now read-only.

Commit

Permalink
Release 1.5.5-4
Browse files Browse the repository at this point in the history
  • Loading branch information
ggrossetie committed Dec 17, 2016
1 parent b7f74d1 commit 66f8233
Show file tree
Hide file tree
Showing 2 changed files with 203 additions and 0 deletions.
191 changes: 191 additions & 0 deletions dist/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,191 @@
/* Generated by Opal 0.10.1 */
Opal.modules["asciidoctor/core_ext/factory"] = function(Opal) {
var self = Opal.top, $scope = Opal, nil = Opal.nil, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module, $klass = Opal.klass, $hash2 = Opal.hash2;

Opal.add_stubs(['$resolve', '$is_a?', '$new', '$===', '$require', '$to_s', '$==', '$exist?', '$key?', '$[]=', '$[]']);
return (function($base) {
var $Asciidoctor, self = $Asciidoctor = $module($base, 'Asciidoctor');

var def = self.$$proto, $scope = self.$$scope;

(function($base) {
var $Converter, self = $Converter = $module($base, 'Converter');

var def = self.$$proto, $scope = self.$$scope;

(function($base, $super) {
function $Factory(){};
var self = $Factory = $klass($base, $super, 'Factory', $Factory);

var def = self.$$proto, $scope = self.$$scope, TMP_1;

return (Opal.defn(self, '$create', TMP_1 = function ːcreate(backend, opts) {
var $a, $b, $c, self = this, converter = nil, base_converter = nil, $case = nil, revealjs_templates_path = nil, template_converter = nil;

if (opts == null) {
opts = $hash2([], {});
}
if ((($a = (converter = self.$resolve(backend))) !== nil && $a != null && (!$a.$$is_boolean || $a == true))) {
if ((($a = converter['$is_a?'](Opal.get('Class'))) !== nil && $a != null && (!$a.$$is_boolean || $a == true))) {
return converter.$new(backend, opts)
} else {
return converter
}};
base_converter = (function() {$case = backend;if ("html5"['$===']($case)) {if ((($a = (function(){ try { return ((((((Opal.get('Asciidoctor')).$$scope.get('Converter'))).$$scope.get('Html5Converter'))) != null ? 'constant' : nil); } catch (err) { if (err.$$class === Opal.NameError) { return nil; } else { throw(err); }}; })()) !== nil && $a != null && (!$a.$$is_boolean || $a == true))) {
} else {
self.$require("asciidoctor/converter/html5".$to_s())
};
return $scope.get('Html5Converter').$new(backend, opts);}else if ("docbook5"['$===']($case)) {if ((($a = (function(){ try { return ((((((Opal.get('Asciidoctor')).$$scope.get('Converter'))).$$scope.get('DocBook5Converter'))) != null ? 'constant' : nil); } catch (err) { if (err.$$class === Opal.NameError) { return nil; } else { throw(err); }}; })()) !== nil && $a != null && (!$a.$$is_boolean || $a == true))) {
} else {
self.$require("asciidoctor/converter/docbook5".$to_s())
};
return $scope.get('DocBook5Converter').$new(backend, opts);}else if ("docbook45"['$===']($case)) {if ((($a = (function(){ try { return ((((((Opal.get('Asciidoctor')).$$scope.get('Converter'))).$$scope.get('DocBook45Converter'))) != null ? 'constant' : nil); } catch (err) { if (err.$$class === Opal.NameError) { return nil; } else { throw(err); }}; })()) !== nil && $a != null && (!$a.$$is_boolean || $a == true))) {
} else {
self.$require("asciidoctor/converter/docbook45".$to_s())
};
return $scope.get('DocBook45Converter').$new(backend, opts);}else if ("manpage"['$===']($case)) {if ((($a = (function(){ try { return ((((((Opal.get('Asciidoctor')).$$scope.get('Converter'))).$$scope.get('ManPageConverter'))) != null ? 'constant' : nil); } catch (err) { if (err.$$class === Opal.NameError) { return nil; } else { throw(err); }}; })()) !== nil && $a != null && (!$a.$$is_boolean || $a == true))) {
} else {
self.$require("asciidoctor/converter/manpage".$to_s())
};
return $scope.get('ManPageConverter').$new(backend, opts);}else { return nil }})();
if ((($a = (($b = backend['$==']("revealjs")) ? (((($c = $scope.get('JAVASCRIPT_PLATFORM')['$==']("node")) !== false && $c !== nil && $c != null) ? $c : $scope.get('JAVASCRIPT_PLATFORM')['$==']("node-electron"))) : backend['$==']("revealjs"))) !== nil && $a != null && (!$a.$$is_boolean || $a == true))) {
if ((($a = Opal.get('File')['$exist?'](revealjs_templates_path = "node_modules/asciidoctor-reveal.js/templates")) !== nil && $a != null && (!$a.$$is_boolean || $a == true))) {
if ((($a = opts['$key?']("template_dirs")) !== nil && $a != null && (!$a.$$is_boolean || $a == true))) {
} else {
opts['$[]=']("template_dirs", revealjs_templates_path)
}}};
if ((($a = opts['$key?']("template_dirs")) !== nil && $a != null && (!$a.$$is_boolean || $a == true))) {
} else {
return base_converter
};
if ((($a = (function(){ try { return ((((((Opal.get('Asciidoctor')).$$scope.get('Converter'))).$$scope.get('TemplateConverter'))) != null ? 'constant' : nil); } catch (err) { if (err.$$class === Opal.NameError) { return nil; } else { throw(err); }}; })()) !== nil && $a != null && (!$a.$$is_boolean || $a == true))) {
} else {
self.$require("asciidoctor/converter/template".$to_s())
};
if ((($a = (function(){ try { return ((((((Opal.get('Asciidoctor')).$$scope.get('Converter'))).$$scope.get('CompositeConverter'))) != null ? 'constant' : nil); } catch (err) { if (err.$$class === Opal.NameError) { return nil; } else { throw(err); }}; })()) !== nil && $a != null && (!$a.$$is_boolean || $a == true))) {
} else {
self.$require("asciidoctor/converter/composite".$to_s())
};
template_converter = $scope.get('TemplateConverter').$new(backend, opts['$[]']("template_dirs"), opts);
return $scope.get('CompositeConverter').$new(backend, template_converter, base_converter);
}, TMP_1.$$arity = -2), nil) && 'create'
})($scope.base, null)
})($scope.base)
})($scope.base)
};

/* Generated by Opal 0.10.1 */
Opal.modules["asciidoctor/core_ext/template"] = function(Opal) {
function $rb_plus(lhs, rhs) {
return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs + rhs : lhs['$+'](rhs);
}
var self = Opal.top, $scope = Opal, nil = Opal.nil, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module, $klass = Opal.klass, $hash2 = Opal.hash2;

Opal.add_stubs(['$kind_of?', '$!', '$nil?', '$resolve_template', '$new', '$each', '$join', '$+', '$try_read', '$read', '$node_name', '$raise']);
return (function($base) {
var $Asciidoctor, self = $Asciidoctor = $module($base, 'Asciidoctor');

var def = self.$$proto, $scope = self.$$scope;

(function($base, $super) {
function $TemplateConverter(){};
var self = $TemplateConverter = $klass($base, $super, 'TemplateConverter', $TemplateConverter);

var def = self.$$proto, $scope = self.$$scope, TMP_1, TMP_2, TMP_4, TMP_5, TMP_6;

def.backend = def.engine = def.template_dirs = nil;
Opal.defn(self, '$initialize', TMP_1 = function ːinitialize(backend, template_dirs, opts) {
var $a, self = this;

if (opts == null) {
opts = $hash2([], {});
}
self.backend = backend;
self.engine = "jade";
if ((($a = template_dirs['$kind_of?']($scope.get('String'))) !== nil && $a != null && (!$a.$$is_boolean || $a == true))) {
return self.template_dirs = [template_dirs]
} else {
return self.template_dirs = template_dirs
};
}, TMP_1.$$arity = -3);

Opal.defn(self, '$handles?', TMP_2 = function(name) {
var self = this;

return (self.$resolve_template(name))['$nil?']()['$!']();
}, TMP_2.$$arity = 1);

Opal.defn(self, '$resolve_template', TMP_4 = function ːresolve_template(name) {try {

var $a, $b, TMP_3, self = this, path_resolver = nil, backend = nil, engine = nil;

path_resolver = $scope.get('PathResolver').$new();
backend = self.backend;
engine = self.engine;
($a = ($b = self.template_dirs).$each, $a.$$p = (TMP_3 = function(template_dir){var self = TMP_3.$$s || this, $c, engine_dir = nil, template = nil, content = nil;
if (template_dir == null) template_dir = nil;
if (engine !== false && engine !== nil && engine != null) {
engine_dir = (Opal.get('File').$join(template_dir, engine));
template = Opal.get('File').$join(engine_dir, $rb_plus($rb_plus(name, "."), engine));
if ((($c = (content = self.$try_read(template))) !== nil && $c != null && (!$c.$$is_boolean || $c == true))) {
Opal.ret(content)};};
template = Opal.get('File').$join(template_dir, $rb_plus($rb_plus(name, "."), engine));
if ((($c = (content = self.$try_read(template))) !== nil && $c != null && (!$c.$$is_boolean || $c == true))) {
Opal.ret(content)
} else {
return nil
};}, TMP_3.$$s = self, TMP_3.$$arity = 1, TMP_3), $a).call($b);
return nil;
} catch ($returner) { if ($returner === Opal.returner) { return $returner.$v } throw $returner; }
}, TMP_4.$$arity = 1);

Opal.defn(self, '$try_read', TMP_5 = function ːtry_read(name) {
var self = this;

try {
return Opal.get('File').$read(name)
} catch ($err) {
if (Opal.rescue($err, [$scope.get('IOError')])) {
try {
return nil
} finally { Opal.pop_exception() }
} else { throw $err; }
};
}, TMP_5.$$arity = 1);

return (Opal.defn(self, '$convert', TMP_6 = function ːconvert(node, template_name, opts) {
var $a, self = this, template = nil;

if (template_name == null) {
template_name = nil;
}
if (opts == null) {
opts = $hash2([], {});
}
((($a = template_name) !== false && $a !== nil && $a != null) ? $a : template_name = node.$node_name());
if ((($a = (template = self.$resolve_template(template_name))) !== nil && $a != null && (!$a.$$is_boolean || $a == true))) {
} else {
self.$raise("Could not find a custom template to handle transform: " + (template_name))
};

if (typeof window !== 'undefined') {
var jade = jade || window.jade;
} else if (typeof require !== 'undefined') {
var jade = jade || require('jade');
}
var compiled = jade.compile(template, {pretty: true});
return compiled({ node: node });

}, TMP_6.$$arity = -2), nil) && 'convert';
})($scope.get('Converter'), (($scope.get('Converter')).$$scope.get('Base')))
})($scope.base)
};

/* Generated by Opal 0.10.1 */
(function(Opal) {
var self = Opal.top, $scope = Opal, nil = Opal.nil, $breaker = Opal.breaker, $slice = Opal.slice;

Opal.add_stubs(['$require']);
self.$require("asciidoctor/core_ext/factory");
return self.$require("asciidoctor/core_ext/template");
})(Opal);
12 changes: 12 additions & 0 deletions dist/main.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 66f8233

Please sign in to comment.