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
|
name: unraid-api
|
||||||
path: ${{ github.workspace }}/api/deploy/release/*.tgz
|
path: ${{ github.workspace }}/api/deploy/release/*.tgz
|
||||||
|
|
||||||
build-unraid-ui:
|
# build-unraid-ui:
|
||||||
name: Build Unraid UI Library
|
# name: Build Unraid UI Library
|
||||||
defaults:
|
# defaults:
|
||||||
run:
|
# run:
|
||||||
working-directory: unraid-ui
|
# working-directory: unraid-ui
|
||||||
runs-on: ubuntu-latest
|
# runs-on: ubuntu-latest
|
||||||
steps:
|
# steps:
|
||||||
- name: Checkout repo
|
# - name: Checkout repo
|
||||||
uses: actions/checkout@v4
|
# uses: actions/checkout@v4
|
||||||
|
#
|
||||||
- name: Install node
|
# - name: Install node
|
||||||
uses: actions/setup-node@v4
|
# uses: actions/setup-node@v4
|
||||||
with:
|
# with:
|
||||||
cache: "npm"
|
# cache: "npm"
|
||||||
cache-dependency-path: |
|
# cache-dependency-path: |
|
||||||
unraid-ui/package-lock.json
|
# unraid-ui/package-lock.json
|
||||||
node-version-file: ".nvmrc"
|
# node-version-file: ".nvmrc"
|
||||||
|
#
|
||||||
- name: Install dependencies
|
# - name: Install dependencies
|
||||||
run: npm install
|
# run: npm install
|
||||||
|
#
|
||||||
- name: Build
|
# - name: Build
|
||||||
run: npm run build
|
# run: npm run build
|
||||||
|
#
|
||||||
- name: Make Built Node Artifact
|
# - name: Make Built Node Artifact
|
||||||
run: |
|
# run: |
|
||||||
mkdir unraid-ui-dist
|
# mkdir unraid-ui-dist
|
||||||
mv dist/ unraid-ui-dist/dist/
|
# mv dist/ unraid-ui-dist/dist/
|
||||||
mv package.json unraid-ui-dist/package.json
|
# mv package.json unraid-ui-dist/package.json
|
||||||
ls unraid-ui-dist
|
# ls unraid-ui-dist
|
||||||
|
#
|
||||||
- name: Upload Artifact to Github
|
# - name: Upload Artifact to Github
|
||||||
uses: actions/upload-artifact@v4
|
# uses: actions/upload-artifact@v4
|
||||||
with:
|
# with:
|
||||||
name: unraid-ui
|
# name: unraid-ui
|
||||||
path: unraid-ui/unraid-ui-dist
|
# path: unraid-ui/unraid-ui-dist
|
||||||
|
|
||||||
build-web:
|
build-web:
|
||||||
needs: [build-unraid-ui]
|
# needs: [build-unraid-ui]
|
||||||
name: Build Web App
|
name: Build Web App
|
||||||
environment:
|
environment:
|
||||||
name: production
|
name: production
|
||||||
@@ -168,15 +168,11 @@ jobs:
|
|||||||
web/package-lock.json
|
web/package-lock.json
|
||||||
node-version-file: "web/.nvmrc"
|
node-version-file: "web/.nvmrc"
|
||||||
|
|
||||||
- name: Remove Existing Unraid UI folder
|
- name: Setup Just
|
||||||
run: |
|
uses: extractions/setup-just@v2
|
||||||
rm -r ../unraid-ui
|
|
||||||
|
|
||||||
- name: Download Artifact for Unraid UI
|
- name: Build Unraid UI
|
||||||
uses: actions/download-artifact@v4
|
run: just ../unraid-ui/setup
|
||||||
with:
|
|
||||||
name: unraid-ui
|
|
||||||
path: unraid-ui
|
|
||||||
|
|
||||||
- name: Installing node deps
|
- name: Installing node deps
|
||||||
run: npm install
|
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",
|
"import": "./dist/tailwind.config.js",
|
||||||
"default": "./dist/tailwind.config.js"
|
"default": "./dist/tailwind.config.js"
|
||||||
},
|
},
|
||||||
|
"./tailwind.config.ts": {
|
||||||
|
"import": "./tailwind.config.ts",
|
||||||
|
"default": "./tailwind.config.ts"
|
||||||
|
},
|
||||||
"./theme/preset": {
|
"./theme/preset": {
|
||||||
"types": "./dist/theme/preset.d.ts",
|
"types": "./dist/theme/preset.d.ts",
|
||||||
"import": "./dist/theme/preset.js"
|
"import": "./dist/theme/preset.js"
|
||||||
|
|||||||
@@ -5,5 +5,10 @@ default:
|
|||||||
@just list-commands
|
@just list-commands
|
||||||
|
|
||||||
setup:
|
setup:
|
||||||
|
just ../unraid-ui/setup
|
||||||
cp .env.example .env
|
cp .env.example .env
|
||||||
npm install
|
npm install
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -rf .nuxt
|
||||||
|
rm -rf node_modules
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import 'dotenv/config';
|
import 'dotenv/config';
|
||||||
import tailwindConfig from '@unraid/ui/tailwind.config';
|
import tailwindConfig from '@unraid/ui/tailwind.config.ts';
|
||||||
import type { Config } from 'tailwindcss';
|
import type { Config } from 'tailwindcss';
|
||||||
import remToRem from './utils/tailwind-rem-to-rem';
|
import remToRem from './utils/tailwind-rem-to-rem';
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user