function replaceBaseHref (folder) {
    // handle index.html
    const filePath = path.join(__dirname, '/code.material.angularjs.org/', folder, '/index.html');
    const file = fs.readFileSync(filePath);
    const contents = file.toString().replace(/base href="\//g, 'base href="/' + folder + '/');
    fs.writeFileSync(filePath, contents);
  }
function replaceBaseHref (folder) {
    // handle index.html
    const filePath = path.join(__dirname, '/code.material.angularjs.org/', folder, '/index.html');
    const file = fs.readFileSync(filePath);
    const contents = file.toString().replace(/base href="\//g, 'base href="/' + folder + '/');
    fs.writeFileSync(filePath, contents);
  }
function replaceBaseHref ( folder ) { // handle index.html const filePath = path . join ( __dirname , '/code.material.angularjs.org/' , folder , '/index.html' ) ; const file = fs . readFileSync ( filePath ) ; const contents = file . toString ( ) . replace ( / base href="\/ / g , 'base href="/' + folder + '/' ) ; fs . writeFileSync ( filePath , contents ) ; }
replaces base href in index.html for new version as well as latest
replaces base href in index . html for new version as well as latest
replace base href in index. html