From 5bcb5119e3c9bd9111f37f415fb42565be14ff92 Mon Sep 17 00:00:00 2001 From: Joey Lee Date: Fri, 7 Dec 2018 11:46:04 -0500 Subject: [PATCH] Update/Updated Generative Design Examples (#774) * replaced () with {} to fix implicit return error * added first version of fetching generative-design examples * ignore local testing files * formatting * updated examples-gg-latest * updated examples-gg-latest.js - data files not served via rawgit - hallelujah! - added jquery * updated p5 version * refactoring and code cleanup * added comment * comment out link to svgFiles - unused * moved commented code * fixed conflicts * linted examples-gg-latest * changed branch ref to master * rm spaces * updated url links with https for jquery and set branch to dev-updates for testing * changed branched ref to master * removed console.log of response.data to prevent logging user data to console * fixed linting error * updated p5 version from 0.7.1 to 0.7.2 --- server/scripts/examples-gg-latest.js | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/server/scripts/examples-gg-latest.js b/server/scripts/examples-gg-latest.js index c3d01145..da06db8e 100644 --- a/server/scripts/examples-gg-latest.js +++ b/server/scripts/examples-gg-latest.js @@ -21,16 +21,13 @@ const defaultHTML = ` - - - + + + - - + @@ -38,9 +35,9 @@ const defaultHTML = - + @@ -432,10 +429,10 @@ function getAllSketchContent(newProjectList) { console.log(sketchFile.name); // https://cdn.rawgit.com/opensourcedesign/fonts/2f220059/gnu-freefont_freesans/FreeSans.otf?raw=true // "https://raw.githubusercontent.com/generative-design/Code-Package-p5.js/gg4editor/01_P/P_3_2_1_01/data/FreeSans.otf", - const rawGitRef = `https://cdn.rawgit.com/${newProject.files[i].url.split('.com/')[1]}`; + const rawGitRef = `https://raw.githack.com/${newProject.files[i].url.split('.com/')[1]}`; sketchFile.content = rawGitRef; sketchFile.url = rawGitRef; - + // https://raw.githack.com/generative-design/Code-Package-p5.js/master/libraries/gg-dep-bundle/gg-dep-bundle.js // replace ref in sketch.js ==> should serve from the file? // newProject.files[1].content = newProject.files[1].content.replace(`'data/${sketchFile.name}'`, `'${rawGitRef}'`); resolve(newProject);