molecule-2d-for-react
Version:
2D molecule visualization using React and D3
20 lines (16 loc) • 597 B
JavaScript
const fs = require('fs');
const seleniumDownload = require('selenium-download');
const BINPATH = './node_modules/nightwatch/bin/';
/**
* selenium-download does exactly what it's name suggests;
* downloads (or updates) the version of Selenium (& chromedriver)
* on your localhost where it will be used by Nightwatch.
*/
fs.stat(`${BINPATH}selenium.jar`, (err, stat) => {
if (err || !stat || stat.size < 1) {
seleniumDownload.ensure(BINPATH, (error) => {
if (error) throw new Error(error);
console.log('✔ Selenium & Chromedriver downloaded to:', BINPATH);
});
}
});