More work

This commit is contained in:
Emupedia
2019-11-18 07:31:56 +02:00
parent c7dab156d9
commit 237735e36c
6 changed files with 43 additions and 765 deletions

View File

@@ -0,0 +1,15 @@
{
"pets" :
[
{
"name" : "eSheep",
"file" : "original.xml",
"author" : "Adriano Petrucci"
},
{
"name" : "Green Sheep",
"file" : "green_sheep.xml",
"author" : "Zyt"
}
]
}

View File

@@ -1,7 +1,7 @@
// noinspection DuplicatedCode,JSUnusedLocalSymbols
(function (factory) {
if (typeof define === 'function' && define.amd) {
define(['jquery', 'octokat', 'esheep'], factory);
define(['jquery', 'optional!octokat', 'optional!esheep'], factory);
} else if (typeof module === 'object' && module.exports) {
module.exports = function(root, jQuery) {
if (jQuery === undefined) {

File diff suppressed because one or more lines are too long

View File

@@ -10,6 +10,7 @@ const fonts_directory = `${packages.config.fonts_dir}/`;
const scss_directory = `${packages.config.scss_dir}/`;
const css_directory = `${packages.config.css_dir}/`;
// const pug_directory = `${packages.config.pug_dir}/`;
const config_directory = `${packages.config.config_dir}/`;
const libraries_directory = `${packages.config.library_dir}/`;
const polyfills_directory = `${packages.config.polyfill_dir}/`;
const nodemodules_directory = `${__dirname}/../../node_modules/`;
@@ -2091,8 +2092,8 @@ function install(install_directory, dependency, version) {
// noinspection JSValidateTypes
replace({
files: install_directory + libraries_directory + dependency + '-' + version + '.min.js',
from: 'this.instantiateWasm=t,',
to: 'this.instantiateWasm=t,e = e || window.WDOSBOX,'
from: 'this.instantiateWasm=t,this',
to: 'this.instantiateWasm=t,e = e || window.WDOSBOX,this'
}, (error) => {
if (error) {
log.error('Error occurred:', error);
@@ -3565,18 +3566,36 @@ function install(install_directory, dependency, version) {
// noinspection JSValidateTypes
replace({
files: install_directory + libraries_directory + 'esheep-' + version + '.min.js',
from: 'z-index:2000;',
to: 'z-index:20000;'
from: 'https://adrianotiger.github.io/desktopPet/Pets/pets.json',
to: config_directory + 'esheep-pets-' + version + '.json'
}, (error) => {
if (error) {
log.error('Error occurred:', error);
} else {
//noinspection JSUnresolvedFunction
fs.copy(nodemodules_directory + dependency + '/src/animation.xml', install_directory + libraries_directory + 'esheep-animations-' + version + '.xml', copy_options, (error) => {
// noinspection JSValidateTypes
replace({
files: install_directory + libraries_directory + 'esheep-' + version + '.min.js',
from: 'z-index:2000;',
to: 'z-index:20000;'
}, (error) => {
if (error) {
log.error('Error occurred:', error);
} else {
log.log(dependency + ' version ' + version + ' installed!');
//noinspection JSUnresolvedFunction
fs.copy(nodemodules_directory + dependency + '/pets/pets.json', install_directory + config_directory + 'esheep-pets-' + version + '.json', copy_options, (error) => {
if (error) {
log.error('Error occurred:', error);
} else {
//noinspection JSUnresolvedFunction
fs.copy(nodemodules_directory + dependency + '/src/animation.xml', install_directory + config_directory + 'esheep-animations-' + version + '.xml', copy_options, (error) => {
if (error) {
log.error('Error occurred:', error);
} else {
log.log(dependency + ' version ' + version + ' installed!');
}
});
}
});
}
});
}

View File

@@ -125,6 +125,7 @@
"css_dir": "css/libraries",
"pug_dir": "pug",
"js_dir": "js",
"config_dir": "js/config",
"library_dir": "js/libraries",
"polyfill_dir": "js/polyfills"
},