Skip to content

Instantly share code, notes, and snippets.

View Titozzz's full-sized avatar
🥰
Open Source 💯

Thibault Malbranche Titozzz

🥰
Open Source 💯
View GitHub Profile
@Titozzz
Titozzz / machine.js
Last active May 26, 2020 12:50
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
{
"name": "@monorepo-example/mobileapp",
"version": "0.0.1",
"private": true,
"scripts": {
"android": "react-native run-android",
"ios": "react-native run-ios",
"start": "react-native start",
"lint": "eslint ."
},
plugins: [
[
'module-resolver',
{
alias: {
react: require.resolve('react', {
paths: [path.join(__dirname, './')],
}),
'^react-native$': require.resolve(`react-native`, {
paths: [path.join(__dirname, './')],
const path = require('path');
const reactNativePath = require.resolve('react-native');
const reactNativeFolder = `${
reactNativePath.split('node_modules/react-native/')[0]
}node_modules/react-native/`;
const getConfig = async () => ({
watchFolders: [path.resolve(__dirname, '../../')],
transformer: {
const path = require('path');
const reactNativePath = require.resolve('react-native');
const reactNativeFolder = `${
reactNativePath.split('node_modules/react-native/')[0]
}node_modules/react-native/`;
const getConfig = async () => ({
watchFolders: [path.resolve(__dirname, '../../')],
transformer: {
const path = require('path');
module.exports = {
watchFolders: [path.resolve(__dirname, '../../')],
transformer: {
getTransformOptions: async () => ({
transform: {
experimentalImportSupport: false,
inlineRequires: false,
},
@Titozzz
Titozzz / script.sh
Created January 13, 2020 13:27
Bundle React Native code and images
export NODE_BINARY=node
export PROJECT_ROOT="$PROJECT_DIR/.."
../../../node_modules/react-native/scripts/react-native-xcode.sh
@Titozzz
Titozzz / build.gradle
Created January 13, 2020 10:13
build.gradle
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext {
buildToolsVersion = "28.0.3"
minSdkVersion = 16
compileSdkVersion = 28
targetSdkVersion = 28
}
repositories {
@Titozzz
Titozzz / settings.gradle
Created January 13, 2020 10:05
settings.gradle
rootProject.name = 'mobileapp'
/**
* YOUR PATH TO REACT NATIVE CLI (from android folder)
*/
apply from: file("../../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings)
include ':app'
@Titozzz
Titozzz / build.gradle
Last active January 13, 2020 13:16
app/build.gradle
apply plugin: "com.android.application"
import com.android.build.OutputFile
project.ext.react = [
entryFile: "index.js",
enableHermes: false,
/**
* YOUR REACT NATIVE PATH (from your package folder)
*/