diff --git a/.github/workflows/publish-images.yml b/.github/workflows/publish-images.yml deleted file mode 100644 index 0f15265..0000000 --- a/.github/workflows/publish-images.yml +++ /dev/null @@ -1,23 +0,0 @@ -name: Release @pybricks/images - -on: - push: - tags: - - '@pybricks/images/**' - -jobs: - publish_ide_docs: - runs-on: ubuntu-22.04 - steps: - - uses: actions/checkout@v6 - # Setup .npmrc file to publish to npm - - uses: actions/setup-node@v4 - with: - node-version: '22.x' - registry-url: 'https://registry.npmjs.org' - - run: ./build.py - working-directory: npm/images - - run: yarn publish - working-directory: npm/images/build - env: - NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }} diff --git a/npm/images/.yarnrc b/npm/images/.yarnrc deleted file mode 100644 index cdf261c..0000000 --- a/npm/images/.yarnrc +++ /dev/null @@ -1,2 +0,0 @@ -version-tag-prefix "@pybricks/images/v" -version-git-message "@pybricks/images v%s" diff --git a/npm/images/CHANGELOG.md b/npm/images/CHANGELOG.md deleted file mode 100644 index 479be4b..0000000 --- a/npm/images/CHANGELOG.md +++ /dev/null @@ -1,33 +0,0 @@ -# Changelog - - - -## 1.4.0 - 2022-12-19 - -### Added -- Added existing NXT and EV3 hub images to published package. - -## 1.3.0 - 2022-12-19 - -### Added -- Added DFU Windows driver images. - -## 1.2.1 - 2022-11-08 - -### Changed -- Changed size of some icons. - -## 1.2.0 - 2022-10-28 - -### Changed -- Changed all icon files to have the same dimensions. - -## 1.1.0 - 2022-10-28 - -### Added -- Added MINDSTORMS Robot Inventor hub image. - -## 1.0.0 - 2022-10-28 - -### Added -- Added new @pybricks/images package. diff --git a/npm/images/LICENSE b/npm/images/LICENSE deleted file mode 100644 index 8e7928b..0000000 --- a/npm/images/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2018-2022 The Pybricks Authors - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/npm/images/README.md b/npm/images/README.md deleted file mode 100644 index 6afbde8..0000000 --- a/npm/images/README.md +++ /dev/null @@ -1,5 +0,0 @@ -@pybricks/images -================ - -Image resource for Pybricks Code. - diff --git a/npm/images/build.py b/npm/images/build.py deleted file mode 100755 index 838ffaf..0000000 --- a/npm/images/build.py +++ /dev/null @@ -1,53 +0,0 @@ -#!/usr/bin/env python3 - -from glob import glob -import json -import pathlib -import shutil - -BUILD_DIR = (pathlib.Path(__file__).parent / "build").resolve() -IMAGE_DIR = ( - pathlib.Path(__file__).parent.parent.parent / "doc" / "main" / "diagrams" -).resolve() -HUBS = ["move", "city", "technic", "prime", "essential", "inventor", "ev3", "nxt"] - -package_json = { - "name": "@pybricks/images", - "version": "1.4.0", - "description": "Distribution of Pybricks images.", - "license": "MIT", - "repository": { - "type": "git", - "url": "git+https://github.com/pybricks/pybricks-api.git", - "directory": "npm/images", - }, - "publishConfig": {"registry": "https://registry.npmjs.org", "access": "public"}, - "exports": {}, # dynamically filled below -} - -# ensure empty build directory so we don't end up with stale files -shutil.rmtree(BUILD_DIR, True) -BUILD_DIR.mkdir() - -# copy the hub images -for h in HUBS: - shutil.copyfile(IMAGE_DIR / f"icon_{h}hub.png", BUILD_DIR / f"hub-{h}.png") - package_json["exports"][f"./hub-{h}.png"] = f"./hub-{h}.png" - -# copy DFU Windows driver images -for path in glob("dfu_windows_*", root_dir=IMAGE_DIR): - file = pathlib.Path(path).name - shutil.copyfile(IMAGE_DIR / path, BUILD_DIR / file) - package_json["exports"][f"./{file}"] = f"./{file}" - -# generate package.json file - -with open(BUILD_DIR / "package.json", "w") as f: - json.dump(package_json, f, indent=2) - -# copy additional files - -ROOT_DIR = (pathlib.Path(__file__).parent).resolve() - -for file in "README.md", "CHANGELOG.md", "LICENSE": - shutil.copy(ROOT_DIR / file, BUILD_DIR / file)