Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: adjust UI build commands #931

Merged
merged 6 commits into from
Oct 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,8 @@ Splunk_TA_Dynatrace_ucc/*
demo_addon_for_splunk/
demo_addon_for_splunk_already_exists/
init_addon_for_ucc_package/

# UI build
# ignore everything except redirect_page.js
splunk_add_on_ucc_framework/package/appserver/static/js/build/
!splunk_add_on_ucc_framework/package/appserver/static/js/build/redirect_page.js
1 change: 1 addition & 0 deletions .licenserc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,6 @@ header:
- "splunk_add_on_ucc_framework/commands/imports.py"
- "scripts/compare_different_ucc_versions_output.sh"
- "scripts/include-rum.sh"
- "build-ui.sh"
- "scripts/rum-script.html"
- "mypy.ini"
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Contributing Guidelines

Read about Contributing Guidelines [here](https://splunk.github.io/addonfactory-ucc-generator/contributing/).
Read about Contributing Guidelines [here](docs/contributing.md).
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ If you are a part of the community use: https://splunk-usergroups.slack.com/arch

## Contributing Guidelines

Go to [Contributing Guidelines](https://splunk.github.io/addonfactory-ucc-generator/contributing/).
Go to [contributing Guidelines in the repo](docs/contributing.md) or [published version](https://splunk.github.io/addonfactory-ucc-generator/contributing/).
6 changes: 6 additions & 0 deletions build-ui.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash

cd ui && yarn run setup
cd ..

cp -n -R ui/dist/build/ splunk_add_on_ucc_framework/package/appserver/static/js/build/
19 changes: 11 additions & 8 deletions docs/contributing.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,22 @@
# Contributing Guidelines

Default development branch is `develop`. Please use it for PR

## Build and Test

Download UCC UI and unpack it using the following commands:
Prerequisites:
- Node.js >= 18 ([NodeJS](https://nodejs.org/en/download) or use [nvm](https://github.com/nvm-sh/nvm))
- Yarn Classic (`npm install --global yarn`)
- Poetry 1.5.1. [Installation guide](https://python-poetry.org/docs/#installing-with-the-official-installer)

If you are interested in contributing to UI, `ui` folder has separate README.md.

Building UI in `ui/dist` folder and copying files to static folder of UCC.
```
cd ui/
yarn
yarn run build
cp -R dist/ ../splunk_add_on_ucc_framework/
./build-ui.sh
```

This project uses [`poetry 1.5.1`](https://python-poetry.org/).

To build a new local version of `ucc-gen`:
Building a new local version of `ucc-gen`:

```
poetry build
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ version = "5.32.0"
description = "Splunk Add-on SDK formerly UCC is a build and code generation framework"
license = "Apache-2.0"
authors = ["Splunk <addonfactory@splunk.com>"]
include = ["NOTICE"]
include = ["NOTICE", "splunk_add_on_ucc_framework/package/appserver/**/*"]
readme = "README.md"
homepage = "https://github.com/splunk/addonfactory-ucc-generator"
repository = "https://github.com/splunk/addonfactory-ucc-generator"
Expand Down
2 changes: 2 additions & 0 deletions ui/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -122,3 +122,5 @@ dist
# output
dist/**
.idea

storybook-static
6 changes: 1 addition & 5 deletions ui/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,7 @@ asking, `format:verify` won't.

Running `yarn run setup` once is required to enable all other tasks. The command might take a few minutes to finish.

## Communication channels

If you are a Splunker use: https://splunk.slack.com/archives/C03T8QCHBTJ

If you are a part of the community use: https://splunk-usergroups.slack.com/archives/C03SG3ZL4S1
We have published Storybook: https://splunk.github.io/addonfactory-ucc-generator/storybook

## Code Formatting

Expand Down
3 changes: 2 additions & 1 deletion ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,8 @@
"string-width": "^4.2.2"
},
"engines": {
"node": ">=14.21.2"
"node": ">=18",
"yarn": "^1"
},
"msw": {
"workerDirectory": "src/public"
Expand Down