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 843f1b7
Show file tree
Hide file tree
Showing 6 changed files with 92 additions and 0 deletions.
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
```
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';
9 changes: 9 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: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

0 comments on commit 843f1b7

Please sign in to comment.