-
-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
165 additions
and
189 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,41 +1,41 @@ | ||
{ | ||
"package": { | ||
"dependencies": { | ||
"@reduxjs/toolkit": "^1.2.5", | ||
"@testing-library/jest-dom": "^5.11.4", | ||
"@testing-library/react": "^12.0.0", | ||
"@testing-library/user-event": "^13.2.1", | ||
"@types/jest": "^27.0.1", | ||
"@types/node": "^16.7.11", | ||
"@types/react": "^17.0.20", | ||
"@types/react-dom": "^17.0.9", | ||
"@types/react-redux": "^7.1.9", | ||
"i18next": "^20.6.0", | ||
"overwolf-hooks": "^2.0.0", | ||
"react-i18next": "^11.7.3", | ||
"react-redux": "^7.2.1", | ||
"typescript": "^4.0.3", | ||
"web-vitals": "^2.1.0" | ||
}, | ||
"devDependencies": { | ||
"@types/remote-redux-devtools": "^0.5.4", | ||
"remote-redux-devtools": "^0.5.16", | ||
"remotedev-server": "^0.3.1", | ||
"@overwolf/types": "^3.12.0" | ||
}, | ||
"eslintConfig": { | ||
"extends": [ | ||
"react-app", | ||
"react-app/jest" | ||
] | ||
}, | ||
"scripts": { | ||
"pack-overwolf": "node create-production-overwolf-build", | ||
"dist-overwolf": "tar -a -c -f dist.zip -C build *", | ||
"start-remote-devtools": "node remote-dev-redux-devtools", | ||
"build:overwolf": "npm run build && npm run pack-overwolf && npm run dist-overwolf", | ||
"create-opk": "tar -a -c -f dist-opk.zip -C build/app * && node create-opk" | ||
}, | ||
"homepage": "." | ||
} | ||
} | ||
"package": { | ||
"dependencies": { | ||
"@reduxjs/toolkit": "^1.2.5", | ||
"@testing-library/jest-dom": "^5.16.4", | ||
"@testing-library/react": "^13.1.1", | ||
"@testing-library/user-event": "^14.1.1", | ||
"@types/jest": "^27.0.1", | ||
"@types/node": "^17.0.31", | ||
"@types/react": "^18.0.8", | ||
"@types/react-dom": "^18.0.3", | ||
"@types/react-redux": "^7.1.9", | ||
"i18next": "^21.6.16", | ||
"overwolf-hooks": "^3.0.1", | ||
"react-i18next": "^11.7.3", | ||
"react-redux": "^8.0.1", | ||
"typescript": "^4.0.3", | ||
"web-vitals": "^2.1.0", | ||
"prettier": "^2.5.1" | ||
}, | ||
"devDependencies": { | ||
"@types/remote-redux-devtools": "^0.5.4", | ||
"remote-redux-devtools": "^0.5.16", | ||
"remotedev-server": "^0.3.1", | ||
"@overwolf/types": "^3.12.0" | ||
}, | ||
"eslintConfig": { | ||
"extends": ["react-app", "react-app/jest"] | ||
}, | ||
"scripts": { | ||
"start-remote-server": "node remotedev-server", | ||
"format": "prettier --write src/**/*.ts{,x}", | ||
"lint": "tsc --noEmit && eslint src/**/*.ts{,x}", | ||
"pack-overwolf": "node create-production-overwolf-build", | ||
"dist-overwolf": "cd build && tar -acf ../dist.v$npm_package_version.zip * && cd -", | ||
"create-opk": "cd build/app && tar -acf ../../dist-opk.v$npm_package_version.zip * && cd - && node create-opk", | ||
"build:overwolf": "npm run build && npm run pack-overwolf && npm run dist-overwolf && npm run create-opk" | ||
}, | ||
"homepage": "." | ||
} | ||
} |
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,13 +1,14 @@ | ||
const fs = require('fs'); | ||
const path = require('path'); | ||
const fs = require("fs"); | ||
const path = require("path"); | ||
//import metadata from './package.json'; | ||
const { version } = require("./package.json"); | ||
|
||
console.log("Init overwolf opk packaging") | ||
console.log("Init overwolf opk packaging"); | ||
|
||
const currentDir = __dirname; | ||
const distFile = path.join(currentDir, 'dist-opk.zip') | ||
const opkFile = path.join(currentDir, 'dist-opk.opk') | ||
const distFile = path.join(currentDir, `dist-opk.v${version}.zip`); | ||
const opkFile = path.join(currentDir, `dist-opk.v${version}.opk`); | ||
|
||
fs.copyFileSync(distFile, opkFile) | ||
fs.copyFileSync(distFile, opkFile); | ||
|
||
|
||
console.log("opk created successfully!") | ||
console.log("opk created successfully!"); |
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,30 +1,30 @@ | ||
const fs = require('fs'); | ||
const path = require('path'); | ||
const fs = require("fs"); | ||
const path = require("path"); | ||
const { existsSync, mkdirSync, renameSync } = fs; | ||
|
||
console.log("Init overwolf build") | ||
console.log("Init overwolf build"); | ||
|
||
const currentDir = __dirname; | ||
|
||
const fileDir = path.join(currentDir, 'build') | ||
const buildDir = path.join(fileDir, 'app', 'Files'); | ||
const fileDir = path.join(currentDir, "build"); | ||
const buildDir = path.join(fileDir, "app", "Files"); | ||
|
||
// Creating Files directory if doesn't exists | ||
if (!existsSync(buildDir)){ | ||
mkdirSync(buildDir); | ||
if (!existsSync(buildDir)) { | ||
mkdirSync(buildDir); | ||
} | ||
|
||
// Moving index.html and static folder | ||
const index = 'index.html' | ||
const static = 'static' | ||
const index = "index.html"; | ||
const static = "static"; | ||
|
||
const customRename = (name) => { | ||
const oldPath = path.join(fileDir, name) | ||
const newPath = path.join(buildDir, name) | ||
renameSync(oldPath, newPath) | ||
} | ||
const oldPath = path.join(fileDir, name); | ||
const newPath = path.join(buildDir, name); | ||
renameSync(oldPath, newPath); | ||
}; | ||
|
||
customRename(index); | ||
customRename(static); | ||
|
||
console.log("Compiled successfully!"); | ||
console.log("Compiled successfully!"); |
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,13 +1,13 @@ | ||
import { FeedItem } from './FeedItem' | ||
import './Feed.css' | ||
import { FeedItem } from "./FeedItem"; | ||
import "./Feed.css"; | ||
|
||
export function Feed({ title, data }: IFeedProps) { | ||
export function Feed({ title, data }: FeedProps) { | ||
return ( | ||
<div className="feed-container"> | ||
<p>{title}</p> | ||
<ul> | ||
<FeedItem content={JSON.stringify(data, null, 2)} /> | ||
</ul> | ||
</div> | ||
) | ||
); | ||
} |
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 @@ | ||
export function FeedItem({ content }: IFeedItemProps) { | ||
return <li data-icon="🐺">{content}</li> | ||
export function FeedItem({ content }: FeedItemProps) { | ||
return <li data-icon="🐺">{content}</li>; | ||
} |
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,8 +1,8 @@ | ||
interface IFeedProps { | ||
title: string | ||
data: Record<string, string> | ||
interface FeedProps { | ||
title: string; | ||
data: Record<string, string>; | ||
} | ||
|
||
interface IFeedItemProps { | ||
content: string | ||
interface FeedItemProps { | ||
content: string; | ||
} |
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,9 @@ | ||
import { FC } from 'react' | ||
import { ReactNode } from "react"; | ||
|
||
export const Title: FC<ITitle> = ({ color, children }) => { | ||
return <h3 style={{ color }}>{children}</h3> | ||
interface Props extends TitleProps { | ||
children: ReactNode; | ||
} | ||
|
||
export const Title = ({ color, children }: Props) => { | ||
return <h3 style={{ color }}>{children}</h3>; | ||
}; |
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 @@ | ||
interface ITitle { | ||
color: 'red' | 'blue' | 'green' | 'white' | ||
interface TitleProps { | ||
color: "red" | "blue" | "green" | "white"; | ||
} |
Oops, something went wrong.