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
const { execSync } = require('child_process') | |
const checkIfAffected = (modules) => { | |
const result = execSync('yarn nx print-affected --select=projects').toString() | |
const changedModules = result.split('\n')[2].split(', ') | |
return modules.some((module) => changedModules.includes(module)) | |
} | |
if (require.main === module) { | |
const modules = process.argv.slice(2) |
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
// Modified version of https://github.com/mskelton/ratchet | |
import type { NodePath } from 'ast-types/lib/node-path'; | |
import type { | |
API, | |
Collection, | |
CommentBlock, | |
CommentLine, | |
FileInfo, | |
Identifier, |
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
import { ref, watch, onBeforeUnmount } from 'vue'; | |
export const useState = (initialValue) => { | |
const state = ref(initialValue); | |
const setState = (value) => { | |
state.value = value; | |
}; | |
return [state, setState]; | |
}; |
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
// Keep in sync with | |
// https://github.com/flutter/flutter/blob/master/packages/flutter/lib/src/cupertino/colors.dart | |
export default { | |
black: 'rgba(0, 0, 0, 255)', | |
white: 'rgba(255, 255, 255, 255)', | |
systemBlue: { | |
light: 'rgba(0, 122, 255, 255)', | |
dark: 'rgba(10, 132, 255, 255)', | |
}, |
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
Resources: | |
NodeSecurityGroup: | |
Type: "AWS::EC2::SecurityGroup" | |
Properties: | |
GroupDescription: Enable HTTP access via port 3000 | |
SecurityGroupIngress: | |
- | |
IpProtocol: tcp | |
FromPort: 3000 | |
ToPort: 3000 |
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
// Based on the amazing work on https://ethercreative.github.io/react-native-shadow-generator/ | |
// https://github.com/ethercreative/react-native-shadow-generator | |
const penumbra = [ | |
'0px 1px 1px 0px', | |
'0px 2px 2px 0px', | |
'0px 3px 4px 0px', | |
'0px 4px 5px 0px', | |
'0px 5px 8px 0px', | |
'0px 6px 10px 0px', |
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
{ | |
"name": "YourAwesomeProject", | |
"version": "0.0.1", | |
"private": true, | |
"scripts": { | |
"start": "node node_modules/react-native/local-cli/cli.js start", | |
"watch": "nodemon node_modules/react-native/local-cli/cli.js start", | |
"eslint-init": "eslint --init", | |
"flow": "flow", | |
"test": "yarn jest && flow && eslint .", |
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
cd .. | |
react-native init YourAwesomeProject | |
cd YourAwesomeProject | |
react-native run-android | |
yarn remove react-native | |
yarn add [email protected] | |
yarn remove babel-preset-react-native | |
yarn add [email protected] | |
yarn add prop-types react-native-vector-icons redux redux-logger redux-persist redux-saga | |
yarn add -D babel-core@latest babel-loader@latest eslint eslint-config-airbnb eslint-plugin-jsx-a11y eslint-plugin-import eslint-plugin-react flow-bin flow-typed jest react-test-renderer |
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
{ | |
"root": true, | |
"parser": "babel-eslint", | |
"extends": "airbnb", | |
"env": { | |
"es6": true, | |
"node": true, | |
"jest": true | |
}, | |
"plugins": [ |
NewerOlder