1
0
mirror of https://github.com/Mayccoll/Gogh.git synced 2023-08-10 21:12:46 +03:00

update generator move data outside pages

This commit is contained in:
Mayccoll 2020-12-19 00:02:00 -05:00
parent 15aef9ab84
commit 7da9a87c98
3 changed files with 13 additions and 13 deletions

1
data/themes.json Normal file

File diff suppressed because one or more lines are too long

View File

@ -1,6 +1,5 @@
/* global $, fetch, console */
/* eslint no-undef: "error", semi: 2 */
/* jshint esversion: 6 */
'use strict';
@ -12,11 +11,11 @@ const {
watch
} = require('gulp');
const htmlmin = require('gulp-htmlmin');
const htmlmin = require('gulp-htmlmin');
const inlinesource = require('gulp-inline-source');
const rename = require('gulp-rename');
const browserSync = require('browser-sync').create();
const sass = require('gulp-sass');
const rename = require('gulp-rename');
const browserSync = require('browser-sync').create();
const sass = require('gulp-sass');
function sassCompile () {
return src('./gh-pages/sass/**/main.scss')

View File

@ -48,21 +48,21 @@ createColors() {
mkdir -p $SCRIPT_PATH/../.tmp
echo '{' > $SCRIPT_PATH/../gh-pages/data/themes.json
echo ' "themes": [' >> $SCRIPT_PATH/../gh-pages/data/themes.json
echo '{' > $SCRIPT_PATH/../data/themes.json
echo ' "themes": [' >> $SCRIPT_PATH/../data/themes.json
ls -1 $SCRIPT_PATH/../themes/*.sh | while read a; do grep "export" $a > "${a/themes/.tmp}"; done
ls -1 $SCRIPT_PATH/../.tmp/*.sh | while read a; do sed -i /IMPORTANT/d "${a}"; done
ls -1 $SCRIPT_PATH/../.tmp/*.sh | while read a; do createColors "$a" >> $SCRIPT_PATH/../gh-pages/data/themes.json; done
ls -1 $SCRIPT_PATH/../.tmp/*.sh | while read a; do createColors "$a" >> $SCRIPT_PATH/../data/themes.json; done
echo ' ]' >> $SCRIPT_PATH/../gh-pages/data/themes.json
echo '}' >> $SCRIPT_PATH/../gh-pages/data/themes.json
echo ' ]' >> $SCRIPT_PATH/../data/themes.json
echo '}' >> $SCRIPT_PATH/../data/themes.json
cat $SCRIPT_PATH/../gh-pages/data/themes.json | tr -d " \t\n\r" > $SCRIPT_PATH/../gh-pages/data/themes.json.tmp
sed 's/},]}/}]}/g' $SCRIPT_PATH/../gh-pages/data/themes.json.tmp > $SCRIPT_PATH/../gh-pages/data/themes.json
rm $SCRIPT_PATH/../gh-pages/data/themes.json.tmp
cat $SCRIPT_PATH/../data/themes.json | tr -d " \t\n\r" > $SCRIPT_PATH/../data/themes.json.tmp
sed 's/},]}/}]}/g' $SCRIPT_PATH/../data/themes.json.tmp > $SCRIPT_PATH/../data/themes.json
rm $SCRIPT_PATH/../data/themes.json.tmp
echo ""
echo "File location:"