-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from wh1tecat-nya/develop
Develop
- Loading branch information
Showing
92 changed files
with
16,671 additions
and
4,344 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
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 |
---|---|---|
|
@@ -16,6 +16,7 @@ dist | |
.npm | ||
.yarn-integrity | ||
.eslintcache | ||
.cache/ | ||
|
||
# userfiles | ||
.DS_Store | ||
|
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,5 +1,7 @@ | ||
{ | ||
"trailingComma": "es5", | ||
"tabWidth": 4, | ||
"useTabs": true | ||
"useTabs": true, | ||
"printWidth": 100 | ||
|
||
} |
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 '@storybook/addon-actions/register'; | ||
import '@storybook/addon-links/register'; | ||
import '@storybook/addon-knobs/register'; |
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,12 @@ | ||
import { | ||
configure, | ||
} from "@storybook/react"; | ||
import "antd/dist/antd.less"; | ||
|
||
const req = require.context("../src/components", true, /stories.js$/); | ||
|
||
function loadStories () { | ||
req.keys().forEach(filename => req(filename)); | ||
} | ||
|
||
configure(loadStories, module); |
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,7 @@ | ||
const base = require("../webpack.config"); | ||
const webpack = require("webpack"); | ||
|
||
module.exports = { | ||
...base, | ||
plugins: [new webpack.EnvironmentPlugin(["NODE_ENV", "SERVER_URL"])], | ||
}; |
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 @@ | ||
@types/react-native |
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,4 @@ | ||
{ | ||
"f9155ac790fd02fadcdeca367b02581c04a353aa6d5aa84409a59f6804c87acd": true, | ||
"89ed26367cdb9b771858e026f2eb95bfdb90e5ae943e716575327ec325f39c44": true | ||
} |
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,11 @@ | ||
node_modules/**/* | ||
.expo/* | ||
npm-debug.* | ||
*.jks | ||
*.p8 | ||
*.p12 | ||
*.key | ||
*.mobileprovision | ||
*.orig.* | ||
web-build/ | ||
web-report/ |
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 @@ | ||
{} |
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,10 @@ | ||
import { registerRootComponent } from "expo"; | ||
import { activateKeepAwake } from "expo-keep-awake"; | ||
|
||
import App from "./src/App"; | ||
|
||
if (__DEV__) { | ||
activateKeepAwake(); | ||
} | ||
|
||
registerRootComponent(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 |
---|---|---|
@@ -0,0 +1,30 @@ | ||
{ | ||
"expo": { | ||
"name": "ISCPD", | ||
"slug": "ISCPD", | ||
"privacy": "public", | ||
"sdkVersion": "35.0.0", | ||
"platforms": [ | ||
"ios", | ||
"android", | ||
"web" | ||
], | ||
"version": "1.0.0", | ||
"orientation": "portrait", | ||
"icon": "./assets/icon.png", | ||
"splash": { | ||
"image": "./assets/splash.png", | ||
"resizeMode": "contain", | ||
"backgroundColor": "#ffffff" | ||
}, | ||
"updates": { | ||
"fallbackToCacheTimeout": 0 | ||
}, | ||
"assetBundlePatterns": [ | ||
"**/*" | ||
], | ||
"ios": { | ||
"supportsTablet": true | ||
} | ||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,6 @@ | ||
module.exports = function(api) { | ||
api.cache(true); | ||
return { | ||
presets: ["babel-preset-expo"], | ||
}; | ||
}; |
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,29 @@ | ||
{ | ||
"name": "ISCPD-App", | ||
"version": "0.0.1", | ||
"description": "for mobile", | ||
"author": "wh1tecat <[email protected]>", | ||
"main": "./AppEntry.js", | ||
"license": "MIT", | ||
"scripts": { | ||
"start": "expo start", | ||
"android": "expo start --android", | ||
"ios": "expo start --ios", | ||
"web": "expo start --web", | ||
"eject": "expo eject" | ||
}, | ||
"dependencies": { | ||
"ISCPD-Contents": "^0.0.1", | ||
"expo": "^35.0.0", | ||
"react": "16.8.3", | ||
"react-dom": "16.8.3", | ||
"react-native": "https://github.com/expo/react-native/archive/sdk-35.0.0.tar.gz", | ||
"react-native-web": "^0.11.7" | ||
}, | ||
"devDependencies": { | ||
"@babel/runtime": "^7.7.2", | ||
"@types/react": "^16.8.23", | ||
"@types/react-native": "^0.57.65", | ||
"babel-preset-expo": "^7.0.0" | ||
} | ||
} |
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,29 @@ | ||
import React from "react"; | ||
import { View, Text, WebView } from "react-native"; | ||
|
||
import { wrapper } from "./utils/wrappter"; | ||
// import { OfficialAbsence } from "ISCPD-Contents"; | ||
// import convertComponentToHtml from "./utils/covertComponetToHtml"; | ||
|
||
// type Props = { | ||
// html: string; | ||
// }; | ||
|
||
export default function App() { | ||
const htmlString = wrapper(); | ||
console.log(htmlString); | ||
|
||
return ( | ||
<> | ||
{/* <View> | ||
<Text>hoge</Text> | ||
</View> */} | ||
{/* <WebView | ||
originWhitelist={["*"]} | ||
source={{ uri: "https://github.com/facebook/react-native" }} | ||
style={{ marginTop: 20 }} | ||
/> */} | ||
<WebView style={{ marginTop: 30, marginLeft: 30 }} source={{ html: htmlString }} /> | ||
</> | ||
); | ||
} |
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,26 @@ | ||
// import * as React from "react"; | ||
import { ReactElement } from "react"; | ||
import { renderToString } from "react-dom/server"; | ||
|
||
export default function convertComponentToHtml(jsx: ReactElement): string { | ||
const body = renderToString(jsx); | ||
return ` | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>paper css test</title> | ||
</head> | ||
<body class="A4"> | ||
<section className="sheet padding-25mm"> | ||
${body} | ||
</section> | ||
</body> | ||
</html> | ||
`.trim(); | ||
} |
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,16 @@ | ||
import React from "react"; | ||
import convertComponentToHtml from "./covertComponetToHtml"; | ||
|
||
import { OfficialAbsence } from "ISCPD-Contents"; | ||
|
||
export function wrapper() { | ||
console.log(OfficialAbsence); | ||
const jsx = ( | ||
<> | ||
<h2>hoge</h2> | ||
{/* <OfficialAbsence /> */} | ||
</> | ||
); | ||
const html = convertComponentToHtml(jsx); | ||
return html; | ||
} |
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,9 @@ | ||
{ | ||
"extends": "../../tsconfig.json", | ||
"include": ["./src/*"], | ||
"compilerOptions": { | ||
"jsx": "react-native", | ||
"incremental": true, | ||
"types": ["react", "react-native"] | ||
} | ||
} |
Oops, something went wrong.