Migrate old externs 5/x

This commit is contained in:
2026-06-15 07:12:40 +08:00
parent 4f2131e317
commit a912d45b9a
24 changed files with 153 additions and 86 deletions
+2 -14
View File
@@ -3,23 +3,11 @@
The current backend Js/Css services for [my blog](https://blog.astropenguin.net)
### Try it - Docker for windows (using windows container with nanoserver)
- docker -f windows/docker-compose.yml build
- docker -f windows/docker-compose.yml up
### Try it
`make build`
### Features
- Compressable by Closure Compiler (Advanced Compression)
- Python-like, class oriented syntax structure
- Everything is merged into one file for that page
- css class inheritance
### Documentation
- Will be added later
### Prerequisties
- python3
- virtualenv ( optional )
- pip install Flask
- pip install Celery
- pip install redis
- pip install compressinja
+1 -1
View File
@@ -13,7 +13,7 @@
/** @param {Astro.Blog.AstroEdit.Article} article */
var Draft = function ( article, draftsUri )
{
/** @type {Astro.Blog.AstroEdit.Article} */
/** @type {typeof Astro.Blog.AstroEdit.Article} */
var Article = ns[ NS_INVOKE ]( "Article" );
if ( !( article instanceof Article ) ) return;
+1 -1
View File
@@ -182,7 +182,7 @@
}
}
Flag.prototype.getSetData = function () { };
Flag.prototype.getData = function () { };
Flag.prototype.setForView = function ( flagList ) { };
ns[ NS_EXPORT ]( EX_CLASS, "Flag", Flag );
@@ -762,6 +762,8 @@
Dand.id( "asl_refresh", true ).addEventListener( "click", function( e ) { refreshCanvas( 0 ); } );
new IDOMObject( document ).addEventListeners([ dKeyUp, dKeyDown ]);
stage.addEventListener(showLibrary);
this.stage = stage;
};
ns[ NS_EXPORT ]( EX_CLASS, "SiteLibrary", SiteLibrary );
@@ -69,6 +69,7 @@
this.title = title;
this.desc = desc;
this.__cands = [];
/** @type Array<Astro.Blog.AstroEdit.SmartInput.Definition> */
this.__defs = defs || {};
this.Empty = !defs;
};
@@ -79,7 +80,6 @@
for( var i in this.__defs )
{
/** @param {Astro.Blog.AstroEdit.SmartInput.Definition} */
var c = this.__defs[i];
this.__cands.push( Dand.wrapc( "cn", [ i, Dand.wrapc( "desc", c.desc ) ], new DataKey( "key", i ) ) );
}
+7 -7
View File
@@ -11,19 +11,19 @@
var Bootstrap = __import( "Astro.Bootstrap" );
/** @type {Astro.Blog.Config} */
var Config = __import( "Astro.Blog.Config" );
/** @type {Astro.Blog.AstroEdit.Article} */
/** @type {typeof Astro.Blog.AstroEdit.Article} */
var Article = __import( "Astro.Blog.AstroEdit.Article" );
/** @type {Astro.Blog.AstroEdit.Draft} */
/** @type {typeof Astro.Blog.AstroEdit.Draft} */
var Draft = __import( "Astro.Blog.AstroEdit.Draft" );
/** @type {Astro.Blog.AstroEdit.Flag} */
/** @type {typeof Astro.Blog.AstroEdit.Flag} */
var Flag = __import( "Astro.Blog.AstroEdit.Flag" );
/** @type {Astro.Blog.AstroEdit.Visualizer} */
/** @type {typeof Astro.Blog.AstroEdit.Visualizer} */
var Visualizer = __import( "Astro.Blog.AstroEdit.Visualizer" );
/** @type {Astro.Blog.AstroEdit.Uploader} */
/** @type {typeof Astro.Blog.AstroEdit.Uploader} */
var Uploader = __import( "Astro.Blog.AstroEdit.Uploader" );
/** @type {Astro.Blog.AstroEdit.SiteLibrary} */
/** @type {typeof Astro.Blog.AstroEdit.SiteLibrary} */
var SiteLibrary = __import( "Astro.Blog.AstroEdit.SiteLibrary" );
/** @type {Components.Vim.VimArea} */
/** @type {typeof Components.Vim.VimArea} */
var VimArea = __import( "Components.Vim.VimArea" );
// calls the smart bar
-1
View File
@@ -45,7 +45,6 @@
};
};
/* stage @param {function(...?): Dandelion.IDOMElement} */
var VimArea = function( stage, detectScreenSize )
{
if( !stage ) throw new Error( "Invalid argument" );
+1 -3
View File
@@ -27,7 +27,7 @@ var __const = __static_method;
/*{{{ BotanEvent & EventDispatcher */
/** @type {typeof BotanEvent} */
/** @type {typeof _BotanEvent} */
var BotanEvent;
BotanEvent = function( name, data )
@@ -70,7 +70,6 @@ BotanEvent = function( name, data )
/**
* @constructor
* @implements {EventTarget}
*/
var EventDispatcher = function() {
var events = {};
@@ -245,7 +244,6 @@ var TGR_IMPORT = 0;
// some core methods
var sGarden = window["BotanJS"];
/** @type {BotanJS} */
var BotanJS = null;
var __namespace = null;
var __import = null;
@@ -1,5 +1,9 @@
/** @constructor */
Astro.Blog.AstroEdit.Article = function(){};
/** @constructor
* @params {string} set_article_uri
* @params {Array<Astro.Blog.AstroEdit.Flag>} plugins
*/
Astro.Blog.AstroEdit.Article = function(set_article_uri, plugins){};
/** @type {Function} */
Astro.Blog.AstroEdit.Article.saveOrBackup;
/** @type {Function} */
@@ -0,0 +1,6 @@
/**
* @constructor
* @param {Astro.Blog.AstroEdit.Article} article
* @param {string} url
*/
Astro.Blog.AstroEdit.Draft = function(article, url) {};
@@ -0,0 +1,8 @@
/**
* @constructor
* @implements {Astro.Blog.AstroEdit.IPlugin}
* @param {string} id
* @param {string} target
* @param {!_AstConf_.AstroEditFlags} flagConf
*/
Astro.Blog.AstroEdit.Flag = function(id, target, flagConf) {};
@@ -1,8 +1,18 @@
/** @constructor Plugin Interface */
Astro.Blog.AstroEdit.IPlugin = function(){};
/**
* @interface
*/
Astro.Blog.AstroEdit.IPlugin = function() {};
/** @type {string} */
Astro.Blog.AstroEdit.IPlugin.id;
/** @type {Function} */
Astro.Blog.AstroEdit.IPlugin.setFromData;
/** @type {Function} */
Astro.Blog.AstroEdit.IPlugin.getData;
Astro.Blog.AstroEdit.IPlugin.prototype.id;
/**
* @param {*} data
* @return {void}
*/
Astro.Blog.AstroEdit.IPlugin.prototype.setForView = function(data) {};
/**
* @return {*}
*/
Astro.Blog.AstroEdit.IPlugin.prototype.getData = function() {};
@@ -0,0 +1,7 @@
/**
* @constructor
* @param {string} base_path
* @param {string} get_uri
* @param {string} set_uri
*/
Astro.Blog.AstroEdit.SiteLibrary = function(base_path, get_uri, set_uri) {};
@@ -0,0 +1,5 @@
/**
* @constructor
* @param {string} set_file_uri
*/
Astro.Blog.AstroEdit.Uploader = function(set_file_uri) {};
@@ -1,5 +1,9 @@
/** @constructor */
Astro.Blog.AstroEdit.Visualizer = function(){};
/** @constructor
* @param {Astro.Blog.AstroEdit.Article} e_document
* @param {HTMLElement|Dandelion.IDOMElement} controls
* @param {string} service_uri
*/
Astro.Blog.AstroEdit.Visualizer = function(e_document, controls, service_uri){};
/** @type {Function} */
Astro.Blog.AstroEdit.Visualizer.setContentDiv;
/** @type {Function} */
+15 -11
View File
@@ -2,18 +2,22 @@
* @param {string} name
* @param {*} data
**/
var BotanEvent = function (name, data){};
var _BotanEvent = function (name, data){};
/** @type {function(): void} */
_BotanEvent.propagate = function() {};
/** @type {function(): void} */
_BotanEvent.stopPropagating = function() {};
/** @type {function(): boolean} */
_BotanEvent.propagating = function() {};
/** @type {*} */
BotanEvent.data;
_BotanEvent.prototype.data;
/** @type {Function} */
BotanEvent.propagate = function() {};
/** @type {Function} */
BotanEvent.stopPropagating = function() {};
/** @type {function(*): void} */
_BotanEvent.prototype.setTarget;
/** @type {Boolean} */
BotanEvent.propagating;
/** @type {Function} */
BotanEvent.setTarget;
/** @type {string} */
_BotanEvent.prototype.type;
@@ -1,7 +1,9 @@
/** @constructor
* @extends {EventDispatcher}
* @param {Element} stage
* @param {boolean} detectScreenSize
*/
Components.Vim.VimArea = function(){};
Components.Vim.VimArea = function(stage, detectScreenSize){};
/** @type {Components.Vim.LineFeeder} */
Components.Vim.VimArea.contentFeeder;
+22 -8
View File
@@ -1,11 +1,25 @@
/** @constructor */
System.utils = function (){}
/** @type {Function} */
System.utils.objGetProp;
/** @type {Function} */
System.utils.objSearch;
/** @type {Function} */
System.utils.objMap;
/** @type {Function} */
System.utils.siteProto;
/**
* @param {*} obj
* @param {string} prop
* @param {string} type
*/
System.utils.prototype.objGetProp = function(obj, prop, type) {};
/**
* @param {*} obj
* @param {function(*): boolean} cond
* @param {string} prop
*/
System.utils.prototype.objSearch = function(obj, cond, prop) {};
/**
* @param {*} obj
* @param {function(*): *} callback
*/
System.utils.prototype.objMap = function(obj, callback) {};
/** @type {function(string): string} */
System.utils.prototype.siteProto = function(path){};
+10 -11
View File
@@ -1,13 +1,10 @@
/**
* @typedef {{
* article_id: string,
* paths: !_AstConf_.AstroEdit.Paths,
* tags: !Object<string, *>,
* sections: !Object<string, *>,
* flags: !_AstConf_.AstroEdit.Flags
* URICount: string,
* URISet: string
* }}
*/
_AstConf_.AstroEdit;
_AstConf_.AstroEditFlags;
/**
* @typedef {{
@@ -16,15 +13,17 @@ _AstConf_.AstroEdit;
* list_articles: string,
* get_drafts: string,
* get_files: string,
* set_file: string
* set_file: string,
* tags: !_AstConf_.AstroEditFlags,
* sections: !_AstConf_.AstroEditFlags
* }}
*/
_AstConf_.AstroEdit.Paths;
_AstConf_.AstroEditPaths;
/**
* @typedef {{
* URICount: string,
* URISet: string
* article_id: string,
* paths: !_AstConf_.AstroEditPaths
* }}
*/
_AstConf_.AstroEdit.Flags;
_AstConf_.AstroEdit;
+1 -1
View File
@@ -107,7 +107,7 @@ func (h handler) index(w http.ResponseWriter, req *http.Request) {
},
},
Defines: map[string]any{
"DEBUG": false,
"DEFINE_DEBUG": false,
},
},
})
@@ -2,5 +2,5 @@ package generated
const (
IMAGE_TAG = "dev"
Timestamp = "20260614.213626"
Timestamp = "20260614.231020"
)
+12 -12
View File
@@ -7,12 +7,12 @@ var ClassMap = &classmap.Map{
Symbols: map[string]classmap.Symbol{
"Astro": {Name: "Astro", Kind: "class", Parent: "", Imports: []string(nil), Resource: classmap.Resource{Src: "", JSHash: "", CSSHash: ""}},
"Astro.Blog": {Name: "Astro.Blog", Kind: "class", Parent: "Astro", Imports: []string(nil), Resource: classmap.Resource{Src: "", JSHash: "", CSSHash: ""}},
"Astro.Blog.AstroEdit": {Name: "Astro.Blog.AstroEdit", Kind: "class", Parent: "Astro.Blog", Imports: []string{"System.utils", "System.Cycle", "Dandelion", "Astro.Bootstrap", "Astro.Blog.Config", "Astro.Blog.AstroEdit.Article", "Astro.Blog.AstroEdit.Draft", "Astro.Blog.AstroEdit.Flag", "Astro.Blog.AstroEdit.Visualizer", "Astro.Blog.AstroEdit.Uploader", "Astro.Blog.AstroEdit.SiteLibrary", "Components.Vim.VimArea", "Astro.Blog.AstroEdit.SmartInput", "Astro.Blog.SharedStyle"}, Resource: classmap.Resource{Src: "Astro/Blog/AstroEdit/_this.js", JSHash: "c21f6a1de562e3365d7874696d7e791074f935c1", CSSHash: "2d37776089eeac5d81981f100c1c029c9249e4a9"}},
"Astro.Blog.AstroEdit": {Name: "Astro.Blog.AstroEdit", Kind: "class", Parent: "Astro.Blog", Imports: []string{"System.utils", "System.Cycle", "Dandelion", "Astro.Bootstrap", "Astro.Blog.Config", "Astro.Blog.AstroEdit.Article", "Astro.Blog.AstroEdit.Draft", "Astro.Blog.AstroEdit.Flag", "Astro.Blog.AstroEdit.Visualizer", "Astro.Blog.AstroEdit.Uploader", "Astro.Blog.AstroEdit.SiteLibrary", "Components.Vim.VimArea", "Astro.Blog.AstroEdit.SmartInput", "Astro.Blog.SharedStyle"}, Resource: classmap.Resource{Src: "Astro/Blog/AstroEdit/_this.js", JSHash: "92ff148e1e100a172d0583f22fff03fa277840ce", CSSHash: "2d37776089eeac5d81981f100c1c029c9249e4a9"}},
"Astro.Blog.AstroEdit.Article": {Name: "Astro.Blog.AstroEdit.Article", Kind: "class", Parent: "Astro.Blog.AstroEdit", Imports: []string{"System.Cycle", "System.utils", "System.utils.EventKey", "System.Debug", "Components.MessageBox", "Dandelion", "Dandelion.IDOMObject", "Dandelion.IDOMElement", "Astro.Blog.Config", "Astro.Blog.Components.Bubble", "System.Net.postData", "Astro.utils.Date.pretty", "Astro.Blog.AstroEdit.Visualizer", "Astro.Blog.AstroEdit.Flag", "Astro.Blog.AstroEdit.Draft"}, Resource: classmap.Resource{Src: "Astro/Blog/AstroEdit/Article.js", JSHash: "de5683e8ccc580958a5e8f66feacb58ca0fbd4f7", CSSHash: "1"}},
"Astro.Blog.AstroEdit.Draft": {Name: "Astro.Blog.AstroEdit.Draft", Kind: "class", Parent: "Astro.Blog.AstroEdit", Imports: []string{"System.Cycle", "System.utils.IKey", "Dandelion", "System.Net.postData", "Astro.Blog.AstroEdit.Article"}, Resource: classmap.Resource{Src: "Astro/Blog/AstroEdit/Draft.js", JSHash: "f1d8d898abde5d705dec0c1fc759ee71d368d89a", CSSHash: "1"}},
"Astro.Blog.AstroEdit.Flag": {Name: "Astro.Blog.AstroEdit.Flag", Kind: "class", Parent: "Astro.Blog.AstroEdit", Imports: []string{"System.Debug", "Components.MessageBox", "Dandelion", "Dandelion.IDOMElement", "Astro.Blog.Config", "System.Net.postData"}, Resource: classmap.Resource{Src: "Astro/Blog/AstroEdit/Flag.js", JSHash: "365be7deb7a621cc7379d8c0d902a45ecceb9ee7", CSSHash: "2af9897e11ed5f3c3a750ce5488c9d91e46c6c58"}},
"Astro.Blog.AstroEdit.SiteLibrary": {Name: "Astro.Blog.AstroEdit.SiteLibrary", Kind: "class", Parent: "Astro.Blog.AstroEdit", Imports: []string{"System.Cycle", "System.Debug", "System.utils.Perf", "System.utils.IKey", "System.utils.DataKey", "System.utils.EventKey", "Components.MessageBox", "Components.Mouse.ContextMenu", "Dandelion", "Dandelion.IDOMObject", "Dandelion.IDOMElement", "Astro.Blog.Config", "System.Net.postData", "Astro.utils.Date.pretty"}, Resource: classmap.Resource{Src: "Astro/Blog/AstroEdit/SiteLibrary.js", JSHash: "06de454d725addb1640bd305b901d385798c3bea", CSSHash: "ef9290487558512fa1db9a4a20b91aa8421b4b26"}},
"Astro.Blog.AstroEdit.SmartInput": {Name: "Astro.Blog.AstroEdit.SmartInput", Kind: "class", Parent: "Astro.Blog.AstroEdit", Imports: []string{"Dandelion", "Dandelion.IDOMElement", "Dandelion.IDOMObject", "System.Cycle", "System.Debug", "System.Net.ClassLoader", "System.utils", "System.utils.DataKey", "System.utils.IKey", "Components.MessageBox", "Astro.Blog.Config"}, Resource: classmap.Resource{Src: "Astro/Blog/AstroEdit/SmartInput/_this.js", JSHash: "69d20f62e5f394c2d63537b201c54883d9d7d85f", CSSHash: "4cd01e0c87e41c384afe9d9d5fb9d545bd51bd38"}},
"Astro.Blog.AstroEdit.Draft": {Name: "Astro.Blog.AstroEdit.Draft", Kind: "class", Parent: "Astro.Blog.AstroEdit", Imports: []string{"System.Cycle", "System.utils.IKey", "Dandelion", "System.Net.postData", "Astro.Blog.AstroEdit.Article"}, Resource: classmap.Resource{Src: "Astro/Blog/AstroEdit/Draft.js", JSHash: "3949dd12c90e92b3f792b86841fd72c2482a18d5", CSSHash: "1"}},
"Astro.Blog.AstroEdit.Flag": {Name: "Astro.Blog.AstroEdit.Flag", Kind: "class", Parent: "Astro.Blog.AstroEdit", Imports: []string{"System.Debug", "Components.MessageBox", "Dandelion", "Dandelion.IDOMElement", "Astro.Blog.Config", "System.Net.postData"}, Resource: classmap.Resource{Src: "Astro/Blog/AstroEdit/Flag.js", JSHash: "31bdc37b8e995c6defd12c3a4dd743e27abdaa4d", CSSHash: "2af9897e11ed5f3c3a750ce5488c9d91e46c6c58"}},
"Astro.Blog.AstroEdit.SiteLibrary": {Name: "Astro.Blog.AstroEdit.SiteLibrary", Kind: "class", Parent: "Astro.Blog.AstroEdit", Imports: []string{"System.Cycle", "System.Debug", "System.utils.Perf", "System.utils.IKey", "System.utils.DataKey", "System.utils.EventKey", "Components.MessageBox", "Components.Mouse.ContextMenu", "Dandelion", "Dandelion.IDOMObject", "Dandelion.IDOMElement", "Astro.Blog.Config", "System.Net.postData", "Astro.utils.Date.pretty"}, Resource: classmap.Resource{Src: "Astro/Blog/AstroEdit/SiteLibrary.js", JSHash: "09a9a043d155709d787fd75706ccd1bd05425d6e", CSSHash: "ef9290487558512fa1db9a4a20b91aa8421b4b26"}},
"Astro.Blog.AstroEdit.SmartInput": {Name: "Astro.Blog.AstroEdit.SmartInput", Kind: "class", Parent: "Astro.Blog.AstroEdit", Imports: []string{"Dandelion", "Dandelion.IDOMElement", "Dandelion.IDOMObject", "System.Cycle", "System.Debug", "System.Net.ClassLoader", "System.utils", "System.utils.DataKey", "System.utils.IKey", "Components.MessageBox", "Astro.Blog.Config"}, Resource: classmap.Resource{Src: "Astro/Blog/AstroEdit/SmartInput/_this.js", JSHash: "c4b42f193f02a00b79ef82e4fb0801202348ef1b", CSSHash: "4cd01e0c87e41c384afe9d9d5fb9d545bd51bd38"}},
"Astro.Blog.AstroEdit.SmartInput.CandidateAction": {Name: "Astro.Blog.AstroEdit.SmartInput.CandidateAction", Kind: "class", Parent: "Astro.Blog.AstroEdit.SmartInput", Imports: []string(nil), Resource: classmap.Resource{Src: "", JSHash: "", CSSHash: ""}},
"Astro.Blog.AstroEdit.SmartInput.CandidateAction.ArticleContent": {Name: "Astro.Blog.AstroEdit.SmartInput.CandidateAction.ArticleContent", Kind: "class", Parent: "Astro.Blog.AstroEdit.SmartInput.CandidateAction", Imports: []string{"Astro.Blog.Config", "System.Net.getData", "Astro.utils.Date.pretty"}, Resource: classmap.Resource{Src: "Astro/Blog/AstroEdit/SmartInput/CandidateAction/ArticleReference.js", JSHash: "2e66502daabb251f22f83535899c3c282f32a2c0", CSSHash: "1"}},
"Astro.Blog.AstroEdit.SmartInput.CandidateAction.ArticleReference": {Name: "Astro.Blog.AstroEdit.SmartInput.CandidateAction.ArticleReference", Kind: "class", Parent: "Astro.Blog.AstroEdit.SmartInput.CandidateAction", Imports: []string{"Astro.Blog.Config", "System.Net.getData", "Astro.utils.Date.pretty"}, Resource: classmap.Resource{Src: "Astro/Blog/AstroEdit/SmartInput/CandidateAction/ArticleReference.js", JSHash: "2e66502daabb251f22f83535899c3c282f32a2c0", CSSHash: "1"}},
@@ -179,7 +179,7 @@ var ClassMap = &classmap.Map{
"Components.Vim.Syntax.Analyzer": {Name: "Components.Vim.Syntax.Analyzer", Kind: "class", Parent: "Components.Vim.Syntax", Imports: []string{"System.Debug", "Components.Vim.Beep", "Components.Vim.Syntax.Word"}, Resource: classmap.Resource{Src: "Components/Vim/Syntax/Analyzer.js", JSHash: "64b9a2ae4c6ba0f9fdc0dda87323786df6c6b339", CSSHash: "1"}},
"Components.Vim.Syntax.TokenMatch": {Name: "Components.Vim.Syntax.TokenMatch", Kind: "class", Parent: "Components.Vim.Syntax", Imports: []string{"System.Debug", "Components.Vim.Beep", "Components.Vim.Syntax.Word"}, Resource: classmap.Resource{Src: "Components/Vim/Syntax/Analyzer.js", JSHash: "64b9a2ae4c6ba0f9fdc0dda87323786df6c6b339", CSSHash: "1"}},
"Components.Vim.Syntax.Word": {Name: "Components.Vim.Syntax.Word", Kind: "class", Parent: "Components.Vim.Syntax", Imports: []string(nil), Resource: classmap.Resource{Src: "Components/Vim/Syntax/Word.js", JSHash: "a6d24370b0906cc0f09cfd68d96d635cd583fac3", CSSHash: "1"}},
"Components.Vim.VimArea": {Name: "Components.Vim.VimArea", Kind: "class", Parent: "Components.Vim", Imports: []string{"Dandelion.IDOMElement", "System.utils.DataKey", "System.utils.EventKey", "System.Cycle", "System.Debug", "Components.Vim.State.Registers", "Components.Vim.State.Marks", "Components.Vim.Syntax.Analyzer", "Components.Vim.LineFeeder", "Components.Vim.StatusBar", "Components.Vim.Controls", "Components.Vim.ActionEvent", "Components.Vim.Message"}, Resource: classmap.Resource{Src: "Components/Vim/VimArea.js", JSHash: "dda35cb49939da6a71d08f68a85435f68d64e283", CSSHash: "1"}},
"Components.Vim.VimArea": {Name: "Components.Vim.VimArea", Kind: "class", Parent: "Components.Vim", Imports: []string{"Dandelion.IDOMElement", "System.utils.DataKey", "System.utils.EventKey", "System.Cycle", "System.Debug", "Components.Vim.State.Registers", "Components.Vim.State.Marks", "Components.Vim.Syntax.Analyzer", "Components.Vim.LineFeeder", "Components.Vim.StatusBar", "Components.Vim.Controls", "Components.Vim.ActionEvent", "Components.Vim.Message"}, Resource: classmap.Resource{Src: "Components/Vim/VimArea.js", JSHash: "9639b24336a69aba93eda2e61fc127fe8e78c9dd", CSSHash: "1"}},
"Dandelion": {Name: "Dandelion", Kind: "class", Parent: "", Imports: []string{"System.Global.IE", "System.utils.IKey"}, Resource: classmap.Resource{Src: "Dandelion/_this.js", JSHash: "27db6b49f6b23b1a3e7e905932525a81621e0b8f", CSSHash: "1"}},
"Dandelion.CSSAnimations": {Name: "Dandelion.CSSAnimations", Kind: "class", Parent: "Dandelion", Imports: []string(nil), Resource: classmap.Resource{Src: "Dandelion/CSSAnimations/_this.js", JSHash: "a01a6bcfc5851debc7179e9449dc93617bca3afc", CSSHash: "2d6b4b00f0c4050187ccf010e0a24e5bc6121d18"}},
"Dandelion.CSSAnimations.MouseOverMovie": {Name: "Dandelion.CSSAnimations.MouseOverMovie", Kind: "method", Parent: "Dandelion.CSSAnimations", Imports: []string(nil), Resource: classmap.Resource{Src: "Dandelion/CSSAnimations/MovieClip.js", JSHash: "5667064818a0ca32f11a9b5a27ed641058e9df6c", CSSHash: "daa6e6f4ee3365e599cf1b2680f3e907389534f3"}},
@@ -316,13 +316,13 @@ var ClassMap = &classmap.Map{
},
Files: map[string]classmap.Resource{
"Astro/Blog/AstroEdit/Article.js": {Src: "Astro/Blog/AstroEdit/Article.js", JSHash: "de5683e8ccc580958a5e8f66feacb58ca0fbd4f7", CSSHash: "1"},
"Astro/Blog/AstroEdit/Draft.js": {Src: "Astro/Blog/AstroEdit/Draft.js", JSHash: "f1d8d898abde5d705dec0c1fc759ee71d368d89a", CSSHash: "1"},
"Astro/Blog/AstroEdit/Flag.js": {Src: "Astro/Blog/AstroEdit/Flag.js", JSHash: "365be7deb7a621cc7379d8c0d902a45ecceb9ee7", CSSHash: "2af9897e11ed5f3c3a750ce5488c9d91e46c6c58"},
"Astro/Blog/AstroEdit/SiteLibrary.js": {Src: "Astro/Blog/AstroEdit/SiteLibrary.js", JSHash: "06de454d725addb1640bd305b901d385798c3bea", CSSHash: "ef9290487558512fa1db9a4a20b91aa8421b4b26"},
"Astro/Blog/AstroEdit/Draft.js": {Src: "Astro/Blog/AstroEdit/Draft.js", JSHash: "3949dd12c90e92b3f792b86841fd72c2482a18d5", CSSHash: "1"},
"Astro/Blog/AstroEdit/Flag.js": {Src: "Astro/Blog/AstroEdit/Flag.js", JSHash: "31bdc37b8e995c6defd12c3a4dd743e27abdaa4d", CSSHash: "2af9897e11ed5f3c3a750ce5488c9d91e46c6c58"},
"Astro/Blog/AstroEdit/SiteLibrary.js": {Src: "Astro/Blog/AstroEdit/SiteLibrary.js", JSHash: "09a9a043d155709d787fd75706ccd1bd05425d6e", CSSHash: "ef9290487558512fa1db9a4a20b91aa8421b4b26"},
"Astro/Blog/AstroEdit/SmartInput/CandidateAction/ArticleReference.js": {Src: "Astro/Blog/AstroEdit/SmartInput/CandidateAction/ArticleReference.js", JSHash: "2e66502daabb251f22f83535899c3c282f32a2c0", CSSHash: "1"},
"Astro/Blog/AstroEdit/SmartInput/CandidateAction/Footnote.js": {Src: "Astro/Blog/AstroEdit/SmartInput/CandidateAction/Footnote.js", JSHash: "e308b387915865640c00c1c172c20482adaa1e46", CSSHash: "1"},
"Astro/Blog/AstroEdit/SmartInput/CandidateAction/Heading.js": {Src: "Astro/Blog/AstroEdit/SmartInput/CandidateAction/Heading.js", JSHash: "65e852a90c2dddce5931f45f841ec932e3b35e59", CSSHash: "1"},
"Astro/Blog/AstroEdit/SmartInput/_this.js": {Src: "Astro/Blog/AstroEdit/SmartInput/_this.js", JSHash: "69d20f62e5f394c2d63537b201c54883d9d7d85f", CSSHash: "4cd01e0c87e41c384afe9d9d5fb9d545bd51bd38"},
"Astro/Blog/AstroEdit/SmartInput/_this.js": {Src: "Astro/Blog/AstroEdit/SmartInput/_this.js", JSHash: "c4b42f193f02a00b79ef82e4fb0801202348ef1b", CSSHash: "4cd01e0c87e41c384afe9d9d5fb9d545bd51bd38"},
"Astro/Blog/AstroEdit/Uploader.js": {Src: "Astro/Blog/AstroEdit/Uploader.js", JSHash: "7205f45c289ec5a9b39cf06c3c42f31d1286cba9", CSSHash: "1"},
"Astro/Blog/AstroEdit/Visualizer/Snippet/AcquireLib.js": {Src: "Astro/Blog/AstroEdit/Visualizer/Snippet/AcquireLib.js", JSHash: "7af9a09fbf17d439fb810b3485609c4bbd816729", CSSHash: "e3860ca0ac69a86e948b811da1ebf6ba85fad57f"},
"Astro/Blog/AstroEdit/Visualizer/Snippet/ArticleContent.js": {Src: "Astro/Blog/AstroEdit/Visualizer/Snippet/ArticleContent.js", JSHash: "83817c1b1e8c73a598e1c090d3dae8fb341bcebe", CSSHash: "e1cfcf676ebfc3a9ab80139ab2f7e63a2a1b286f"},
@@ -341,7 +341,7 @@ var ClassMap = &classmap.Map{
"Astro/Blog/AstroEdit/Visualizer/Snippet/Video.js": {Src: "Astro/Blog/AstroEdit/Visualizer/Snippet/Video.js", JSHash: "d6f641a25d4350b98dad2bbeeec5dedfd1c6d532", CSSHash: "ff1d4ae903c244a6aeaf78b12c375f1f45dfb3c2"},
"Astro/Blog/AstroEdit/Visualizer/Snippet/_this.js": {Src: "Astro/Blog/AstroEdit/Visualizer/Snippet/_this.js", JSHash: "38f5d8512eabf1ffb4249b1414efd2362af8dc5c", CSSHash: "1"},
"Astro/Blog/AstroEdit/Visualizer/_this.js": {Src: "Astro/Blog/AstroEdit/Visualizer/_this.js", JSHash: "6b3cece4cedda7322cfe385fe81f956bc59c01c6", CSSHash: "d43e2d27e52788d755c96f0db4ac500aa38ca2ee"},
"Astro/Blog/AstroEdit/_this.js": {Src: "Astro/Blog/AstroEdit/_this.js", JSHash: "c21f6a1de562e3365d7874696d7e791074f935c1", CSSHash: "2d37776089eeac5d81981f100c1c029c9249e4a9"},
"Astro/Blog/AstroEdit/_this.js": {Src: "Astro/Blog/AstroEdit/_this.js", JSHash: "92ff148e1e100a172d0583f22fff03fa277840ce", CSSHash: "2d37776089eeac5d81981f100c1c029c9249e4a9"},
"Astro/Blog/Components/Album.js": {Src: "Astro/Blog/Components/Album.js", JSHash: "95069b6eec9f03c84969e4d3627b0730136fa300", CSSHash: "640c50241b457330678a21b940fdb4ea15a5249b"},
"Astro/Blog/Components/ArticleContent.js": {Src: "Astro/Blog/Components/ArticleContent.js", JSHash: "2e208eae51421946f874dd78cb05d974a689bdef", CSSHash: "34fc82974af2ae7040819889bc8e7a1bd2b48cd6"},
"Astro/Blog/Components/Bubble.js": {Src: "Astro/Blog/Components/Bubble.js", JSHash: "7b344eb7e4024292d52767929d7efe6fc98a9de9", CSSHash: "2513518106d6d1c7a42e95c28becb3ddfe39e040"},
@@ -439,7 +439,7 @@ var ClassMap = &classmap.Map{
"Components/Vim/StatusBar.js": {Src: "Components/Vim/StatusBar.js", JSHash: "461f00364ced9cb6e0ae83b9d18c6456fb051e26", CSSHash: "1"},
"Components/Vim/Syntax/Analyzer.js": {Src: "Components/Vim/Syntax/Analyzer.js", JSHash: "64b9a2ae4c6ba0f9fdc0dda87323786df6c6b339", CSSHash: "1"},
"Components/Vim/Syntax/Word.js": {Src: "Components/Vim/Syntax/Word.js", JSHash: "a6d24370b0906cc0f09cfd68d96d635cd583fac3", CSSHash: "1"},
"Components/Vim/VimArea.js": {Src: "Components/Vim/VimArea.js", JSHash: "dda35cb49939da6a71d08f68a85435f68d64e283", CSSHash: "1"},
"Components/Vim/VimArea.js": {Src: "Components/Vim/VimArea.js", JSHash: "9639b24336a69aba93eda2e61fc127fe8e78c9dd", CSSHash: "1"},
"Components/Vim/_this.js": {Src: "Components/Vim/_this.js", JSHash: "f385a56129d2c933fd848501bbf3a5183a2dd3a8", CSSHash: "7949b25860fcef736927c01502aad09b56d764b2"},
"Components/_this.js": {Src: "Components/_this.js", JSHash: "f4cb7babe62a5cdae34d2c4ebcb55071e81da4ff", CSSHash: "1"},
"Dandelion/CSSAnimations/MovieClip.js": {Src: "Dandelion/CSSAnimations/MovieClip.js", JSHash: "5667064818a0ca32f11a9b5a27ed641058e9df6c", CSSHash: "daa6e6f4ee3365e599cf1b2680f3e907389534f3"},
@@ -3,10 +3,14 @@ package generated
var Externs = []string{
"externs/Astro.Blog.AstroEdit.Article.js",
"externs/Astro.Blog.AstroEdit.Draft.js",
"externs/Astro.Blog.AstroEdit.Flag.js",
"externs/Astro.Blog.AstroEdit.IPlugin.js",
"externs/Astro.Blog.AstroEdit.SiteLibrary.js",
"externs/Astro.Blog.AstroEdit.SmartInput.Definition.js",
"externs/Astro.Blog.AstroEdit.SmartInput.ICandidateAction.js",
"externs/Astro.Blog.AstroEdit.SmartInput.js",
"externs/Astro.Blog.AstroEdit.Uploader.js",
"externs/Astro.Blog.AstroEdit.Visualizer.Snippet.Model.js",
"externs/Astro.Blog.AstroEdit.Visualizer.Snippet.js",
"externs/Astro.Blog.AstroEdit.Visualizer.js",
+15 -2
View File
@@ -252,8 +252,21 @@ func (r *Resolver) MergeJS(files []classmap.Resource) ([]byte, string, error) {
}
b.Write(src)
}
wrapped := append([]byte("(function(){"), b.Bytes()...)
wrapped = append(wrapped, []byte("})();")...)
prefix := []byte(`
/** @define {boolean} */
var DEFINE_DEBUG = false;
(function(){
`)
suffix := []byte(`
})();
`)
wrapped := make([]byte, 0, len(prefix)+b.Len()+len(suffix))
wrapped = append(wrapped, prefix...)
wrapped = append(wrapped, b.Bytes()...)
wrapped = append(wrapped, suffix...)
return wrapped, hashList(files, "js"), nil
}