An easy-to-use platform for EEG experimentation in the classroom
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Tidied up dependency bugs related to pyodide rebase

authored by

Dano Morrison and committed by
Teon L Brooks
3410b625 5de658ee

+5 -19
+5 -19
internals/scripts/InstallPyodide.js
··· 1 - // mkdir app/utils/pyodide/src 2 - // && cd app/utils/pyodide/src 3 - // curl -LJO https://github.com/iodide-project/pyodide/releases/download/0.12.0/pyodide-build-0.12.0.tar.bz2 4 - // tar xjf pyodide-build-0.12.0.tar.bz2 5 - // rm pyodide-build-0.12.0.tar.bz2", 6 - 7 1 import chalk from 'chalk'; 8 2 import fs from 'fs'; 9 3 import https from 'https'; ··· 17 11 const TAR_URL = `https://github.com/iodide-project/pyodide/releases/download/${PYODIDE_VERSION}/pyodide-build-${PYODIDE_VERSION}.tar.bz2`; 18 12 const PYODIDE_DIR = 'app/utils/pyodide/src/'; 19 13 20 - const writeAndUnzipFile = response => { 14 + const writeAndUnzipFile = (response) => { 21 15 const filePath = `${PYODIDE_DIR}${TAR_NAME}`; 22 16 const writeStream = fs.createWriteStream(filePath); 23 17 response.pipe(writeStream); ··· 38 32 }); 39 33 }; 40 34 41 - const downloadFile = response => { 42 - if ( 43 - response.statusCode > 300 && 44 - response.statusCode < 400 && 45 - response.headers.location 46 - ) { 35 + const downloadFile = (response) => { 36 + if (response.statusCode > 300 && response.statusCode < 400 && response.headers.location) { 47 37 if (url.parse(response.headers.location).hostname) { 48 38 https.get(response.headers.location, writeAndUnzipFile); 49 39 } else { ··· 59 49 60 50 (() => { 61 51 if (fs.existsSync(`${PYODIDE_DIR}${TAR_NAME}`)) { 62 - console.log( 63 - `${chalk.green.bold(`Pyodide is already present: ${PYODIDE_VERSION}...`)}` 64 - ); 52 + console.log(`${chalk.green.bold(`Pyodide is already present: ${PYODIDE_VERSION}...`)}`); 65 53 return; 66 54 } 67 - console.log( 68 - `${chalk.green.bold(`Downloading pyodide ${PYODIDE_VERSION}...`)}` 69 - ); 55 + console.log(`${chalk.green.bold(`Downloading pyodide ${PYODIDE_VERSION}...`)}`); 70 56 mkdirp.sync(`app/utils/pyodide/src`); 71 57 https.get(TAR_URL, downloadFile); 72 58 })();