mirror of
https://github.com/Karaka-Management/Build.git
synced 2026-02-16 02:38:41 +00:00
parent
c551fe912a
commit
970c6b8127
|
|
@ -28,7 +28,6 @@ parameters:
|
||||||
- *Test.php
|
- *Test.php
|
||||||
- *Routes.php
|
- *Routes.php
|
||||||
- *Hooks.php
|
- *Hooks.php
|
||||||
- *ObjLoader.js
|
|
||||||
- */vendor/*
|
- */vendor/*
|
||||||
- */Demo/*
|
- */Demo/*
|
||||||
- */Build/*
|
- */Build/*
|
||||||
|
|
@ -38,11 +37,12 @@ parameters:
|
||||||
- */Web/*
|
- */Web/*
|
||||||
- */Routes/*
|
- */Routes/*
|
||||||
- */Hooks/*
|
- */Hooks/*
|
||||||
- */DataStorage/Database/*
|
|
||||||
- */Message/Mail/*
|
|
||||||
- */Auth/OAuth2/*
|
|
||||||
- */Socket/*
|
|
||||||
- */node_modules/*
|
- */node_modules/*
|
||||||
|
- *ObjLoader.js
|
||||||
|
- */Socket/*
|
||||||
|
- */DataStorage/Database/*
|
||||||
|
- */Auth/OAuth2/*
|
||||||
|
- */Message/Mail/*
|
||||||
- */Install/Application/*
|
- */Install/Application/*
|
||||||
- */Accounting/*
|
- */Accounting/*
|
||||||
- */JobScheduling/*
|
- */JobScheduling/*
|
||||||
|
|
@ -56,20 +56,9 @@ parameters:
|
||||||
- *Datamatrix.php
|
- *Datamatrix.php
|
||||||
- *QR.php
|
- *QR.php
|
||||||
ignoreErrors:
|
ignoreErrors:
|
||||||
- '#.*tag @var for constant.*#'
|
|
||||||
- '#[.]*Offset .* on array.* always exists[.]*#'
|
|
||||||
- '#[.]*separator of function explode expects non-empty-string[.]*#'
|
|
||||||
- '#^Call to an undefined method phpOMS\\Module\\ModuleAbstract::[.]*#'
|
- '#^Call to an undefined method phpOMS\\Module\\ModuleAbstract::[.]*#'
|
||||||
- '#^Strict comparison using === between[.]*#'
|
|
||||||
- '#.*key\(\) should return.*#'
|
|
||||||
- '#.*current\(\) should return.*#'
|
|
||||||
- '#.*offsetExists\(\) expects.*#'
|
|
||||||
- '#[.]*jsonSerialize\(\) has no return typehint specified#'
|
|
||||||
- '#.*unserialize\(\) has parameter .* with no typehint specified#'
|
|
||||||
- '#expects phpOMS\\Algorithm\\PathFinding\\JumpPointNode\|null, phpOMS\\Algorithm\\PathFinding\\Node\|null given#'
|
- '#expects phpOMS\\Algorithm\\PathFinding\\JumpPointNode\|null, phpOMS\\Algorithm\\PathFinding\\Node\|null given#'
|
||||||
- '#should return array<phpOMS\\Algorithm\\PathFinding\\Node> but returns array<int, phpOMS\\Algorithm\\PathFinding\\Node\|null#'
|
- '#should return array<phpOMS\\Algorithm\\PathFinding\\Node> but returns array<int, phpOMS\\Algorithm\\PathFinding\\Node\|null#'
|
||||||
- '#^Offset .* does not exist on array.*#'
|
|
||||||
- '#.*refClass with generic class ReflectionClass but does not specify its types.*#'
|
|
||||||
- '#.*Cannot cast mixed to.*#'
|
- '#.*Cannot cast mixed to.*#'
|
||||||
- '#.*Instantiated class .*\\WorkflowInstance.*#'
|
- '#.*Instantiated class .*\\WorkflowInstance.*#'
|
||||||
- '#.*Instantiated class .*\\WorkflowController.*#'
|
- '#.*Instantiated class .*\\WorkflowController.*#'
|
||||||
|
|
@ -79,15 +68,8 @@ parameters:
|
||||||
- '#.*unknown class .*PhpOffice\\.*#'
|
- '#.*unknown class .*PhpOffice\\.*#'
|
||||||
- '#.*Instantiated class .*PhpOffice\\.*#'
|
- '#.*Instantiated class .*PhpOffice\\.*#'
|
||||||
- '#[.]*PhpOffice\\PhpSpreadsheet\\[.]*#'
|
- '#[.]*PhpOffice\\PhpSpreadsheet\\[.]*#'
|
||||||
- '#.*Mapper.* should return.*#'
|
|
||||||
- '#.*::MODEL is not covariant with type class-string<T> of constant phpOMS\\DataStorage\\Database\\Mapper\\DataMapperFactory::MODEL.*#'
|
|
||||||
- '#.*l11nServer.* does not accept.*#'
|
|
||||||
- '#.*Call to static method installExternal.*#'
|
|
||||||
- '#.*MODEL is not covariant with type class-string.*#'
|
- '#.*MODEL is not covariant with type class-string.*#'
|
||||||
- '#.*Access to an undefined property Default.*#'
|
- '#.*Access to an undefined property Default.*#'
|
||||||
-
|
|
||||||
message: '#.*has parameter \$con with no typehint specified#'
|
|
||||||
path: *Ftp/File.php
|
|
||||||
-
|
-
|
||||||
message: '#.*Constant PDF_.*#'
|
message: '#.*Constant PDF_.*#'
|
||||||
path: *pdf.php
|
path: *pdf.php
|
||||||
|
|
@ -97,24 +79,12 @@ parameters:
|
||||||
-
|
-
|
||||||
message: '#.*Cannot call method setId\(\) on mixed.*#'
|
message: '#.*Cannot call method setId\(\) on mixed.*#'
|
||||||
path: *View.php
|
path: *View.php
|
||||||
-
|
|
||||||
message: "#^Cannot call method getTimestamp\\(\\) on DateTime\\|null\\.$#"
|
|
||||||
path: *Algorithm/JobScheduling/Weighted.php
|
|
||||||
-
|
|
||||||
message: '#Binary operation "\-" between string and int results in an error#'
|
|
||||||
path: *Matrix/Matrix.php
|
|
||||||
-
|
-
|
||||||
message: '#PHPDoc tag @return with type object is not subtype of native type phpOMS.*#'
|
message: '#PHPDoc tag @return with type object is not subtype of native type phpOMS.*#'
|
||||||
path: *Module/ModuleManager.php
|
path: *Module/ModuleManager.php
|
||||||
-
|
-
|
||||||
message: '#.*continuousComparator\(\) is unused.*#'
|
message: '#.*continuousComparator\(\) is unused.*#'
|
||||||
path: *Algorithm/Knapsack/Continuous.php
|
path: *Algorithm/Knapsack/Continuous.php
|
||||||
-
|
|
||||||
message: '#.*Empty array passed to foreach.*#'
|
|
||||||
path: *Admin/Install/Workflows*
|
|
||||||
-
|
|
||||||
message: '#.*app is never read.*#'
|
|
||||||
path: *Admin/Install/Workflows*
|
|
||||||
-
|
-
|
||||||
message: '#.*unknown class Modules\\Workflow\\Controller\\WorkflowInstance.*#'
|
message: '#.*unknown class Modules\\Workflow\\Controller\\WorkflowInstance.*#'
|
||||||
path: *Admin/Install/Workflows*
|
path: *Admin/Install/Workflows*
|
||||||
|
|
@ -127,6 +97,3 @@ parameters:
|
||||||
-
|
-
|
||||||
message: '#.*of method TCPDF::setHeaderData\(\) expects string.*#'
|
message: '#.*of method TCPDF::setHeaderData\(\) expects string.*#'
|
||||||
path: *bill.pdf.php*
|
path: *bill.pdf.php*
|
||||||
-
|
|
||||||
message: '#.*SessionInterface::\$data.*#'
|
|
||||||
path: *CliApplication.php*
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
function module_autoloader($class) {
|
function module_autoloader($class) : void {
|
||||||
$paths = [
|
$paths = [
|
||||||
__DIR__ . '/../../',
|
__DIR__ . '/../../',
|
||||||
__DIR__ . '/../../Resources/',
|
__DIR__ . '/../../Resources/',
|
||||||
|
|
@ -89,4 +89,4 @@ function module_autoloader($class) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
spl_autoload_register('module_autoloader');
|
\spl_autoload_register('module_autoloader');
|
||||||
|
|
|
||||||
|
|
@ -4,8 +4,6 @@ declare(strict_types=1);
|
||||||
|
|
||||||
require_once __DIR__ . '/../../../phpOMS/Autoloader.php';
|
require_once __DIR__ . '/../../../phpOMS/Autoloader.php';
|
||||||
|
|
||||||
use \phpOMS\Autoloader;
|
|
||||||
|
|
||||||
$module = 'Billing';
|
$module = 'Billing';
|
||||||
if ($module === '..' || $module === '.'
|
if ($module === '..' || $module === '.'
|
||||||
|| !\is_dir(__DIR__ . '/../../../Modules/' . $module)
|
|| !\is_dir(__DIR__ . '/../../../Modules/' . $module)
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
<?php
|
<?php declare(strict_types=1);
|
||||||
|
|
||||||
$jsonStr = '';
|
$jsonStr = '';
|
||||||
$name = 'ItemPackaging';
|
$name = 'ItemPackaging';
|
||||||
|
|
@ -113,7 +113,7 @@ class {$name} implements \JsonSerializable
|
||||||
public function toArray() : array
|
public function toArray() : array
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'id' => $this->id,
|
'id' => {$this->id},
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -122,7 +122,7 @@ class {$name} implements \JsonSerializable
|
||||||
*/
|
*/
|
||||||
public function jsonSerialize() : mixed
|
public function jsonSerialize() : mixed
|
||||||
{
|
{
|
||||||
return $this->toArray();
|
return {$this->toArray}();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -161,13 +161,13 @@ final class Null{$name} extends {$name}
|
||||||
/**
|
/**
|
||||||
* Constructor
|
* Constructor
|
||||||
*
|
*
|
||||||
* @param int $id Model id
|
* @param int {$id} Model id
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public function __construct(int $id = 0)
|
public function __construct(int {$id} = 0)
|
||||||
{
|
{
|
||||||
$this->id = $id;
|
{$this->id} = {$id};
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -175,7 +175,7 @@ final class Null{$name} extends {$name}
|
||||||
*/
|
*/
|
||||||
public function jsonSerialize() : mixed
|
public function jsonSerialize() : mixed
|
||||||
{
|
{
|
||||||
return ['id' => $this->id];
|
return ['id' => {$this->id}];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
72
Helper/Scripts/helpImages.js
Normal file
72
Helper/Scripts/helpImages.js
Normal file
|
|
@ -0,0 +1,72 @@
|
||||||
|
const {By,Key,Builder} = require("selenium-webdriver");
|
||||||
|
const chrome = require('selenium-webdriver/chrome');
|
||||||
|
|
||||||
|
const { promises: fs} = require('fs');
|
||||||
|
const fsync = require('fs');
|
||||||
|
const path = require('path');
|
||||||
|
|
||||||
|
async function Screenshot(driver, url, xpath, output) {
|
||||||
|
const dir = path.dirname(output);
|
||||||
|
if (!fsync.existsSync(dir)) {
|
||||||
|
fsync.mkdirSync(dir, { recursive: true });
|
||||||
|
}
|
||||||
|
|
||||||
|
await driver.get(url).then(function () {
|
||||||
|
if (url.includes('#')) {
|
||||||
|
driver.findElement(By.css('label[for=' + url.substring(url.indexOf('#') + 1) + ']')).click();
|
||||||
|
}
|
||||||
|
|
||||||
|
return driver.findElement(By.xpath(xpath));
|
||||||
|
}).then(function (ele) {
|
||||||
|
ele.click();
|
||||||
|
driver.actions().scroll(0, 0, 0, 0, ele).perform();
|
||||||
|
|
||||||
|
return ele;
|
||||||
|
}).then(function (ele) {
|
||||||
|
return ele.takeScreenshot(true);
|
||||||
|
}).then(function (encodedString) {
|
||||||
|
return fsync.writeFileSync(output, encodedString, 'base64');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
const base = 'http://192.168.178.38/en';
|
||||||
|
|
||||||
|
(async function createImages() {
|
||||||
|
const driver = await new Builder().forBrowser("chrome").build();
|
||||||
|
await driver.get(base);
|
||||||
|
await driver.manage().setTimeouts({ implicit: 3000 });
|
||||||
|
await driver.manage().window().setRect({ width: 1920, height: 1080 });
|
||||||
|
await driver.findElement(By.id('iLoginButton')).click();
|
||||||
|
await driver.sleep(1000);
|
||||||
|
|
||||||
|
const files = await fs.readdir(__dirname + '/../../../Modules');
|
||||||
|
const length = files.length;
|
||||||
|
|
||||||
|
for (let i = 0; i < length; ++i) {
|
||||||
|
try {
|
||||||
|
const src = JSON.parse(fsync.readFileSync(__dirname + '/../../../Modules/' + files[i] +'/Docs/img.json', 'utf8'));
|
||||||
|
await loop (driver, src)
|
||||||
|
} catch (e) {
|
||||||
|
//console.log(e.message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
await driver.quit();
|
||||||
|
})();
|
||||||
|
|
||||||
|
async function loop(driver, src) {
|
||||||
|
const length = src.length;
|
||||||
|
for (let i = 0; i < length; ++i) {
|
||||||
|
try {
|
||||||
|
await Screenshot(driver,
|
||||||
|
base + src[i][0],
|
||||||
|
src[i][1],
|
||||||
|
__dirname + '/../../../Modules' + src[i][2]
|
||||||
|
);
|
||||||
|
} catch(error) {
|
||||||
|
console.error(error);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
// "C:\Program Files\nodejs\node.exe" Build/Js/createImages.js
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
const {By,Key,Builder} = require("selenium-webdriver");
|
const {By,Key,Builder} = require("selenium-webdriver");
|
||||||
const chrome = require('selenium-webdriver/chrome');
|
const chrome = require('selenium-webdriver/chrome');
|
||||||
const http = require('http');
|
|
||||||
let fs = require('fs');
|
let fs = require('fs');
|
||||||
let path = require('path');
|
let path = require('path');
|
||||||
|
|
||||||
0
Tools/versionHash.sh → Helper/Scripts/versionHash.sh
Executable file → Normal file
0
Tools/versionHash.sh → Helper/Scripts/versionHash.sh
Executable file → Normal file
|
|
@ -1,162 +0,0 @@
|
||||||
const {By,Key,Builder} = require("selenium-webdriver");
|
|
||||||
const chrome = require('selenium-webdriver/chrome');
|
|
||||||
|
|
||||||
let fs = require('fs');
|
|
||||||
let path = require('path');
|
|
||||||
|
|
||||||
const delay = ms => new Promise(resolve => setTimeout(resolve, ms));
|
|
||||||
|
|
||||||
async function Screenshot(url, xpath, output) {
|
|
||||||
let driver = await new Builder().forBrowser("chrome").build();
|
|
||||||
|
|
||||||
let dir = path.dirname(output);
|
|
||||||
if (!fs.existsSync(dir)) {
|
|
||||||
fs.mkdirSync(dir, { recursive: true });
|
|
||||||
}
|
|
||||||
|
|
||||||
await driver.get(url).then(function () {
|
|
||||||
return driver.manage().setTimeouts({implicit: 3000});
|
|
||||||
}).then(function () {
|
|
||||||
return driver.manage().window().setRect({width: 1024, height: 800});
|
|
||||||
}).then(function () {
|
|
||||||
return driver.findElement(By.id("iLoginButton")).click();
|
|
||||||
}).then(function () {
|
|
||||||
return driver.sleep(2000);
|
|
||||||
}).then(function () {
|
|
||||||
return driver.findElement(By.xpath(xpath));
|
|
||||||
}).then(function (ele) {
|
|
||||||
return ele.takeScreenshot(true);
|
|
||||||
}).then(function (encodedString) {
|
|
||||||
return fs.writeFileSync(output, encodedString, 'base64');
|
|
||||||
});
|
|
||||||
|
|
||||||
return driver.quit();
|
|
||||||
}
|
|
||||||
|
|
||||||
const src = [
|
|
||||||
// Help
|
|
||||||
[
|
|
||||||
'http://192.168.178.38/en/help/general',
|
|
||||||
'//*[@id="content"]',
|
|
||||||
__dirname + '/../../Modules/Help/Docs/Help/img/help-general-readme.png'
|
|
||||||
],
|
|
||||||
|
|
||||||
[
|
|
||||||
'http://192.168.178.38/en/help/module/list',
|
|
||||||
'//*[@id="content"]',
|
|
||||||
__dirname + '/../../Modules/Help/Docs/Help/img/help-general-module-list.png'
|
|
||||||
],
|
|
||||||
[
|
|
||||||
'http://192.168.178.38/en/backend/help/module/view?id=Admin',
|
|
||||||
'//*[@id="content"]',
|
|
||||||
__dirname + '/../../Modules/Help/Docs/Help/img/help-general-module-readme.png'
|
|
||||||
],
|
|
||||||
[
|
|
||||||
'http://192.168.178.38/en/backend/help/module/view?id=Admin&page=Dev%2Fstructure',
|
|
||||||
'//*[@id="content"]',
|
|
||||||
__dirname + '/../../Modules/Help/Docs/Help/img/help-general-module-structure.png'
|
|
||||||
],
|
|
||||||
|
|
||||||
[
|
|
||||||
'http://192.168.178.38/en/help/developer?id=Admin&page=Dev%2Fstructure',
|
|
||||||
'//*[@id="content"]',
|
|
||||||
__dirname + '/../../Modules/Help/Docs/Help/img/help-developer-readme.png'
|
|
||||||
],
|
|
||||||
|
|
||||||
// Groups
|
|
||||||
[
|
|
||||||
'http://192.168.178.38/en/admin/group/view?id=3#c-tab-3',
|
|
||||||
'//*[@id="permissionForm"]',
|
|
||||||
__dirname + '/../../Modules/Admin/Docs/Help/img/admin-group-settings-permission-form.png'
|
|
||||||
],
|
|
||||||
[
|
|
||||||
'http://192.168.178.38/en/admin/group/view?id=3#c-tab-3',
|
|
||||||
'//*[@id="igroup-tabs"]/div[2]/div[3]/div/div[2]/div',
|
|
||||||
__dirname + '/../../Modules/Admin/Docs/Help/img/admin-group-settings-permission-list.png'
|
|
||||||
],
|
|
||||||
|
|
||||||
// Accounts
|
|
||||||
[
|
|
||||||
'http://192.168.178.38/en/admin/account/view?id=1#c-tab-3',
|
|
||||||
'//*[@id="permissionForm"]',
|
|
||||||
__dirname + '/../../Modules/Admin/Docs/Help/img/admin-account-settings-permission-form.png'
|
|
||||||
],
|
|
||||||
[
|
|
||||||
'http://192.168.178.38/en/admin/account/view?id=1#c-tab-3',
|
|
||||||
'//*[@id="iaccount-tabs"]/div[2]/div[3]/div/div[2]/div',
|
|
||||||
__dirname + '/../../Modules/Admin/Docs/Help/img/admin-account-settings-permission-list.png'
|
|
||||||
],
|
|
||||||
|
|
||||||
// Modules
|
|
||||||
[
|
|
||||||
'http://192.168.178.38/en/admin/module/info?id=Admin',
|
|
||||||
'//*[@id="content"]',
|
|
||||||
__dirname + '/../../Modules/Admin/Docs/Help/img/admin-module-info.png'
|
|
||||||
],
|
|
||||||
[
|
|
||||||
'http://192.168.178.38/en/admin/module/settings?id=Admin#c-tab-1',
|
|
||||||
'//*[@id="content"]',
|
|
||||||
__dirname + '/../../Modules/Admin/Docs/Help/img/admin-module-settings-general.png'
|
|
||||||
],
|
|
||||||
[
|
|
||||||
'http://192.168.178.38/en/admin/module/navigation/list?id=Admin',
|
|
||||||
'//*[@id="content"]',
|
|
||||||
__dirname + '/../../Modules/Admin/Docs/Help/img/admin-module-settings-navigation.png'
|
|
||||||
],
|
|
||||||
[
|
|
||||||
'http://192.168.178.38/en/admin/module/route/list?id=Admin',
|
|
||||||
'//*[@id="content"]',
|
|
||||||
__dirname + '/../../Modules/Admin/Docs/Help/img/admin-module-settings-routes.png'
|
|
||||||
],
|
|
||||||
[
|
|
||||||
'http://192.168.178.38/en/admin/module/hook/list?id=Admin',
|
|
||||||
'//*[@id="content"]',
|
|
||||||
__dirname + '/../../Modules/Admin/Docs/Help/img/admin-module-settings-hooks.png'
|
|
||||||
],
|
|
||||||
[
|
|
||||||
'http://192.168.178.38/en/admin/module/log?id=Admin',
|
|
||||||
'//*[@id="content"]',
|
|
||||||
__dirname + '/../../Modules/Admin/Docs/Help/img/admin-module-settings-logs.png'
|
|
||||||
],
|
|
||||||
|
|
||||||
// Admin-settings
|
|
||||||
[
|
|
||||||
'http://192.168.178.38/en/admin/module/settings?id=Admin#c-tab-1',
|
|
||||||
'//*[@id="content"]',
|
|
||||||
__dirname + '/../../Modules/Admin/Docs/Help/img/admin-module-admin-settings-general.png'
|
|
||||||
],
|
|
||||||
[
|
|
||||||
'http://192.168.178.38/en/admin/module/settings?id=Admin#c-tab-2',
|
|
||||||
'//*[@id="content"]',
|
|
||||||
__dirname + '/../../Modules/Admin/Docs/Help/img/admin-module-admin-settings-localization.png'
|
|
||||||
],
|
|
||||||
[
|
|
||||||
'http://192.168.178.38/en/admin/module/settings?id=Admin#c-tab-3',
|
|
||||||
'//*[@id="content"]',
|
|
||||||
__dirname + '/../../Modules/Admin/Docs/Help/img/admin-module-admin-settings-design.png'
|
|
||||||
],
|
|
||||||
[
|
|
||||||
'http://192.168.178.38/en/admin/module/settings?id=Admin#c-tab-5',
|
|
||||||
'//*[@id="content"]',
|
|
||||||
__dirname + '/../../Modules/Admin/Docs/Help/img/admin-module-admin-settings-list.png'
|
|
||||||
],
|
|
||||||
];
|
|
||||||
const length = src.length;
|
|
||||||
|
|
||||||
(async function loop() {
|
|
||||||
for (let i = 0; i < length; ++i) {
|
|
||||||
try {
|
|
||||||
Screenshot(
|
|
||||||
src[i][0],
|
|
||||||
src[i][1],
|
|
||||||
src[i][2]
|
|
||||||
);
|
|
||||||
|
|
||||||
await delay(1000);
|
|
||||||
} catch(error) {
|
|
||||||
console.error(error);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})();
|
|
||||||
|
|
||||||
// "C:\Program Files\nodejs\node.exe" Build/Js/createImages.js
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
# General
|
# General
|
||||||
|
|
||||||
The Karaka build system is a collection of scripts to create builds. Builds that can get created are:
|
The Jingga build system is a collection of scripts to create builds. Builds that can get created are:
|
||||||
|
|
||||||
* Public release builds
|
* Public release builds
|
||||||
* Public developer release builds
|
* Public developer release builds
|
||||||
|
|
|
||||||
|
|
@ -1,24 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
echo "" > ${OUT}
|
|
||||||
for i in "${SRC[@]}"
|
|
||||||
do
|
|
||||||
cat $i >> ${OUT}
|
|
||||||
echo "" >> ${OUT}
|
|
||||||
done
|
|
||||||
|
|
||||||
java -jar ${TOOLS_PATH}/closure-compiler* --compilation_level WHITESPACE_ONLY --js ${OUT} --js_output_file ${OUT}.min
|
|
||||||
rm ${OUT}
|
|
||||||
mv ${OUT}.min ${OUT}
|
|
||||||
|
|
||||||
# Remove spaces at end of line
|
|
||||||
sed -i -e 's/[[:blank:]]*$//g' ${OUT}
|
|
||||||
# Make single line
|
|
||||||
sed -i -e ':a;N;$!ba;s/\n/ /g' ${OUT}
|
|
||||||
# Remove multiple spaces
|
|
||||||
sed -i -e 's/ */ /g' ${OUT}
|
|
||||||
# Remove double js initialization
|
|
||||||
sed -i -e 's/(function *(jsOMS) *{ *"use strict";//g' ${OUT}
|
|
||||||
sed -i -e 's/} *(window.jsOMS *= *window.jsOMS *|| *{}));//g' ${OUT}
|
|
||||||
|
|
||||||
echo "(function(jsOMS){\"use strict\";$(cat ${OUT})}(window.jsOMS = window.jsOMS || {}));" > ${OUT}
|
|
||||||
Loading…
Reference in New Issue
Block a user