jenkins-design-language/bin/import-material-icons.js
function validateSourcePath(sourcePath) {
    const materialPackageJSONPath = pathUtils.resolve(sourcePath, 'package.json');

    return fs.readFileAsync(materialPackageJSONPath, { encoding: 'UTF8' })
        .then(materialPackageJSONString => {
            const package = JSON.parse(materialPackageJSONString);
            if (package.name !== sourcePackageName) {
                throw new Error(`Source path ${sourcePath} does not appear to be a clone of https://github.com/callemall/material-ui`);
            }
            return sourcePath;
        });
}
function validateSourcePath(sourcePath) {
    const materialPackageJSONPath = pathUtils.resolve(sourcePath, 'package.json');

    return fs.readFileAsync(materialPackageJSONPath, { encoding: 'UTF8' })
        .then(materialPackageJSONString => {
            const package = JSON.parse(materialPackageJSONString);
            if (package.name !== sourcePackageName) {
                throw new Error(`Source path ${sourcePath} does not appear to be a clone of https://github.com/callemall/material-ui`);
            }
            return sourcePath;
        });
}
function validateSourcePath ( sourcePath ) { const materialPackageJSONPath = pathUtils . resolve ( sourcePath , 'package.json' ) ; return fs . readFileAsync ( materialPackageJSONPath , { encoding : 'UTF8' } ) . then ( materialPackageJSONString => { const package = JSON . parse ( materialPackageJSONString ) ; if ( package . name !== sourcePackageName ) { throw new Error ( ` ${ sourcePath } ` ) ; } return sourcePath ; } ) ; }
Make sure the source path is correct in that it exists and appears to point to the root of the repo we want.
Make sure the source path is correct in that it exists and appears to point to the root of the repo we want .