[Scummvm-git-logs] scummvm-web master -> bc727c5db3daadef05e8bd8d35cc0ab6e3cd59f2
Mataniko
mataniko at gmail.com
Mon Dec 7 23:30:04 UTC 2020
This automated email contains information about 2 new commits which have been
pushed to the 'scummvm-web' repo located at https://github.com/scummvm/scummvm-web .
Summary:
01ae52820a BUILD: Move from scssphp to sass
bc727c5db3 BUILD: Run data update concurrently
Commit: 01ae52820ae35ab68edc319315b3008d8c3d1480
https://github.com/scummvm/scummvm-web/commit/01ae52820ae35ab68edc319315b3008d8c3d1480
Author: Mataniko (mataniko at gmail.com)
Date: 2020-12-07T18:30:01-05:00
Commit Message:
BUILD: Move from scssphp to sass
Changed paths:
A .browserslistrc
A build.js
composer.json
package.json
diff --git a/.browserslistrc b/.browserslistrc
new file mode 100644
index 00000000..32cca299
--- /dev/null
+++ b/.browserslistrc
@@ -0,0 +1,3 @@
+# Browsers supported in our CSS
+
+last 4 versions
diff --git a/build.js b/build.js
new file mode 100644
index 00000000..ce22a8fb
--- /dev/null
+++ b/build.js
@@ -0,0 +1,24 @@
+const sass = require('sass');
+const fs = require('fs');
+const autoprefixer = require('autoprefixer');
+
+async function renderScss(filename) {
+ const inFile = `./scss/${filename}.scss`;
+ const outFile = `./public_html/css/${filename}.css`;
+
+ console.log(`Converting ${inFile} to css`);
+ const output = sass.renderSync({
+ outputStyle: "compressed",
+ file: inFile,
+
+ });
+
+ console.log(`Applying autoprefixer`);
+ const result = await autoprefixer.process(output.css, { from: undefined });
+
+ console.log(`Writing to ${outFile}`);
+ fs.writeFileSync(outFile, result.css);
+}
+
+renderScss('main_rtl');
+renderScss('main_ltr');
diff --git a/composer.json b/composer.json
index 1354cc20..d752a31e 100644
--- a/composer.json
+++ b/composer.json
@@ -17,7 +17,6 @@
"piwik/device-detector": "^3.11",
"spatie/yaml-front-matter": "^2.0",
"erusev/parsedown": "^1.7",
- "scssphp/scssphp": "^1.2",
"composer/semver": "^3.2",
"phpfastcache/phpfastcache": "^8.0",
"league/csv": "^9.6",
@@ -34,7 +33,6 @@
"scripts": {
"build-common": [
"@icons",
- "@scss",
"@localize"
],
"build": [
@@ -61,11 +59,6 @@
"update-data": [
"php include/DataUtils.php"
],
- "scss": [
- "pscss -f compressed ./scss/main_ltr.scss > ./public_html/css/main_ltr.css",
- "pscss -f compressed ./scss/main_rtl.scss > ./public_html/css/main_rtl.css",
- "pscss -f compressed ./scss/pages/_mirrorbrain.scss > ./public_html/css/mirrorbrain.css"
- ],
"localize": [
"php include/LocalizationUtils.php"
],
diff --git a/package.json b/package.json
index 9a223c5d..e6b176c6 100644
--- a/package.json
+++ b/package.json
@@ -4,13 +4,11 @@
"version": "1.0.0",
"dependencies": {
"autoprefixer": "^9.8.6",
- "postcss-cli": "^6.1.3"
- },
- "devDependencies": {
+ "postcss-cli": "^6.1.3",
"sass": "1.26.10"
},
"scripts": {
- "postinstall": "postcss ./public_html/css/*.css --use autoprefixer --no-map -r",
- "sass": "sass --watch ./scss:./public_html/css"
+ "scss:watch": "sass --watch ./scss:./public_html/css",
+ "build": "node build.js"
}
}
Commit: bc727c5db3daadef05e8bd8d35cc0ab6e3cd59f2
https://github.com/scummvm/scummvm-web/commit/bc727c5db3daadef05e8bd8d35cc0ab6e3cd59f2
Author: Mataniko (mataniko at gmail.com)
Date: 2020-12-07T18:30:01-05:00
Commit Message:
BUILD: Run data update concurrently
Changed paths:
composer.json
composer.lock
include/DataUtils.php
diff --git a/composer.json b/composer.json
index d752a31e..224c6a72 100644
--- a/composer.json
+++ b/composer.json
@@ -21,7 +21,8 @@
"phpfastcache/phpfastcache": "^8.0",
"league/csv": "^9.6",
"symfony/yaml": "^5.1",
- "predis/predis": "^1.1"
+ "predis/predis": "^1.1",
+ "guzzlehttp/guzzle": "^7.2"
},
"require-dev": {
"phpstan/phpstan": "^0.12.43",
diff --git a/composer.lock b/composer.lock
index 04ead67f..affad8aa 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
- "content-hash": "f99c84e69bbb132f61a1905c75c46717",
+ "content-hash": "2a95105f5c1913afc0c32097bee38e28",
"packages": [
{
"name": "altorouter/altorouter",
@@ -234,6 +234,238 @@
],
"time": "2020-06-29T00:56:53+00:00"
},
+ {
+ "name": "guzzlehttp/guzzle",
+ "version": "7.2.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/guzzle/guzzle.git",
+ "reference": "0aa74dfb41ae110835923ef10a9d803a22d50e79"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/guzzle/guzzle/zipball/0aa74dfb41ae110835923ef10a9d803a22d50e79",
+ "reference": "0aa74dfb41ae110835923ef10a9d803a22d50e79",
+ "shasum": ""
+ },
+ "require": {
+ "ext-json": "*",
+ "guzzlehttp/promises": "^1.4",
+ "guzzlehttp/psr7": "^1.7",
+ "php": "^7.2.5 || ^8.0",
+ "psr/http-client": "^1.0"
+ },
+ "provide": {
+ "psr/http-client-implementation": "1.0"
+ },
+ "require-dev": {
+ "ext-curl": "*",
+ "php-http/client-integration-tests": "^3.0",
+ "phpunit/phpunit": "^8.5.5 || ^9.3.5",
+ "psr/log": "^1.1"
+ },
+ "suggest": {
+ "ext-curl": "Required for CURL handler support",
+ "ext-intl": "Required for Internationalized Domain Name (IDN) support",
+ "psr/log": "Required for using the Log middleware"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "7.1-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "GuzzleHttp\\": "src/"
+ },
+ "files": [
+ "src/functions_include.php"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Michael Dowling",
+ "email": "mtdowling at gmail.com",
+ "homepage": "https://github.com/mtdowling"
+ },
+ {
+ "name": "Márk Sági-Kazár",
+ "email": "mark.sagikazar at gmail.com",
+ "homepage": "https://sagikazarmark.hu"
+ }
+ ],
+ "description": "Guzzle is a PHP HTTP client library",
+ "homepage": "http://guzzlephp.org/",
+ "keywords": [
+ "client",
+ "curl",
+ "framework",
+ "http",
+ "http client",
+ "psr-18",
+ "psr-7",
+ "rest",
+ "web service"
+ ],
+ "support": {
+ "issues": "https://github.com/guzzle/guzzle/issues",
+ "source": "https://github.com/guzzle/guzzle/tree/7.2.0"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/GrahamCampbell",
+ "type": "github"
+ },
+ {
+ "url": "https://github.com/Nyholm",
+ "type": "github"
+ },
+ {
+ "url": "https://github.com/alexeyshockov",
+ "type": "github"
+ },
+ {
+ "url": "https://github.com/gmponos",
+ "type": "github"
+ }
+ ],
+ "time": "2020-10-10T11:47:56+00:00"
+ },
+ {
+ "name": "guzzlehttp/promises",
+ "version": "1.4.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/guzzle/promises.git",
+ "reference": "60d379c243457e073cff02bc323a2a86cb355631"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/guzzle/promises/zipball/60d379c243457e073cff02bc323a2a86cb355631",
+ "reference": "60d379c243457e073cff02bc323a2a86cb355631",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.5"
+ },
+ "require-dev": {
+ "symfony/phpunit-bridge": "^4.4 || ^5.1"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.4-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "GuzzleHttp\\Promise\\": "src/"
+ },
+ "files": [
+ "src/functions_include.php"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Michael Dowling",
+ "email": "mtdowling at gmail.com",
+ "homepage": "https://github.com/mtdowling"
+ }
+ ],
+ "description": "Guzzle promises library",
+ "keywords": [
+ "promise"
+ ],
+ "support": {
+ "issues": "https://github.com/guzzle/promises/issues",
+ "source": "https://github.com/guzzle/promises/tree/1.4.0"
+ },
+ "time": "2020-09-30T07:37:28+00:00"
+ },
+ {
+ "name": "guzzlehttp/psr7",
+ "version": "1.7.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/guzzle/psr7.git",
+ "reference": "53330f47520498c0ae1f61f7e2c90f55690c06a3"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/guzzle/psr7/zipball/53330f47520498c0ae1f61f7e2c90f55690c06a3",
+ "reference": "53330f47520498c0ae1f61f7e2c90f55690c06a3",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.4.0",
+ "psr/http-message": "~1.0",
+ "ralouphie/getallheaders": "^2.0.5 || ^3.0.0"
+ },
+ "provide": {
+ "psr/http-message-implementation": "1.0"
+ },
+ "require-dev": {
+ "ext-zlib": "*",
+ "phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.5.8 || ^9.3.10"
+ },
+ "suggest": {
+ "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.7-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "GuzzleHttp\\Psr7\\": "src/"
+ },
+ "files": [
+ "src/functions_include.php"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Michael Dowling",
+ "email": "mtdowling at gmail.com",
+ "homepage": "https://github.com/mtdowling"
+ },
+ {
+ "name": "Tobias Schultze",
+ "homepage": "https://github.com/Tobion"
+ }
+ ],
+ "description": "PSR-7 message implementation that also provides common utility methods",
+ "keywords": [
+ "http",
+ "message",
+ "psr-7",
+ "request",
+ "response",
+ "stream",
+ "uri",
+ "url"
+ ],
+ "support": {
+ "issues": "https://github.com/guzzle/psr7/issues",
+ "source": "https://github.com/guzzle/psr7/tree/1.7.0"
+ },
+ "time": "2020-09-30T07:37:11+00:00"
+ },
{
"name": "league/csv",
"version": "9.6.1",
@@ -651,6 +883,111 @@
],
"time": "2016-08-06T20:24:11+00:00"
},
+ {
+ "name": "psr/http-client",
+ "version": "1.0.1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/php-fig/http-client.git",
+ "reference": "2dfb5f6c5eff0e91e20e913f8c5452ed95b86621"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/php-fig/http-client/zipball/2dfb5f6c5eff0e91e20e913f8c5452ed95b86621",
+ "reference": "2dfb5f6c5eff0e91e20e913f8c5452ed95b86621",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^7.0 || ^8.0",
+ "psr/http-message": "^1.0"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.0.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Psr\\Http\\Client\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "PHP-FIG",
+ "homepage": "http://www.php-fig.org/"
+ }
+ ],
+ "description": "Common interface for HTTP clients",
+ "homepage": "https://github.com/php-fig/http-client",
+ "keywords": [
+ "http",
+ "http-client",
+ "psr",
+ "psr-18"
+ ],
+ "support": {
+ "source": "https://github.com/php-fig/http-client/tree/master"
+ },
+ "time": "2020-06-29T06:28:15+00:00"
+ },
+ {
+ "name": "psr/http-message",
+ "version": "1.0.1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/php-fig/http-message.git",
+ "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363",
+ "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.0"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.0.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Psr\\Http\\Message\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "PHP-FIG",
+ "homepage": "http://www.php-fig.org/"
+ }
+ ],
+ "description": "Common interface for HTTP messages",
+ "homepage": "https://github.com/php-fig/http-message",
+ "keywords": [
+ "http",
+ "http-message",
+ "psr",
+ "psr-7",
+ "request",
+ "response"
+ ],
+ "support": {
+ "source": "https://github.com/php-fig/http-message/tree/master"
+ },
+ "time": "2016-08-06T14:39:51+00:00"
+ },
{
"name": "psr/simple-cache",
"version": "1.0.1",
@@ -700,39 +1037,31 @@
"time": "2017-10-23T01:57:42+00:00"
},
{
- "name": "scssphp/scssphp",
- "version": "1.2.1",
+ "name": "ralouphie/getallheaders",
+ "version": "3.0.3",
"source": {
"type": "git",
- "url": "https://github.com/scssphp/scssphp.git",
- "reference": "a05ea68160b7286ebbfd6e5fd7ae9e1a946ad6e1"
+ "url": "https://github.com/ralouphie/getallheaders.git",
+ "reference": "120b605dfeb996808c31b6477290a714d356e822"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/scssphp/scssphp/zipball/a05ea68160b7286ebbfd6e5fd7ae9e1a946ad6e1",
- "reference": "a05ea68160b7286ebbfd6e5fd7ae9e1a946ad6e1",
+ "url": "https://api.github.com/repos/ralouphie/getallheaders/zipball/120b605dfeb996808c31b6477290a714d356e822",
+ "reference": "120b605dfeb996808c31b6477290a714d356e822",
"shasum": ""
},
"require": {
- "ext-ctype": "*",
- "ext-json": "*",
- "php": ">=5.6.0"
+ "php": ">=5.6"
},
"require-dev": {
- "phpunit/phpunit": "^5.7 || ^6.5 || ^7.5 || ^8.3",
- "sass/sass-spec": "2020.08.10",
- "squizlabs/php_codesniffer": "~3.5",
- "twbs/bootstrap": "~4.3",
- "zurb/foundation": "~6.5"
+ "php-coveralls/php-coveralls": "^2.1",
+ "phpunit/phpunit": "^5 || ^6.5"
},
- "bin": [
- "bin/pscss"
- ],
"type": "library",
"autoload": {
- "psr-4": {
- "ScssPhp\\ScssPhp\\": "src/"
- }
+ "files": [
+ "src/getallheaders.php"
+ ]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
@@ -740,26 +1069,16 @@
],
"authors": [
{
- "name": "Anthon Pang",
- "email": "apang at softwaredevelopment.ca",
- "homepage": "https://github.com/robocoder"
- },
- {
- "name": "Cédric Morin",
- "email": "cedric at yterium.com",
- "homepage": "https://github.com/Cerdic"
+ "name": "Ralph Khattar",
+ "email": "ralph.khattar at gmail.com"
}
],
- "description": "scssphp is a compiler for SCSS written in PHP.",
- "homepage": "http://scssphp.github.io/scssphp/",
- "keywords": [
- "css",
- "less",
- "sass",
- "scss",
- "stylesheet"
- ],
- "time": "2020-09-07T21:15:42+00:00"
+ "description": "A polyfill for getallheaders.",
+ "support": {
+ "issues": "https://github.com/ralouphie/getallheaders/issues",
+ "source": "https://github.com/ralouphie/getallheaders/tree/develop"
+ },
+ "time": "2019-03-08T08:55:37+00:00"
},
{
"name": "smarty/smarty",
@@ -1204,5 +1523,5 @@
"ext-intl": "*"
},
"platform-dev": [],
- "plugin-api-version": "1.1.0"
+ "plugin-api-version": "2.0.0"
}
diff --git a/include/DataUtils.php b/include/DataUtils.php
index 88543e99..1b53a572 100644
--- a/include/DataUtils.php
+++ b/include/DataUtils.php
@@ -7,6 +7,8 @@ require_once __DIR__ . '/../include/Constants.php';
use League\Csv\Reader;
use League\Csv\Statement;
use Symfony\Component\Yaml\Yaml;
+use GuzzleHttp\Client;
+use GuzzleHttp\Promise;
/**
* DataUtils
@@ -32,6 +34,7 @@ class DataUtils
];
+
/**
* Gets the TSV representation from sheets and converts it to YAML on file
*
@@ -39,8 +42,17 @@ class DataUtils
*/
public function getAllData()
{
+ $client = new Client();
+ $promises = [];
foreach (self::SHEET_IDS as $name => $gid) {
- $tsv = \file_get_contents(self::SHEET_URL . "&gid=" . $gid);
+ $url = self::SHEET_URL . "&gid=" . $gid;
+ $promises[$name] = $client->getAsync($url);
+ }
+
+ $responses = Promise\Utils::unwrap($promises);
+
+ foreach ($responses as $name => $response) {
+ $tsv = $response->getBody();
$reader = Reader::createFromString($tsv);
$reader->setDelimiter("\t");
$reader->setHeaderOffset(0);
More information about the Scummvm-git-logs
mailing list