Skip to content

Commit

Permalink
feat(theme): add web-library scaffold
Browse files Browse the repository at this point in the history
Signed-off-by: Christoph Jerolimov <[email protected]>
  • Loading branch information
christoph-jerolimov committed Nov 7, 2024
1 parent 06b7b9f commit 99a6bdf
Show file tree
Hide file tree
Showing 8 changed files with 101 additions and 0 deletions.
1 change: 1 addition & 0 deletions workspaces/theme/packages/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
"@backstage/theme": "^0.6.0",
"@material-ui/core": "^4.12.2",
"@material-ui/icons": "^4.9.1",
"@red-hat-developer-hub/theme": "workspace:^",
"react": "^18.0.2",
"react-dom": "^18.0.2",
"react-router": "^6.3.0",
Expand Down
1 change: 1 addition & 0 deletions workspaces/theme/packages/theme/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = require('@backstage/cli/config/eslint-factory')(__dirname);
12 changes: 12 additions & 0 deletions workspaces/theme/packages/theme/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# @red-hat-developer-hub/theme

_This package was created through the Backstage CLI_.

## Installation

Install the package via Yarn:

```sh
cd <package-dir> # if within a monorepo
yarn add @red-hat-developer-hub/theme
```
7 changes: 7 additions & 0 deletions workspaces/theme/packages/theme/api-report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
## API Report File for "@red-hat-developer-hub/theme"

> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
```ts
// (No @packageDocumentation comment for this package)
```
38 changes: 38 additions & 0 deletions workspaces/theme/packages/theme/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"name": "@red-hat-developer-hub/theme",
"version": "0.1.0",
"main": "src/index.ts",
"types": "src/index.ts",
"license": "Apache-2.0",
"private": true,
"publishConfig": {
"access": "public",
"main": "dist/index.esm.js",
"types": "dist/index.d.ts"
},
"repository": {
"type": "git",
"url": "https://github.com/redhat-developer/rhdh-plugins",
"directory": "workspaces/theme/packages/theme"
},
"backstage": {
"role": "web-library"
},
"sideEffects": false,
"scripts": {
"start": "backstage-cli package start",
"build": "backstage-cli package build",
"lint": "backstage-cli package lint",
"test": "backstage-cli package test",
"clean": "backstage-cli package clean",
"prepack": "backstage-cli package prepack",
"postpack": "backstage-cli package postpack"
},
"devDependencies": {
"@backstage/cli": "^0.28.0",
"@testing-library/jest-dom": "^6.0.0"
},
"files": [
"dist"
]
}
16 changes: 16 additions & 0 deletions workspaces/theme/packages/theme/src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/*
* Copyright 2024 The Backstage Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export {};
16 changes: 16 additions & 0 deletions workspaces/theme/packages/theme/src/setupTests.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/*
* Copyright 2024 The Backstage Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import '@testing-library/jest-dom';
10 changes: 10 additions & 0 deletions workspaces/theme/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -10263,6 +10263,15 @@ __metadata:
languageName: node
linkType: hard

"@red-hat-developer-hub/theme@workspace:^, @red-hat-developer-hub/theme@workspace:packages/theme":
version: 0.0.0-use.local
resolution: "@red-hat-developer-hub/theme@workspace:packages/theme"
dependencies:
"@backstage/cli": ^0.28.0
"@testing-library/jest-dom": ^6.0.0
languageName: unknown
linkType: soft

"@remix-run/router@npm:1.21.0":
version: 1.21.0
resolution: "@remix-run/router@npm:1.21.0"
Expand Down Expand Up @@ -14495,6 +14504,7 @@ __metadata:
"@material-ui/core": ^4.12.2
"@material-ui/icons": ^4.9.1
"@playwright/test": ^1.32.3
"@red-hat-developer-hub/theme": "workspace:^"
"@testing-library/dom": ^9.0.0
"@testing-library/jest-dom": ^6.0.0
"@testing-library/react": ^14.0.0
Expand Down

0 comments on commit 99a6bdf

Please sign in to comment.