Explorar el Código

Изменения от Главреда ГитЖС | Changes of GitJS Glavred

master
Главред | Glavred hace 3 años
padre
commit
517b73e6cd
Se han modificado 5 ficheros con 32 adiciones y 35 borrados
  1. +1
    -1
      0000
  2. +26
    -7
      🏁.js
  3. +2
    -1
      🏁.череда
  4. +2
    -24
      📦
  5. +1
    -2
      🗄️.js

+ 1
- 1
0000 Ver fichero

@@ -1,5 +1,5 @@
Архивировать МАОН
0.2.0
0.3.0
https://git.opengamestudio.org/kornerr/APXuBuPOBATb-MAOH

/🏁.js


+ 26
- 7
🏁.js Ver fichero

@@ -9,7 +9,7 @@
// How to create a file in memory for user to download, but not through server?
// https://stackoverflow.com/a/18197341
var ссыль = document.createElement("a");
ссыль.setAttribute("href", "data:text/html;charset=utf-8;base64," + мир.содержимоеАрхива);
ссыль.setAttribute("href", "data:application/zip;charset=utf-8;base64," + мир.содержимоеАрхива);
var имя = "MAOH.zip";
ссыль.setAttribute("download", имя);
ссыль.style.display = "none";
@@ -35,18 +35,22 @@
// // // //


СоздатьАрхивИзЗагруженныхМодулей = мир =>
СоздатьАрхив = мир =>
{
var архив = new JSZip();
var корень = архив.folder("MAOH");
корень.file("gitjs", мир.индекс);
for (var н in мир.указателиМодулей)
{
var ук = мир.указателиМодулей[н];
//var ук64 = мир.база64ИзДвоичногоМассива(new Uint8Array(содержимое));

var директория = архив.folder(ук);
директория.file("hello", "yohello");
var м = мир.модули.модульПоУказателю(ук);
var директория = корень.folder(н);
for (var файл in м.структура)
{
var содержимое = м.содержимое[файл];
директория.file(файл, содержимое);
}
}
мир.архив = архив;
};

@@ -54,6 +58,21 @@
// // // //


СоздатьИндексАрхива = мир =>
{
var индекс = "";
for (var н in мир.указателиМодулей)
{
var ук = мир.указателиМодулей[н];
индекс += `${н} ${ук}\n`;
}
мир.индекс = индекс;
};


// // // //


ЗагрузитьМодули = мир =>
{
мир.модули.использовали.подписатьРаз(function() {


+ 2
- 1
🏁.череда Ver fichero

@@ -5,7 +5,8 @@
вывести указатели модулей
загрузить модули
загрузили модули
создать архив из загруженных модулей
создать индекс архива
создать архив
сгенерировать архив
сгенерировали архив
выдать архив на скачивание

+ 2
- 24
📦 Ver fichero

@@ -1,27 +1,5 @@


# Список указателей на модули для загрузки во время пуска
# 启动时要加载的模块指针列表
# List of module pointers to load at startup

https://bitbucket.org/gitjs/jquery/raw/3.5.1/0000
https://bitbucket.org/gitjs/uikit/raw/3.2.0/0000
https://git.opengamestudio.org/mahjong/mahjong-raskladka-layout/raw/branch/master/0000
https://git.opengamestudio.org/mahjong/povtorniy-repeating-ui/raw/branch/master/0000
https://git.opengamestudio.org/BCE/jszip/raw/branch/master/0000
# Из Рисователя берём Base64JS, да, косо-криво, лучше поменять.
https://git.opengamestudio.org/PuCOBATEJlb/PuCOBATEJlb/raw/branch/master/0000
https://git.opengamestudio.org/PuCOBATEJlb/PECYPCbl/raw/branch/master/0000

https://git.opengamestudio.org/MAOH/MEXMA/raw/branch/master/0000
https://git.opengamestudio.org/MAOH/CEHMA/raw/branch/master/0000
https://git.opengamestudio.org/MAOH/MOPMA/raw/branch/master/0000
https://git.opengamestudio.org/MAOH/PEEMA/raw/branch/master/0000
https://git.opengamestudio.org/MAOH/OTMA/raw/branch/master/0000
https://git.opengamestudio.org/MAOH/CYMA/raw/branch/master/0000

https://git.opengamestudio.org/MAOH/TEMA_M1K/raw/branch/master/0000
https://git.opengamestudio.org/MAOH/PACK_M1/raw/branch/master/0000

# Убрать после отладки
https://git.opengamestudio.org/MAOH/TEMA_OT/raw/branch/master/0000
https://git.opengamestudio.org/MAOH/PACK_OT/raw/branch/master/0000


+ 1
- 2
🗄️.js Ver fichero

@@ -8,8 +8,7 @@ document.title = "🀄 Архивировать МАОН";
модуль.содержимое["/📦"] = `

https://git.opengamestudio.org/BCE/jszip/raw/branch/master/0000
# Из Рисователя берём Base64JS, да, косо-криво, лучше поменять.
https://git.opengamestudio.org/PuCOBATEJlb/PuCOBATEJlb/raw/branch/master/0000

`;




Cargando…
Cancelar
Guardar