-
-
Notifications
You must be signed in to change notification settings - Fork 65
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
66 changed files
with
766 additions
and
497 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 |
---|---|---|
@@ -1,41 +1,14 @@ | ||
<!-- | ||
Please make sure you are familiar with and follow the instructions in the | ||
contributing guidelines (found in the CONTRIBUTING.md file). | ||
Please fill out the information below to expedite the review and (hopefully) | ||
merge of your pull request! | ||
--> | ||
|
||
## What kind of change does this PR introduce? | ||
|
||
<!-- Is it a Bug fix, feature, docs update, ... --> | ||
|
||
## What is the current behavior? | ||
|
||
<!-- You can also link to an open issue here --> | ||
|
||
## What is the new behavior? | ||
|
||
<!-- if this is a feature change --> | ||
|
||
## What steps did you take to test this? This is required before I can merge, make sure to test the flow you've updated. | ||
|
||
1. Step A | ||
2. Step B | ||
3. Step C | ||
|
||
## Checklist | ||
|
||
<!-- Have you done all of these things? --> | ||
<!-- add "N/A" to the end of each line that's irrelevant to your changes --> | ||
<!-- to check an item, place an "x" in the box like so: "- [x] Documentation" --> | ||
|
||
- [ ] Documentation | ||
- [ ] Testing <!-- We can only merge the PR if this is checked --> | ||
- [ ] Ready to be merged | ||
<!-- In your opinion, is this ready to be merged as soon as it's reviewed? --> | ||
- [ ] Added myself to contributors table | ||
<!-- this is optional, see the contributing guidelines for instructions --> | ||
|
||
<!-- feel free to add additional comments --> | ||
<!-- Thank you for contributing! --> |
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,71 +1,93 @@ | ||
name: build | ||
|
||
on: | ||
push: | ||
paths-ignore: | ||
- "**.md" | ||
- "**.bbcode" | ||
- LICENSE | ||
branches: [main, dev] | ||
pull_request: | ||
paths-ignore: | ||
- "**.md" | ||
- "**.bbcode" | ||
- LICENSE | ||
branches: [main] | ||
push: | ||
paths-ignore: | ||
- "**.md" | ||
- "**.bbcode" | ||
- LICENSE | ||
branches: [main, dev] | ||
pull_request: | ||
paths-ignore: | ||
- "**.md" | ||
- "**.bbcode" | ||
- LICENSE | ||
branches: [main] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Install build dependencies (apt) | ||
run: sudo apt install -y libx11-dev libxcursor-dev libpng-dev | ||
continue-on-error: false | ||
- name: Get yarn cache directory path | ||
id: yarn-cache-dir-path | ||
run: echo "::set-output name=dir::$(yarn cache dir)" | ||
- name: Caching yarn packages | ||
uses: actions/cache@v2 | ||
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) | ||
with: | ||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | ||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-yarn- | ||
- name: Set Up NodeJS 12.x | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: "12.x" | ||
- name: Caching pip packages | ||
uses: actions/cache@v2 | ||
id: pip-cache # use this to check for `cache-hit` (`steps.pip-cache.outputs.cache-hit != 'true'`) | ||
with: | ||
path: ~/.cache/pip | ||
key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }} | ||
restore-keys: | | ||
${{ runner.os }}-pip- | ||
- name: Set up Python 3.8 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: "3.8" | ||
- name: Generating `macOSBigSur` Cursor Theme | ||
run: make | ||
continue-on-error: false | ||
- name: Compressing UNIX theme | ||
run: tar -cvzf macOSBigSur.tar.gz themes/macOSBigSur | ||
- name: Uploading `bitmaps` artifact | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: bitmaps | ||
path: bitmaps/* | ||
- name: Uploading `macOSBigSur` UNIX Theme artifact | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: macOSBigSur | ||
path: macOSBigSur.tar.gz | ||
- name: Uploading `macOSBigSur` Windows Theme artifact | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: macOSBigSur_Windows | ||
path: themes/macOSBigSur_Windows/* | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Install build dependencies (apt) | ||
run: sudo apt install -y libx11-dev libxcursor-dev libpng-dev | ||
continue-on-error: false | ||
- name: Get yarn cache directory path | ||
id: yarn-cache-dir-path | ||
run: echo "::set-output name=dir::$(yarn cache dir)" | ||
- name: Caching yarn packages | ||
uses: actions/cache@v2 | ||
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) | ||
with: | ||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | ||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-yarn- | ||
- name: Set Up NodeJS 12.x | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: "12.x" | ||
|
||
- name: Caching pip packages | ||
uses: actions/cache@v2 | ||
id: pip-cache # use this to check for `cache-hit` (`steps.pip-cache.outputs.cache-hit != 'true'`) | ||
with: | ||
path: ~/.cache/pip | ||
key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }} | ||
restore-keys: | | ||
${{ runner.os }}-pip- | ||
- name: Set up Python 3.8 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: "3.8" | ||
|
||
- name: Generating `macOSBigSur` Cursor Theme | ||
run: make | ||
continue-on-error: false | ||
|
||
- name: Compressing UNIX theme | ||
run: | | ||
tar -cvzf macOSBigSur.tar.gz themes/macOSBigSur | ||
tar -cvzf macOSBigSur-White.tar.gz themes/macOSBigSur-White | ||
- name: Uploading `bitmaps` artifact | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: bitmaps | ||
path: bitmaps/* | ||
|
||
- name: Uploading `macOSBigSur` UNIX Theme artifact | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: macOSBigSur | ||
path: macOSBigSur.tar.gz | ||
|
||
- name: Uploading `macOSBigSur-White` UNIX Theme artifact | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: macOSBigSur-White | ||
path: macOSBigSur-White.tar.gz | ||
|
||
- name: Uploading `macOSBigSur` Windows Theme artifact | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: macOSBigSur-Windows | ||
path: themes/macOSBigSur-Windows/* | ||
|
||
- name: Uploading `macOSBigSur-White` Windows Theme artifact | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: macOSBigSur-White-Windows | ||
path: themes/macOSBigSur-White-Windows/* |
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
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
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,23 +1,28 @@ | ||
import path from "path"; | ||
import { readdirSync, existsSync } from "fs"; | ||
import { Colors } from "./core/types"; | ||
|
||
// Directory resolve | ||
const projectRoot = path.resolve(__dirname, "../../"); | ||
|
||
const outDir = path.resolve(projectRoot, "bitmaps"); | ||
const staticSvgDir = path.resolve(projectRoot, "svg", "static"); | ||
const animatedSvgDir = path.resolve(projectRoot, "svg", "animated"); | ||
|
||
// Generate a svg list | ||
if (!existsSync(staticSvgDir) || !existsSync(animatedSvgDir)) { | ||
throw new Error("svg directory not found"); | ||
interface Config { | ||
themeName: string; | ||
color: Colors; | ||
} | ||
|
||
const staticCursors = readdirSync(staticSvgDir).map((f) => | ||
path.resolve(staticSvgDir, f) | ||
); | ||
const animatedCursors = readdirSync(animatedSvgDir).map((f) => | ||
path.resolve(animatedSvgDir, f) | ||
); | ||
const black = "#000000"; | ||
const white = "#FFFFFF"; | ||
|
||
const config: Config[] = [ | ||
{ | ||
themeName: "macOSBigSur", | ||
color: { | ||
base: black, | ||
outline: white, | ||
}, | ||
}, | ||
{ | ||
themeName: "macOSBigSur-White", | ||
color: { | ||
base: white, | ||
outline: black, | ||
}, | ||
}, | ||
]; | ||
|
||
export { staticCursors, animatedCursors, outDir }; | ||
export { config }; |
Oops, something went wrong.