-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
v2.0.2 .
- Loading branch information
0 parents
commit e239bb6
Showing
59 changed files
with
22,898 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,92 @@ | ||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
lerna-debug.log* | ||
|
||
# Diagnostic reports (https://nodejs.org/api/report.html) | ||
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json | ||
|
||
# Runtime data | ||
pids | ||
*.pid | ||
*.seed | ||
*.pid.lock | ||
.DS_Store | ||
|
||
# Directory for instrumented libs generated by jscoverage/JSCover | ||
lib-cov | ||
|
||
# Coverage directory used by tools like istanbul | ||
coverage | ||
*.lcov | ||
|
||
# nyc test coverage | ||
.nyc_output | ||
|
||
# node-waf configuration | ||
.lock-wscript | ||
|
||
# Compiled binary addons (https://nodejs.org/api/addons.html) | ||
build/Release | ||
|
||
# Dependency directories | ||
node_modules/ | ||
jspm_packages/ | ||
|
||
# TypeScript v1 declaration files | ||
typings/ | ||
|
||
# TypeScript cache | ||
*.tsbuildinfo | ||
|
||
# Optional npm cache directory | ||
.npm | ||
|
||
# Optional eslint cache | ||
.eslintcache | ||
|
||
# Optional REPL history | ||
.node_repl_history | ||
|
||
# Output of 'npm pack' | ||
*.tgz | ||
|
||
# Yarn Integrity file | ||
.yarn-integrity | ||
|
||
# dotenv environment variables file | ||
.env | ||
.env.test | ||
|
||
# parcel-bundler cache (https://parceljs.org/) | ||
.cache | ||
|
||
# next.js build output | ||
.next | ||
|
||
# nuxt.js build output | ||
.nuxt | ||
|
||
# vuepress build output | ||
.vuepress/dist | ||
|
||
# Serverless directories | ||
.serverless/ | ||
|
||
# FuseBox cache | ||
.fusebox/ | ||
|
||
# DynamoDB Local files | ||
.dynamodb/ | ||
|
||
# Webpack | ||
.webpack/ | ||
|
||
# Electron-Forge | ||
out/ | ||
|
||
.vs | ||
zedd-app/icons |
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,27 @@ | ||
{ | ||
// Use IntelliSense to learn about possible attributes. | ||
// Hover to view descriptions of existing attributes. | ||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"type": "node", | ||
"request": "launch", | ||
"name": "electron@7.0.0 install", | ||
"env": { | ||
"ELECTRON_MIRROR": "https://npm.taobao.org/mirrors/electron/", | ||
"DEBUG": "*" | ||
}, | ||
"program": "${workspaceFolder}/zedd-app/node_modules/electron/install.js", | ||
"outFiles": ["${workspaceFolder}/**/*.js"], | ||
"cwd": "${workspaceFolder}/zedd-app" | ||
}, | ||
{ | ||
"type": "node", | ||
"request": "launch", | ||
"name": "Launch Program", | ||
"program": "${workspaceFolder}\\zedd-app\\src\\sq.js", | ||
"outFiles": ["${workspaceFolder}/**/*.js"] | ||
} | ||
] | ||
} |
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,14 @@ | ||
{ | ||
"editor.formatOnSave": true, | ||
"mocha.requires": [ | ||
"ts-node/register" | ||
], | ||
"mocha.files.glob": "src/**/*.test.ts", | ||
"mocha.subdirectory": "zedd-app", | ||
"mocha.env": { | ||
"TS_NODE_TRANSPILE_ONLY": "1", | ||
"TS_NODE_COMPILER_OPTIONS": "{\"module\":\"commonjs\"}" | ||
}, | ||
"eslint.nodePath": "zedd-app/node_modules", | ||
"eslint.alwaysShowStatus": 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,21 @@ | ||
##Prerequisistes | ||
|
||
1. Node 12+ | ||
2. Win 10 SDK (min (possibly exactly) Build 14393) | ||
3. VC++ 2017 (if you get an error about a missing platform.winmd, try installing VC++ 2015 too) | ||
|
||
```sh | ||
git clone https://github.com/NaridaL/zedd.git | ||
cd zedd | ||
|
||
cd zedd-clarity | ||
npm install | ||
npm run build | ||
|
||
cd .. | ||
|
||
cd zedd-app | ||
npm install | ||
npm run genicons | ||
npm run start | ||
``` |
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,23 @@ | ||
module.exports = { | ||
root: true, | ||
parser: '@typescript-eslint/parser', | ||
plugins: ['@typescript-eslint', 'react-hooks'], | ||
extends: [ | ||
'eslint:recommended', | ||
'plugin:@typescript-eslint/eslint-recommended', | ||
'plugin:@typescript-eslint/recommended', | ||
'plugin:react/recommended', | ||
'prettier/@typescript-eslint', | ||
], | ||
rules: { | ||
'yoda': ['warn', 'always', { "onlyEquality": true }], | ||
'react-hooks/rules-of-hooks': 'error', | ||
'react-hooks/exhaustive-deps': 'warn', | ||
'@typescript-eslint/explicit-function-return-type': 'off', | ||
'@typescript-eslint/no-non-null-assertion': 'off', | ||
'@typescript-eslint/no-inferrable-types': 'off', | ||
'eqeqeq': 'error', | ||
'@typescript-eslint/no-unused-vars': ['warn', { 'varsIgnorePattern': '^_' }], | ||
'no-constant-condition': ['warn', { checkLoops: false }] | ||
}, | ||
} |
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,28 @@ | ||
{ | ||
"compilerOptions": { | ||
"removeComments": false, | ||
"preserveConstEnums": true, | ||
"sourceMap": true, | ||
"declaration": true, | ||
"noImplicitAny": true, | ||
"noImplicitReturns": true, | ||
"suppressImplicitAnyIndexErrors": true, | ||
"strictNullChecks": true, | ||
"noUnusedLocals": true, | ||
"noImplicitThis": true, | ||
"allowJs": true, | ||
"noUnusedParameters": true, | ||
"importHelpers": true, | ||
"noEmitHelpers": true, | ||
"module": "commonjs", | ||
"resolveJsonModule": true, | ||
"noEmit": true, | ||
"moduleResolution": "node", | ||
"pretty": true, | ||
"target": "esnext", | ||
"jsx": "react", | ||
"allowSyntheticDefaultImports": true, | ||
"experimentalDecorators": true, | ||
"emitDecoratorMetadata": 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,47 @@ | ||
import { promises as fsp } from 'fs' | ||
import * as React from 'react' | ||
import * as ReactDOMServer from 'react-dom/server' | ||
// import icongen = require('icon-gen') | ||
const { convertFile } = require('convert-svg-to-png') | ||
import { convert as icoConvert } from '@fiahfy/ico-convert' | ||
|
||
import { ZeddSvgIcon } from './src/components/ZeddSvgIcon' | ||
|
||
async function genIcon(name: string, svg: (res: number) => React.ReactElement) { | ||
const ress = [16, 24, 128] | ||
for (const res of ress) { | ||
const svgString = ReactDOMServer.renderToStaticMarkup(svg(res)) | ||
const svgFile = `./icons/${name}_${res}.svg` | ||
await fsp.writeFile(svgFile, svgString, 'utf8') | ||
// await icongen(svgFile, './icons', { | ||
// report: true, | ||
// ico: { | ||
// name, | ||
// // sizes: [16, 24, 32, 48, 64, 128, 256], | ||
// sizes: [24], | ||
// }, | ||
// }) | ||
await convertFile(svgFile, { | ||
outputFilePath: `./icons/${name}_${res}.png`, | ||
}) | ||
} | ||
const icoData = await icoConvert( | ||
await Promise.all(ress.map(res => fsp.readFile(`./icons/${name}_${res}.png`))), | ||
) | ||
await fsp.writeFile(`./icons/${name}.ico`, icoData) | ||
} | ||
|
||
;(async () => { | ||
await fsp.mkdir('icons') | ||
const NUMBER_OF_SAMPLES = 13 | ||
await genIcon('paused', res => <ZeddSvgIcon res={res} stopped={true} progress={0} />) | ||
for (let i = 0; i < NUMBER_OF_SAMPLES; i++) { | ||
const progress = i / (NUMBER_OF_SAMPLES - 1) | ||
await genIcon('progress' + i, res => ( | ||
<ZeddSvgIcon res={res} stopped={false} progress={progress} /> | ||
)) | ||
} | ||
await genIcon('app', res => ( | ||
<ZeddSvgIcon res={res} stopped={false} progress={1 / 4} background='#326da8' /> | ||
)) | ||
})() |
Oops, something went wrong.