Added compiled JavaScript to repository for GitHub pages

This feels like a mistake...
This commit is contained in:
Simon Brooke 2020-10-20 14:44:11 +01:00
parent 3d5a2fb322
commit dc226b1f25
468 changed files with 212152 additions and 2 deletions

View file

@ -0,0 +1,33 @@
(ns reagent.dom.server
(:require [cljsjs.react.dom.server]
[reagent.impl.util :as util]
[reagent.impl.template :as tmpl]
[reagent.ratom :as ratom]
[reagent.interop :refer-macros [$ $!]]))
(defonce ^:private imported nil)
(defn module []
(cond
(some? imported) imported
(exists? js/ReactDOMServer) (set! imported js/ReactDOMServer)
(exists? js/require) (or (set! imported (js/require "react-dom/server"))
(throw (js/Error.
"require('react-dom/server') failed")))
:else
(throw (js/Error. "js/ReactDOMServer is missing"))))
(defn render-to-string
"Turns a component into an HTML string."
[component]
(ratom/flush!)
(binding [util/*non-reactive* true]
($ (module) renderToString (tmpl/as-element component))))
(defn render-to-static-markup
"Turns a component into an HTML string, without data-react-id attributes, etc."
[component]
(ratom/flush!)
(binding [util/*non-reactive* true]
($ (module) renderToStaticMarkup (tmpl/as-element component))))

View file

@ -0,0 +1 @@
{:rename-macros {}, :renames {}, :use-macros {$! reagent.interop, $ reagent.interop}, :excludes #{}, :name reagent.dom.server, :imports nil, :requires {cljsjs.react.dom.server cljsjs.react.dom.server, util reagent.impl.util, reagent.impl.util reagent.impl.util, tmpl reagent.impl.template, reagent.impl.template reagent.impl.template, ratom reagent.ratom, reagent.ratom reagent.ratom, reagent.interop reagent.interop}, :uses nil, :defs {imported {:name reagent.dom.server/imported, :file "docs/js/compiled/out/reagent/dom/server.cljs", :line 8, :column 1, :end-line 8, :end-column 28, :private true, :meta {:file "/Users/simon/workspace/swinging-needle-meter/docs/js/compiled/out/reagent/dom/server.cljs", :line 8, :column 20, :end-line 8, :end-column 28, :private true}}, module {:protocol-inline nil, :meta {:file "/Users/simon/workspace/swinging-needle-meter/docs/js/compiled/out/reagent/dom/server.cljs", :line 10, :column 7, :end-line 10, :end-column 13, :arglists (quote ([]))}, :name reagent.dom.server/module, :variadic false, :file "docs/js/compiled/out/reagent/dom/server.cljs", :end-column 13, :method-params ([]), :protocol-impl nil, :arglists-meta (nil nil), :column 1, :line 10, :end-line 10, :max-fixed-arity 0, :fn-var true, :arglists (quote ([]))}, render-to-string {:protocol-inline nil, :meta {:file "/Users/simon/workspace/swinging-needle-meter/docs/js/compiled/out/reagent/dom/server.cljs", :line 21, :column 7, :end-line 21, :end-column 23, :arglists (quote ([component])), :doc "Turns a component into an HTML string."}, :name reagent.dom.server/render-to-string, :variadic false, :file "docs/js/compiled/out/reagent/dom/server.cljs", :end-column 23, :method-params ([component]), :protocol-impl nil, :arglists-meta (nil nil), :column 1, :line 21, :end-line 21, :max-fixed-arity 1, :fn-var true, :arglists (quote ([component])), :doc "Turns a component into an HTML string."}, render-to-static-markup {:protocol-inline nil, :meta {:file "/Users/simon/workspace/swinging-needle-meter/docs/js/compiled/out/reagent/dom/server.cljs", :line 28, :column 7, :end-line 28, :end-column 30, :arglists (quote ([component])), :doc "Turns a component into an HTML string, without data-react-id attributes, etc."}, :name reagent.dom.server/render-to-static-markup, :variadic false, :file "docs/js/compiled/out/reagent/dom/server.cljs", :end-column 30, :method-params ([component]), :protocol-impl nil, :arglists-meta (nil nil), :column 1, :line 28, :end-line 28, :max-fixed-arity 1, :fn-var true, :arglists (quote ([component])), :doc "Turns a component into an HTML string, without data-react-id attributes, etc."}}, :require-macros {ratom reagent.ratom, reagent.ratom reagent.ratom, reagent.interop reagent.interop}, :cljs.analyzer/constants {:seen #{:else}, :order [:else]}, :doc nil}

View file

@ -0,0 +1,59 @@
// Compiled by ClojureScript 1.9.229 {}
goog.provide('reagent.dom.server');
goog.require('cljs.core');
goog.require('cljsjs.react.dom.server');
goog.require('reagent.impl.util');
goog.require('reagent.impl.template');
goog.require('reagent.ratom');
goog.require('reagent.interop');
if(typeof reagent.dom.server.imported !== 'undefined'){
} else {
reagent.dom.server.imported = null;
}
reagent.dom.server.module = (function reagent$dom$server$module(){
if(cljs.core.some_QMARK_.call(null,reagent.dom.server.imported)){
return reagent.dom.server.imported;
} else {
if(typeof ReactDOMServer !== 'undefined'){
return reagent.dom.server.imported = ReactDOMServer;
} else {
if(typeof require !== 'undefined'){
var or__25130__auto__ = reagent.dom.server.imported = require("react-dom/server");
if(cljs.core.truth_(or__25130__auto__)){
return or__25130__auto__;
} else {
throw (new Error("require('react-dom/server') failed"));
}
} else {
throw (new Error("js/ReactDOMServer is missing"));
}
}
}
});
/**
* Turns a component into an HTML string.
*/
reagent.dom.server.render_to_string = (function reagent$dom$server$render_to_string(component){
reagent.ratom.flush_BANG_.call(null);
var _STAR_non_reactive_STAR_26899 = reagent.impl.util._STAR_non_reactive_STAR_;
reagent.impl.util._STAR_non_reactive_STAR_ = true;
try{return (reagent.dom.server.module.call(null)["renderToString"])(reagent.impl.template.as_element.call(null,component));
}finally {reagent.impl.util._STAR_non_reactive_STAR_ = _STAR_non_reactive_STAR_26899;
}});
/**
* Turns a component into an HTML string, without data-react-id attributes, etc.
*/
reagent.dom.server.render_to_static_markup = (function reagent$dom$server$render_to_static_markup(component){
reagent.ratom.flush_BANG_.call(null);
var _STAR_non_reactive_STAR_26901 = reagent.impl.util._STAR_non_reactive_STAR_;
reagent.impl.util._STAR_non_reactive_STAR_ = true;
try{return (reagent.dom.server.module.call(null)["renderToStaticMarkup"])(reagent.impl.template.as_element.call(null,component));
}finally {reagent.impl.util._STAR_non_reactive_STAR_ = _STAR_non_reactive_STAR_26901;
}});
//# sourceMappingURL=server.js.map?rel=1603199188840

View file

@ -0,0 +1 @@
{"version":3,"file":"\/Users\/simon\/workspace\/swinging-needle-meter\/docs\/js\/compiled\/out\/reagent\/dom\/server.js","sources":["server.cljs?rel=1603199188841"],"lineCount":59,"mappings":";AAAA;;;;;;;AAOA,GAAA,OAAmBA;AAAnB;AAAA,AAAA,8BAAA,9BAAmBA;;AAEnB,4BAAA,5BAAMC;AAAN,AACE,GACE,AAACC,gCAAMF;AAAUA;;AADnB,GAEE,OAASG;AAAmB,OAAMH,8BAASG;;AAF7C,GAGE,OAASC;AAAY,IAAAC,oBAAI,AAAML,8BAAS,QAAA,RAACI;AAApB,AAAA,oBAAAC;AAAAA;;AACI,MAAO,KAAAC,MAAA;;;AAJlC,AAOE,MAAO,KAAAA,MAAA;;;;;;AAGX;;;sCAAA,tCAAMC,oFAEHC;AAFH,AAGE,AAACC;;AACD,IAAAC,gCAAUC;AAAV,AAAA,6CAAA,7CAAUA;;AAAV,IAAA,AACE,OAAA,sCAAA,rCAAG,AAACV,wDAAuB,AAACW,2CAAgBJ;UAD9C,AAAA,6CAAAE,7CAAUC;;AAGZ;;;6CAAA,7CAAME,kGAEHL;AAFH,AAGE,AAACC;;AACD,IAAAK,gCAAUH;AAAV,AAAA,6CAAA,7CAAUA;;AAAV,IAAA,AACE,OAAA,sCAAA,rCAAG,AAACV,8DAA6B,AAACW,2CAAgBJ;UADpD,AAAA,6CAAAM,7CAAUH","names":["reagent.dom.server\/imported","reagent.dom.server\/module","cljs.core\/some?","js\/ReactDOMServer","js\/require","or__25130__auto__","js\/Error","reagent.dom.server\/render-to-string","component","reagent.ratom\/flush!","*non-reactive*26899","reagent.impl.util\/*non-reactive*","reagent.impl.template\/as-element","reagent.dom.server\/render-to-static-markup","*non-reactive*26901"]}