mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
add mocks & theme json files
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
This commit is contained in:
parent
614062cf2a
commit
433c31c642
50
Makefile
50
Makefile
@ -6,49 +6,59 @@ else
|
|||||||
DETECTED_OS := $(shell uname)
|
DETECTED_OS := $(shell uname)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
.PHONY: init dev build test clean
|
.PHONY: init
|
||||||
|
|
||||||
init: install-deps download-bins compile-dev
|
init: install-deps download-bins compile-dev
|
||||||
echo "Init done"
|
echo "Init done"
|
||||||
|
|
||||||
|
.PHONY: download-bins
|
||||||
download-bins:
|
download-bins:
|
||||||
yarn download-bins
|
yarn download-bins
|
||||||
|
|
||||||
|
.PHONY: install-deps
|
||||||
install-deps:
|
install-deps:
|
||||||
yarn install --frozen-lockfile --verbose
|
yarn install --frozen-lockfile --verbose
|
||||||
yarn check --verify-tree --integrity
|
yarn check --verify-tree --integrity
|
||||||
|
|
||||||
|
.PHONY: compile-dev
|
||||||
compile-dev:
|
compile-dev:
|
||||||
yarn compile:main --cache
|
yarn compile:main --cache
|
||||||
yarn compile:renderer --cache
|
yarn compile:renderer --cache
|
||||||
|
|
||||||
|
.PHONY: dev
|
||||||
dev:
|
dev:
|
||||||
ifeq ("$(wildcard static/build/main.js)","")
|
ifeq ("$(wildcard static/build/main.js)","")
|
||||||
make init
|
make init
|
||||||
endif
|
endif
|
||||||
yarn dev
|
yarn dev
|
||||||
|
|
||||||
|
.PHONY: lint
|
||||||
lint:
|
lint:
|
||||||
yarn lint
|
yarn lint
|
||||||
|
|
||||||
|
.PHONY: test
|
||||||
test: download-bins
|
test: download-bins
|
||||||
yarn test
|
yarn test
|
||||||
|
|
||||||
|
.PHONY: integration-linux
|
||||||
integration-linux: build-extension-types build-extensions
|
integration-linux: build-extension-types build-extensions
|
||||||
yarn build:linux
|
yarn build:linux
|
||||||
yarn integration
|
yarn integration
|
||||||
|
|
||||||
|
.PHONY: integration-mac
|
||||||
integration-mac: build-extension-types build-extensions
|
integration-mac: build-extension-types build-extensions
|
||||||
yarn build:mac
|
yarn build:mac
|
||||||
yarn integration
|
yarn integration
|
||||||
|
|
||||||
|
.PHONY: integration-win
|
||||||
integration-win: build-extension-types build-extensions
|
integration-win: build-extension-types build-extensions
|
||||||
yarn build:win
|
yarn build:win
|
||||||
yarn integration
|
yarn integration
|
||||||
|
|
||||||
|
.PHONY: test-app
|
||||||
test-app:
|
test-app:
|
||||||
yarn test
|
yarn test
|
||||||
|
|
||||||
|
.PHONY: build
|
||||||
build: install-deps download-bins build-extensions
|
build: install-deps download-bins build-extensions
|
||||||
ifeq "$(DETECTED_OS)" "Windows"
|
ifeq "$(DETECTED_OS)" "Windows"
|
||||||
yarn dist:win
|
yarn dist:win
|
||||||
@ -56,23 +66,51 @@ else
|
|||||||
yarn dist
|
yarn dist
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
.PHONY: build-extensions
|
||||||
build-extensions:
|
build-extensions:
|
||||||
$(foreach dir, $(wildcard $(EXTENSIONS_DIR)/*), (cd $(dir) && npm install && npm run build || exit $?);)
|
$(foreach dir, $(wildcard $(EXTENSIONS_DIR)/*), (cd $(dir) && npm install && npm run build || exit $?);)
|
||||||
|
|
||||||
|
.PHONY: test-extensions
|
||||||
test-extensions:
|
test-extensions:
|
||||||
$(foreach dir, $(wildcard $(EXTENSIONS_DIR)/*), (cd $(dir) && npm install --dev && npm run test || exit $?);)
|
$(foreach dir, $(wildcard $(EXTENSIONS_DIR)/*), (cd $(dir) && npm install --dev && npm run test || exit $?);)
|
||||||
|
|
||||||
build-npm: build-extension-types
|
.PHONY: copy-extension-themes
|
||||||
yarn npm:fix-package-version
|
copy-extension-themes:
|
||||||
|
mkdir -p src/extensions/npm/extensions/dist/src/renderer/themes/
|
||||||
|
cp $(wildcard src/renderer/themes/*.json) src/extensions/npm/extensions/dist/src/renderer/themes/
|
||||||
|
|
||||||
build-extension-types:
|
src/extensions/npm/extensions/__mocks__:
|
||||||
|
cp -r __mocks__ src/extensions/npm/extensions/
|
||||||
|
|
||||||
|
src/extensions/npm/extensions/dist:
|
||||||
yarn compile:extension-types
|
yarn compile:extension-types
|
||||||
|
|
||||||
|
.PHONY: build-npm
|
||||||
|
build-npm: build-extension-types copy-extension-themes src/extensions/npm/extensions/__mocks__
|
||||||
|
yarn npm:fix-package-version
|
||||||
|
|
||||||
|
.PHONY: build-extension-types
|
||||||
|
build-extension-types: src/extensions/npm/extensions/dist
|
||||||
|
|
||||||
|
.PHONY: publish-npm
|
||||||
publish-npm: build-npm
|
publish-npm: build-npm
|
||||||
npm config set '//registry.npmjs.org/:_authToken' "${NPM_TOKEN}"
|
npm config set '//registry.npmjs.org/:_authToken' "${NPM_TOKEN}"
|
||||||
cd src/extensions/npm/extensions && npm publish --access=public
|
cd src/extensions/npm/extensions && npm publish --access=public
|
||||||
|
|
||||||
clean:
|
.PHONY: clean-npm
|
||||||
|
clean-npm:
|
||||||
|
ifeq "$(DETECTED_OS)" "Windows"
|
||||||
|
if exist src\extensions\npm\extensions\dist del /s /q src\extensions\npm\extensions\dist
|
||||||
|
if exist src\extensions\npm\extensions\__mocks__ del /s /q src\extensions\npm\extensions\__mocks__
|
||||||
|
if exist src\extensions\npm\extensions\node_modules del /s /q src\extensions\npm\extensions\node_modules
|
||||||
|
else
|
||||||
|
rm -rf src/extensions/npm/extensions/dist
|
||||||
|
rm -rf src/extensions/npm/extensions/__mocks__
|
||||||
|
rm -rf src/extensions/npm/extensions/node_modules
|
||||||
|
endif
|
||||||
|
|
||||||
|
.PHONY: clean
|
||||||
|
clean: clean-npm
|
||||||
ifeq "$(DETECTED_OS)" "Windows"
|
ifeq "$(DETECTED_OS)" "Windows"
|
||||||
if exist binaries\client del /s /q binaries\client\*.*
|
if exist binaries\client del /s /q binaries\client\*.*
|
||||||
if exist dist del /s /q dist\*.*
|
if exist dist del /s /q dist\*.*
|
||||||
|
|||||||
@ -9,6 +9,7 @@
|
|||||||
"types": "dist/src/extensions/extension-api.d.ts",
|
"types": "dist/src/extensions/extension-api.d.ts",
|
||||||
"files": [
|
"files": [
|
||||||
"dist/**/*.ts",
|
"dist/**/*.ts",
|
||||||
|
"__mocks__/*.ts",
|
||||||
"dist/**/*.js"
|
"dist/**/*.js"
|
||||||
],
|
],
|
||||||
"author": {
|
"author": {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user