Skip to content

Commit 0dc6322

Browse files
committed
add text content to .vert and .frag files
1 parent 204fa82 commit 0dc6322

File tree

1 file changed

+10
-21
lines changed

1 file changed

+10
-21
lines changed

server/scripts/examples.js

Lines changed: 10 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -141,17 +141,6 @@ function getSketchContent(projectsInAllCategories) {
141141
}))));
142142
}
143143

144-
// a function to await for the response that contains the content of asset file
145-
function doRequest(options) {
146-
return new Promise(((resolve, reject) => {
147-
rp(options).then((response) => {
148-
resolve(response);
149-
}).catch((error) => {
150-
reject(error);
151-
});
152-
}));
153-
}
154-
155144
function createProjectsInP5user(projectsInAllCategories) {
156145
const options = {
157146
url: 'https://api.github.com/repos/processing/p5.js-website/contents/src/data/examples/assets',
@@ -301,16 +290,16 @@ function createProjectsInP5user(projectsInAllCategories) {
301290
json: true
302291
};
303292

304-
// //a function to await for the response that contains the content of asset file
305-
// function doRequest(options) {
306-
// return new Promise(function (resolve, reject) {
307-
// rp(options).then((response) => {
308-
// resolve(response);
309-
// }).catch((error) => {
310-
// reject(error);
311-
// })
312-
// })
313-
// }
293+
// a function to await for the response that contains the content of asset file
294+
const doRequest = function (_options) {
295+
return new Promise(((resolve, reject) => {
296+
rp(_options).then((response) => {
297+
resolve(response);
298+
}).catch((error) => {
299+
reject(error);
300+
});
301+
}));
302+
};
314303

315304
assetContent = await doRequest(assetOptions);
316305
// push to the files array of the project only when response is received

0 commit comments

Comments
 (0)