Updated generative-design branch ref to master (#552)

* 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
This commit is contained in:
Joey Lee 2018-02-20 13:01:22 -05:00 committed by Cassie Tarakajian
parent 27d4013585
commit 2a92d87b52

View file

@ -10,6 +10,12 @@ import Project from './models/project';
// TODO: change to true when testing!
const testMake = false;
// TODO: Change branchName if necessary
const branchName = 'master';
const branchRef = `?ref=${branchName}`;
const clientId = process.env.GITHUB_ID;
const clientSecret = process.env.GITHUB_SECRET;
const defaultHTML =
`<!DOCTYPE html>
<html>
@ -20,7 +26,7 @@ const defaultHTML =
<!-- Generative Design Dependencies here -->
<!-- GG Bundled -->
<script src="https://rawgit.com/generative-design/Code-Package-p5.js/pre-release/libraries/gg-dep-bundle/gg-dep-bundle.js"></script>
<script src="https://rawgit.com/generative-design/Code-Package-p5.js/${branchName}/libraries/gg-dep-bundle/gg-dep-bundle.js"></script>
<!-- Opentype -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/opentype.js/0.7.3/opentype.min.js"></script>
@ -54,12 +60,6 @@ canvas {
}
`;
// TODO: Change branchName if necessary
const branchName = 'gg4editor';
const branchRef = `?ref=${branchName}`;
const clientId = process.env.GITHUB_ID;
const clientSecret = process.env.GITHUB_SECRET;
const headers = { 'User-Agent': 'p5js-web-editor/0.0.1' };
mongoose.connect(process.env.MONGO_URL);
@ -68,7 +68,6 @@ mongoose.connection.on('error', () => {
process.exit(1);
});
/* --- Helper functions --- */
const flatten = function flatten(list) {
return list.reduce((a, b) => a.concat(Array.isArray(b) ? flatten(b) : b), []);