INNER CODE UNIT · JavaScript

isExpoProject

stovmascript/react-native-version · index.js:117

function isExpoProject(projPath) {
	try {
		let module = resolveFrom(projPath, "expo");
		let appInfo = require(`${projPath}/app.json`);

		return !!(module && appInfo.expo);
	} catch (err) {
		return false;
	}
}

/**
 * Versions your app
 * @param {Object} program commander/CLI-style options, camelCased
 * @param {string} projectPath Path to your React Native project
 * @return {Promise<string|Error>} A promise which resolves with the last commit hash
 */
function version(program, projectPath) {

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…