mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Bundle tray icons in repo (#5362)
This commit is contained in:
parent
d2abd582bc
commit
d99cc5a015
1
.gitignore
vendored
1
.gitignore
vendored
@ -8,7 +8,6 @@ locales/**/**.js
|
|||||||
lens.log
|
lens.log
|
||||||
static/build
|
static/build
|
||||||
static/types
|
static/types
|
||||||
build/tray/
|
|
||||||
binaries/client/
|
binaries/client/
|
||||||
binaries/server/
|
binaries/server/
|
||||||
src/extensions/*/*.js
|
src/extensions/*/*.js
|
||||||
|
|||||||
8
Makefile
8
Makefile
@ -32,7 +32,7 @@ compile-dev: node_modules
|
|||||||
ci-validate-dev: binaries/client build-extensions compile-dev
|
ci-validate-dev: binaries/client build-extensions compile-dev
|
||||||
|
|
||||||
.PHONY: dev
|
.PHONY: dev
|
||||||
dev: binaries/client build/tray/trayIconTemplate.png build-extensions
|
dev: binaries/client build-extensions
|
||||||
rm -rf static/build/
|
rm -rf static/build/
|
||||||
yarn dev
|
yarn dev
|
||||||
|
|
||||||
@ -53,7 +53,7 @@ integration: build
|
|||||||
yarn integration
|
yarn integration
|
||||||
|
|
||||||
.PHONY: build
|
.PHONY: build
|
||||||
build: node_modules binaries/client build/tray/trayIconTemplate.png
|
build: node_modules binaries/client
|
||||||
yarn run npm:fix-build-version
|
yarn run npm:fix-build-version
|
||||||
$(MAKE) build-extensions -B
|
$(MAKE) build-extensions -B
|
||||||
yarn run compile
|
yarn run compile
|
||||||
@ -70,9 +70,6 @@ $(extension_node_modules): node_modules
|
|||||||
$(extension_dists): src/extensions/npm/extensions/dist $(extension_node_modules)
|
$(extension_dists): src/extensions/npm/extensions/dist $(extension_node_modules)
|
||||||
cd $(@:/dist=) && ../../node_modules/.bin/npm run build
|
cd $(@:/dist=) && ../../node_modules/.bin/npm run build
|
||||||
|
|
||||||
build/tray/trayIconTemplate.png: node_modules
|
|
||||||
yarn ts-node ./build/generate-tray-icons.ts
|
|
||||||
|
|
||||||
.PHONY: clean-old-extensions
|
.PHONY: clean-old-extensions
|
||||||
clean-old-extensions:
|
clean-old-extensions:
|
||||||
find ./extensions -mindepth 1 -maxdepth 1 -type d '!' -exec test -e '{}/package.json' \; -exec rm -rf {} \;
|
find ./extensions -mindepth 1 -maxdepth 1 -type d '!' -exec test -e '{}/package.json' \; -exec rm -rf {} \;
|
||||||
@ -129,7 +126,6 @@ clean: clean-npm clean-extensions
|
|||||||
rm -rf binaries/client
|
rm -rf binaries/client
|
||||||
rm -rf dist
|
rm -rf dist
|
||||||
rm -rf static/build
|
rm -rf static/build
|
||||||
rm -rf build/tray
|
|
||||||
rm -rf node_modules
|
rm -rf node_modules
|
||||||
rm -rf site
|
rm -rf site
|
||||||
rm -rf docs/extensions/api
|
rm -rf docs/extensions/api
|
||||||
|
|||||||
@ -28,23 +28,23 @@ console.log("Generating tray icon pngs");
|
|||||||
|
|
||||||
ensureDirSync(outputFolder);
|
ensureDirSync(outputFolder);
|
||||||
|
|
||||||
Promise.allSettled([
|
Promise.all([
|
||||||
sharp(Buffer.from(darkTemplate))
|
sharp(Buffer.from(lightTemplate))
|
||||||
.resize({ width: size, height: size })
|
.resize({ width: size, height: size })
|
||||||
.png()
|
.png()
|
||||||
.toFile(path.join(outputFolder, "trayIconDarkTemplate.png")),
|
.toFile(path.join(outputFolder, "trayIconDarkTemplate.png")),
|
||||||
sharp(Buffer.from(darkTemplate))
|
sharp(Buffer.from(lightTemplate))
|
||||||
.resize({ width: size*2, height: size*2 })
|
.resize({ width: size*2, height: size*2 })
|
||||||
.png()
|
.png()
|
||||||
.toFile(path.join(outputFolder, "trayIconDarkTemplate@2x.png")),
|
.toFile(path.join(outputFolder, "trayIconDarkTemplate@2x.png")),
|
||||||
sharp(Buffer.from(lightTemplate))
|
sharp(Buffer.from(darkTemplate))
|
||||||
.resize({ width: size, height: size })
|
.resize({ width: size, height: size })
|
||||||
.png()
|
.png()
|
||||||
.toFile(path.join(outputFolder, "trayIconTemplate.png")),
|
.toFile(path.join(outputFolder, "trayIconTemplate.png")),
|
||||||
sharp(Buffer.from(lightTemplate))
|
sharp(Buffer.from(darkTemplate))
|
||||||
.resize({ width: size*2, height: size*2 })
|
.resize({ width: size*2, height: size*2 })
|
||||||
.png()
|
.png()
|
||||||
.toFile(path.join(outputFolder, "trayIconTemplate@2x.png")),
|
.toFile(path.join(outputFolder, "trayIconTemplate@2x.png")),
|
||||||
])
|
])
|
||||||
.then(console.log)
|
.then((resolutions) => console.log(`Generated ${resolutions.length} images`))
|
||||||
.catch(console.error);
|
.catch(console.error);
|
||||||
|
|||||||
BIN
build/tray/trayIconDarkTemplate.png
Normal file
BIN
build/tray/trayIconDarkTemplate.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 392 B |
BIN
build/tray/trayIconDarkTemplate@2x.png
Normal file
BIN
build/tray/trayIconDarkTemplate@2x.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 724 B |
BIN
build/tray/trayIconTemplate.png
Normal file
BIN
build/tray/trayIconTemplate.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 397 B |
BIN
build/tray/trayIconTemplate@2x.png
Normal file
BIN
build/tray/trayIconTemplate@2x.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 717 B |
@ -33,7 +33,7 @@
|
|||||||
"dist": "yarn run compile && electron-builder --publish onTag",
|
"dist": "yarn run compile && electron-builder --publish onTag",
|
||||||
"dist:dir": "yarn run dist --dir -c.compression=store -c.mac.identity=null",
|
"dist:dir": "yarn run dist --dir -c.compression=store -c.mac.identity=null",
|
||||||
"download:binaries": "yarn run ts-node build/download_binaries.ts",
|
"download:binaries": "yarn run ts-node build/download_binaries.ts",
|
||||||
"build:tray-icons": "yarn run ts-node build/build_tray_icon.ts",
|
"build:tray-icons": "yarn run ts-node build/generate-tray-icons.ts",
|
||||||
"build:theme-vars": "yarn run ts-node build/build_theme_vars.ts",
|
"build:theme-vars": "yarn run ts-node build/build_theme_vars.ts",
|
||||||
"lint": "PROD=true yarn run eslint --ext js,ts,tsx --max-warnings=0 .",
|
"lint": "PROD=true yarn run eslint --ext js,ts,tsx --max-warnings=0 .",
|
||||||
"lint:fix": "yarn run lint --fix",
|
"lint:fix": "yarn run lint --fix",
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user