ignite-ir-boilerplate-bowser
Advanced tools
Comparing version 1.1.0 to 1.1.1
@@ -71,6 +71,2 @@ const { merge, pipe, assoc, omit, __ } = require('ramda') | ||
}) | ||
filesystem.copy(`${__dirname}/boilerplate/patches`, `${process.cwd()}/patches`, { | ||
overwrite: true, | ||
matching: '!*.ejs' | ||
}) | ||
spinner.stop() | ||
@@ -183,45 +179,11 @@ | ||
insert: '\n @Override\n' + | ||
' protected ReactActivityDelegate createReactActivityDelegate() {\n' + | ||
' return new ReactActivityDelegate(this, getMainComponentName()) {\n' + | ||
' @Override\n' + | ||
' protected ReactRootView createRootView() {\n' + | ||
' return new RNGestureHandlerEnabledRootView(MainActivity.this);\n' + | ||
' }\n' + | ||
' };\n' + | ||
' }' | ||
' protected ReactActivityDelegate createReactActivityDelegate() {\n' + | ||
' return new ReactActivityDelegate(this, getMainComponentName()) {\n' + | ||
' @Override\n' + | ||
' protected ReactRootView createRootView() {\n' + | ||
' return new RNGestureHandlerEnabledRootView(MainActivity.this);\n' + | ||
' }\n' + | ||
' };\n' + | ||
' }' | ||
}) | ||
// patch splash screen | ||
async function patchSplashScreen() { | ||
spinner.text = `▸ setting up splash screen` | ||
spinner.start() | ||
spinner.text = `▸ setting up splash screen: configuring` | ||
// Grab the patches | ||
const patchPath = `${process.cwd()}/patches/splash-screen/splash-screen.patch` | ||
const iphoneXPatchPath = `${process.cwd()}/patches/splash-screen/iphonex-splash-screen.patch` | ||
const patch = filesystem.read(patchPath) | ||
const iphoneXPatch = filesystem.read(iphoneXPatchPath) | ||
// Change some android configs in the main patch | ||
const androidOldMainPathRegex = new RegExp('/android/app/src/main/java/com/SplashScreenPatch/MainActivity.java', 'g') | ||
const androidNewMainPath = `/android/app/src/main/java/com/${name.toLowerCase()}/MainActivity.java` | ||
const androidPatch = patch.replace(androidOldMainPathRegex, androidNewMainPath) | ||
// Replace placeholder name with this projects actual name | ||
const patchForNewProject = androidPatch.replace(/SplashScreenPatch/g, name) | ||
const iphoneXPatchForNewProject = iphoneXPatch.replace(/SplashScreenPatch/g, name) | ||
filesystem.write(patchPath, patchForNewProject) | ||
filesystem.write(iphoneXPatchPath, iphoneXPatchForNewProject) | ||
// Apply the patches | ||
await system.run(`git apply ${patchPath}`, { stdio: 'ignore' }) | ||
await system.run(`git apply ${iphoneXPatchPath}`, { stdio: 'ignore' }) | ||
// Cleanup | ||
spinner.text = `▸ setting up splash screen: cleaning` | ||
filesystem.remove(`${process.cwd()}/patches/splash-screen`) | ||
} | ||
await patchSplashScreen() | ||
spinner.stop() | ||
} catch (e) { | ||
@@ -251,3 +213,3 @@ ignite.log(e) | ||
// re-run react-native link | ||
await system.run('react-native link') | ||
await system.spawn('react-native link', { stdio: 'ignore' }) | ||
spinner.succeed(`Linked dependencies`) | ||
@@ -254,0 +216,0 @@ |
@@ -7,3 +7,3 @@ { | ||
"homepage": "https://github.com/infinitered/ignite-ir-boilerplate-bowser", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"files": [ | ||
@@ -10,0 +10,0 @@ "boilerplate", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
0
5463426
167
3911