-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(macro): add base macro implementation, fix eslint issues
- Loading branch information
Showing
31 changed files
with
975 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
module.exports = { | ||
presets: ['module:metro-react-native-babel-preset'], | ||
presets: ["module:metro-react-native-babel-preset"], | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
// @generated: @expo/next-adapter@2.1.32 | ||
// Learn more: https://github.com/expo/expo/blob/master/docs/pages/versions/unversioned/guides/using-nextjs.md#shared-steps | ||
|
||
module.exports = { presets: ['@expo/next-adapter/babel'] } | ||
module.exports = { presets: ["@expo/next-adapter/babel"] } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
export { default } from '../App' | ||
export { default } from "../App" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,9 @@ | ||
module.exports = { | ||
plugins: ['@babel/plugin-syntax-jsx'], | ||
plugins: [ | ||
"@babel/plugin-syntax-jsx", | ||
[ | ||
"module-resolver", | ||
{ alias: { "react-native-tailwind.macro": "./src/index.tsx" } }, | ||
], | ||
], | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,24 @@ | ||
const path = require('path') | ||
const child_process = require('child_process') | ||
const path = require("path") | ||
const child_process = require("child_process") | ||
|
||
const root = path.resolve(__dirname, '..') | ||
const root = path.resolve(__dirname, "..") | ||
const args = process.argv.slice(2) | ||
const options = { | ||
cwd: process.cwd(), | ||
env: process.env, | ||
stdio: 'inherit', | ||
encoding: 'utf-8', | ||
stdio: "inherit", | ||
encoding: "utf-8", | ||
} | ||
|
||
let result | ||
|
||
if (process.cwd() !== root || args.length) { | ||
// We're not in the root of the project, or additional arguments were passed | ||
// In this case, forward the command to `yarn` | ||
result = child_process.spawnSync('yarn', args, options) | ||
result = child_process.spawnSync("yarn", args, options) | ||
} else { | ||
// If `yarn` is run without arguments, perform bootstrap | ||
result = child_process.spawnSync('yarn', ['bootstrap'], options) | ||
result = child_process.spawnSync("yarn", ["bootstrap"], options) | ||
} | ||
|
||
process.exitCode = result.status |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import tw from '../../macro' | ||
|
||
const Append = () => ( | ||
<View style={[styles.a, { backgroundColor: 'pink' }]} tw="px-8" /> | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import tw from '../../macro' | ||
|
||
const Prepend = () => ( | ||
<View tw="px-8" style={[styles.a, { backgroundColor: 'pink' }]} /> | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import tw from '../../macro' | ||
|
||
const Comp = () => ( | ||
<View | ||
tw="pt-8" | ||
style={[styles.a, isFocused ? tw`bg-blue-400` : tw`bg-pink-500`]} | ||
/> | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import tw from "../../macro" | ||
|
||
const Comp = () => <View tw="px-8" dataSet={{ foo: "bar" }} /> | ||
|
||
const Comp2 = () => <View tw="px-8" dataSet={{ foo: "bar", media: "baz" }} /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import tw from '../../macro' | ||
|
||
const Append = () => <View style={{ backgroundColor: 'pink' }} tw="px-8" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import tw from '../../macro' | ||
|
||
const Prepend = () => <View tw="px-8" style={{ backgroundColor: 'pink' }} /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import tw from '../../macro' | ||
|
||
const Append = () => <View style={styles.a} tw="px-8" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import tw from '../../macro' | ||
|
||
const Prepend = () => <View tw="px-8" style={styles.a} /> |
Oops, something went wrong.