Problem
The Wikimedia Portals repo is largely a Node application that produces static HTML/CSS/JS, so cross-OS compatibility shouldn't be an issue.
However, there are a few places where unix-centric shortcuts are used instead of employing the cross-OS Node functions
These include basically all usage of exec():
function garbageCollect() {
exec( 'find cache -mtime +' + ( DAYS + 2 ) + ' -delete', function ( error ) {
if ( error ) {
console.error( 'Error deleting old cached stats', error ); // eslint-disable-line no-console
}
} );
}if ( fs.existsSync( translationPath ) ) {
exec( 'find ' + translationPath + ' -mindepth 1 -delete' );
} else {
fs.mkdirSync( translationPath );
}- The double ampersands and backslashed paths in package.json may also be problematic.
"scripts": {
"start": "gulp update-stats && gulp watch --portal=wikipedia.org & npm run dev-server",
"dev-server": "es-dev-server --app-index ./dev/wikipedia.org/index.html --preserve-symlinks=true --watch --open",
"test": "gulp -- lint",
"build-all-portals": "gulp -- lint && gulp -- update-stats && gulp --portal=all -- fetch-meta && gulp --portal=wikipedia.org -- default"
},- /dev/wikipedia.org/portal is a symlink, which is a UNIX specific construct.