move source to src/

This commit is contained in:
Flummi 2020-01-20 18:32:35 +01:00
parent 444c737e4e
commit 70227f50c0
11 changed files with 19 additions and 109 deletions

View File

@ -1279,7 +1279,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
var _reactNative = _$$_REQUIRE(_dependencyMap[1], "react-native"); var _reactNative = _$$_REQUIRE(_dependencyMap[1], "react-native");
var _App = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[2], "./App")); var _App = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[2], "./src/App"));
var _app = _$$_REQUIRE(_dependencyMap[3], "./app.json"); var _app = _$$_REQUIRE(_dependencyMap[3], "./app.json");
@ -95976,7 +95976,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
var _themes = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[14], "./config/themes")); var _themes = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[14], "./config/themes"));
var _jsxFileName = "/home/flummi/dev/f0ckapp/App.js"; var _jsxFileName = "/home/flummi/dev/f0ckapp/src/App.js";
var AppNavigator = (0, _reactNavigationTabs.createBottomTabNavigator)({ var AppNavigator = (0, _reactNavigationTabs.createBottomTabNavigator)({
Home: _home.default, Home: _home.default,
Help: _help.default, Help: _help.default,
@ -96065,7 +96065,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
var _c; var _c;
$RefreshReg$(_c, "AppContainer"); $RefreshReg$(_c, "AppContainer");
},447,[1,24,25,32,34,37,54,448,530,611,776,783,784,785,777],"App.js"); },447,[1,24,25,32,34,37,54,448,530,611,776,783,784,785,777],"src/App.js");
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) { __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
Object.defineProperty(exports, "__esModule", { Object.defineProperty(exports, "__esModule", {
value: true value: true
@ -119034,7 +119034,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
var _reactNative = _$$_REQUIRE(_dependencyMap[9], "react-native"); var _reactNative = _$$_REQUIRE(_dependencyMap[9], "react-native");
var _jsxFileName = "/home/flummi/dev/f0ckapp/routes/home.js"; var _jsxFileName = "/home/flummi/dev/f0ckapp/src/routes/home.js";
var HomeScreen = function (_React$Component) { var HomeScreen = function (_React$Component) {
(0, _inherits2.default)(HomeScreen, _React$Component); (0, _inherits2.default)(HomeScreen, _React$Component);
@ -119196,7 +119196,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
}(_react.default.Component); }(_react.default.Component);
exports.default = HomeScreen; exports.default = HomeScreen;
},776,[1,103,24,25,32,34,37,54,777,2],"routes/home.js"); },776,[1,103,24,25,32,34,37,54,777,2],"src/routes/home.js");
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) { __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
var _interopRequireDefault = _$$_REQUIRE(_dependencyMap[0], "@babel/runtime/helpers/interopRequireDefault"); var _interopRequireDefault = _$$_REQUIRE(_dependencyMap[0], "@babel/runtime/helpers/interopRequireDefault");
@ -119230,7 +119230,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
var _default = theme; var _default = theme;
exports.default = _default; exports.default = _default;
},777,[1,46,778],"config/themes.js"); },777,[1,46,778],"src/config/themes.js");
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) { __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
var _interopRequireDefault = _$$_REQUIRE(_dependencyMap[0], "@babel/runtime/helpers/interopRequireDefault"); var _interopRequireDefault = _$$_REQUIRE(_dependencyMap[0], "@babel/runtime/helpers/interopRequireDefault");
@ -119700,7 +119700,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
var _reactNative = _$$_REQUIRE(_dependencyMap[8], "react-native"); var _reactNative = _$$_REQUIRE(_dependencyMap[8], "react-native");
var _jsxFileName = "/home/flummi/dev/f0ckapp/routes/help.js"; var _jsxFileName = "/home/flummi/dev/f0ckapp/src/routes/help.js";
var HelpScreen = function (_React$Component) { var HelpScreen = function (_React$Component) {
(0, _inherits2.default)(HelpScreen, _React$Component); (0, _inherits2.default)(HelpScreen, _React$Component);
@ -119747,7 +119747,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
}(_react.default.Component); }(_react.default.Component);
exports.default = HelpScreen; exports.default = HelpScreen;
},783,[1,24,25,32,34,37,54,777,2],"routes/help.js"); },783,[1,24,25,32,34,37,54,777,2],"src/routes/help.js");
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) { __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
var _interopRequireDefault = _$$_REQUIRE(_dependencyMap[0], "@babel/runtime/helpers/interopRequireDefault"); var _interopRequireDefault = _$$_REQUIRE(_dependencyMap[0], "@babel/runtime/helpers/interopRequireDefault");
@ -119772,7 +119772,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
var _reactNative = _$$_REQUIRE(_dependencyMap[8], "react-native"); var _reactNative = _$$_REQUIRE(_dependencyMap[8], "react-native");
var _jsxFileName = "/home/flummi/dev/f0ckapp/routes/contact.js"; var _jsxFileName = "/home/flummi/dev/f0ckapp/src/routes/contact.js";
var ContactScreen = function (_React$Component) { var ContactScreen = function (_React$Component) {
(0, _inherits2.default)(ContactScreen, _React$Component); (0, _inherits2.default)(ContactScreen, _React$Component);
@ -119819,7 +119819,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
}(_react.default.Component); }(_react.default.Component);
exports.default = ContactScreen; exports.default = ContactScreen;
},784,[1,24,25,32,34,37,54,777,2],"routes/contact.js"); },784,[1,24,25,32,34,37,54,777,2],"src/routes/contact.js");
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) { __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
var _interopRequireDefault = _$$_REQUIRE(_dependencyMap[0], "@babel/runtime/helpers/interopRequireDefault"); var _interopRequireDefault = _$$_REQUIRE(_dependencyMap[0], "@babel/runtime/helpers/interopRequireDefault");
@ -119846,7 +119846,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
var _reactNative = _$$_REQUIRE(_dependencyMap[9], "react-native"); var _reactNative = _$$_REQUIRE(_dependencyMap[9], "react-native");
var _jsxFileName = "/home/flummi/dev/f0ckapp/routes/settings.js"; var _jsxFileName = "/home/flummi/dev/f0ckapp/src/routes/settings.js";
var _theme = _syncStorage.default.get("theme") === "dark"; var _theme = _syncStorage.default.get("theme") === "dark";
@ -119901,7 +119901,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
}(_react.default.Component); }(_react.default.Component);
exports.default = SettingScreen; exports.default = SettingScreen;
},785,[1,24,25,32,34,37,54,777,778,2],"routes/settings.js"); },785,[1,24,25,32,34,37,54,777,778,2],"src/routes/settings.js");
__d(function(global, require, _aUnused, _bUnused, module, exports, _cUnused) { __d(function(global, require, _aUnused, _bUnused, module, exports, _cUnused) {
module.exports = { module.exports = {
"name": "f0ckapp", "name": "f0ckapp",

File diff suppressed because one or more lines are too long

View File

@ -2,8 +2,8 @@
* @format * @format
*/ */
import {AppRegistry} from 'react-native'; import {AppRegistry} from "react-native";
import App from './App'; import App from "./src/App";
import {name as appName} from './app.json'; import {name as appName} from "./app.json";
AppRegistry.registerComponent(appName, () => App); AppRegistry.registerComponent(appName, () => App);

View File

@ -1,32 +0,0 @@
{
"name": "f0ckapp",
"version": "0.0.1",
"private": true,
"scripts": {
"android": "react-native run-android",
"ios": "react-native run-ios",
"start": "react-native start",
"test": "jest",
"lint": "eslint ."
},
"dependencies": {
"@react-native-community/async-storage": "^1.7.1",
"react": "16.9.0",
"react-native": "0.61.5",
"react-native-vector-icons": "^6.6.0",
"sync-storage": "^0.4.2"
},
"devDependencies": {
"@babel/core": "^7.6.2",
"@babel/runtime": "^7.6.2",
"@react-native-community/eslint-config": "^0.0.5",
"babel-jest": "^24.9.0",
"eslint": "^6.5.1",
"jest": "^24.9.0",
"metro-react-native-babel-preset": "^0.56.0",
"react-test-renderer": "16.9.0"
},
"jest": {
"preset": "react-native"
}
}

View File

@ -1,58 +0,0 @@
import React from "react";
import theme from "../config/themes";
import { Text, View, TouchableOpacity, FlatList } from 'react-native';
import FastImage from 'react-native-fast-image';
export default class HomeScreen extends React.Component {
state = {
dataSource: [],
debug: "deeeebug"
};
handleScroll = e => {
const el = e.nativeEvent;
this.setState({
debug: `${el.contentOffset.y.toFixed(2)}px`
});
};
handleLayout = e => {
console.log(e.nativeEvent.layout);
};
async componentDidMount() {
const res = await (await fetch("https://dev.f0ck.me/api/p?eps=54")).json();
const items = res.items.map(e => ({
id: e.id,
src: `https://f0ck.me/t/${e.id}.png`
}));
this.setState({
dataSource: items
});
}
render() {
return (
<View style={{ flex: 1, backgroundColor: theme.background }}>
<FastImage source={{ uri: theme.logo }} style={{ width: 112, height: 28, marginTop: 16 }}></FastImage>
<Text style={{ color: "#fff", fontWeight: "bold", textAlign: "right" }}>{this.state.debug}</Text>
<FlatList
data={this.state.dataSource}
onScroll={this.handleScroll}
onLayout={this.handleLayout}
renderItem={({ item }) => (
<View style={{ flex: 1, flexDirection: "column", margin: 1 }}>
<TouchableOpacity key={item.id} style={{ flex: 1 }} >
<FastImage style={{ height: 128, width: 128 }} source={{ uri: item.src }} />
</TouchableOpacity>
</View>
)}
numColumns={4}
keyExtractor={(item, index) => index.toString()}
/>
</View>
);
}
}

View File

View File

@ -2,7 +2,7 @@ import React from "react";
import theme from "../config/themes"; import theme from "../config/themes";
import { Text, View, Image } from 'react-native'; import { Text, View, Image } from "react-native";
export default class ContactScreen extends React.Component { export default class ContactScreen extends React.Component {
render() { render() {

View File

@ -2,7 +2,7 @@ import React from "react";
import theme from "../config/themes"; import theme from "../config/themes";
import { Text, View, TouchableOpacity, FlatList, Image } from 'react-native'; import { Text, View, TouchableOpacity, FlatList, Image } from "react-native";
export default class HomeScreen extends React.Component { export default class HomeScreen extends React.Component {
state = { state = {

View File

@ -3,7 +3,7 @@ import React from "react";
import theme from "../config/themes"; import theme from "../config/themes";
import SyncStorage from "sync-storage"; import SyncStorage from "sync-storage";
import { Text, View, Switch, Image } from 'react-native'; import { Text, View, Switch, Image } from "react-native";
let _theme = SyncStorage.get("theme") === "dark"; let _theme = SyncStorage.get("theme") === "dark";