mirror of
https://github.com/unraid/api.git
synced 2025-12-31 13:39:52 -06:00
fix: integration of unraid-ui tailwind config in web (#1074)
* fix: integration of unraid-ui tailwind config in web * chore(ci): inline unraid-ui build
This commit is contained in:
86
.github/workflows/main.yml
vendored
86
.github/workflows/main.yml
vendored
@@ -101,45 +101,45 @@ jobs:
|
||||
name: unraid-api
|
||||
path: ${{ github.workspace }}/api/deploy/release/*.tgz
|
||||
|
||||
build-unraid-ui:
|
||||
name: Build Unraid UI Library
|
||||
defaults:
|
||||
run:
|
||||
working-directory: unraid-ui
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repo
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install node
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
cache: "npm"
|
||||
cache-dependency-path: |
|
||||
unraid-ui/package-lock.json
|
||||
node-version-file: ".nvmrc"
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm install
|
||||
|
||||
- name: Build
|
||||
run: npm run build
|
||||
|
||||
- name: Make Built Node Artifact
|
||||
run: |
|
||||
mkdir unraid-ui-dist
|
||||
mv dist/ unraid-ui-dist/dist/
|
||||
mv package.json unraid-ui-dist/package.json
|
||||
ls unraid-ui-dist
|
||||
|
||||
- name: Upload Artifact to Github
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: unraid-ui
|
||||
path: unraid-ui/unraid-ui-dist
|
||||
# build-unraid-ui:
|
||||
# name: Build Unraid UI Library
|
||||
# defaults:
|
||||
# run:
|
||||
# working-directory: unraid-ui
|
||||
# runs-on: ubuntu-latest
|
||||
# steps:
|
||||
# - name: Checkout repo
|
||||
# uses: actions/checkout@v4
|
||||
#
|
||||
# - name: Install node
|
||||
# uses: actions/setup-node@v4
|
||||
# with:
|
||||
# cache: "npm"
|
||||
# cache-dependency-path: |
|
||||
# unraid-ui/package-lock.json
|
||||
# node-version-file: ".nvmrc"
|
||||
#
|
||||
# - name: Install dependencies
|
||||
# run: npm install
|
||||
#
|
||||
# - name: Build
|
||||
# run: npm run build
|
||||
#
|
||||
# - name: Make Built Node Artifact
|
||||
# run: |
|
||||
# mkdir unraid-ui-dist
|
||||
# mv dist/ unraid-ui-dist/dist/
|
||||
# mv package.json unraid-ui-dist/package.json
|
||||
# ls unraid-ui-dist
|
||||
#
|
||||
# - name: Upload Artifact to Github
|
||||
# uses: actions/upload-artifact@v4
|
||||
# with:
|
||||
# name: unraid-ui
|
||||
# path: unraid-ui/unraid-ui-dist
|
||||
|
||||
build-web:
|
||||
needs: [build-unraid-ui]
|
||||
# needs: [build-unraid-ui]
|
||||
name: Build Web App
|
||||
environment:
|
||||
name: production
|
||||
@@ -168,15 +168,11 @@ jobs:
|
||||
web/package-lock.json
|
||||
node-version-file: "web/.nvmrc"
|
||||
|
||||
- name: Remove Existing Unraid UI folder
|
||||
run: |
|
||||
rm -r ../unraid-ui
|
||||
- name: Setup Just
|
||||
uses: extractions/setup-just@v2
|
||||
|
||||
- name: Download Artifact for Unraid UI
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: unraid-ui
|
||||
path: unraid-ui
|
||||
- name: Build Unraid UI
|
||||
run: just ../unraid-ui/setup
|
||||
|
||||
- name: Installing node deps
|
||||
run: npm install
|
||||
|
||||
13
unraid-ui/justfile
Normal file
13
unraid-ui/justfile
Normal file
@@ -0,0 +1,13 @@
|
||||
default: list-commands
|
||||
|
||||
list-commands:
|
||||
@just --list --justfile {{justfile()}} --list-heading $'\nMonorepo recipes:\n'
|
||||
|
||||
# Prepares the repo for development
|
||||
setup:
|
||||
npm install
|
||||
npm run build
|
||||
|
||||
clean:
|
||||
npm run clean
|
||||
rm -rf node_modules
|
||||
@@ -86,6 +86,10 @@
|
||||
"import": "./dist/tailwind.config.js",
|
||||
"default": "./dist/tailwind.config.js"
|
||||
},
|
||||
"./tailwind.config.ts": {
|
||||
"import": "./tailwind.config.ts",
|
||||
"default": "./tailwind.config.ts"
|
||||
},
|
||||
"./theme/preset": {
|
||||
"types": "./dist/theme/preset.d.ts",
|
||||
"import": "./dist/theme/preset.js"
|
||||
|
||||
@@ -5,5 +5,10 @@ default:
|
||||
@just list-commands
|
||||
|
||||
setup:
|
||||
just ../unraid-ui/setup
|
||||
cp .env.example .env
|
||||
npm install
|
||||
|
||||
clean:
|
||||
rm -rf .nuxt
|
||||
rm -rf node_modules
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import 'dotenv/config';
|
||||
import tailwindConfig from '@unraid/ui/tailwind.config';
|
||||
import tailwindConfig from '@unraid/ui/tailwind.config.ts';
|
||||
import type { Config } from 'tailwindcss';
|
||||
import remToRem from './utils/tailwind-rem-to-rem';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user