If you are interested in the development of txAdmin, this short guide will help you set up your environment. Before starting, please make sure you are familiar with the basics of NodeJS & its ecosystem.
Note:
This guide does not cover translations, which are very easy to do!
git clone https://github.com/tabarra/txAdmin# In your root folder run the following
npm install
npm run prepareThis workflow is controlled by `main-builder.js`, which is responsible for:
In dev mode, core will redirect the panel `index.html` to use Vite, so you first need to start it and only then start the `main-builder.js`:
# run vite
cd panel
npm run dev
# In a new terminal - run main-builder.js
cd core
npm run devcd nui
# To run Vite on game dev mode:
npm run dev
# To run Vite on browser dev mode:
npm run browserKeep in mind that for every change you will need to restart the monitor resource, and unless you started the server with +setr txAdmin-debugMode true, txAdmin will detect that as a crash and restart your server. Also, when running in game mode, it takes between 10 and 30 seconds for the Vite builder to finish for you to be able to restart the monitor resource in-game.
tx<cl|sv>:, indicating where it is registered.txsv:req.txsv:checkAdminStatus or txcl:setServerCtx.First make sure the files are linted properly and that the typecheck is successful, and then run the build command. The output will be on the dist/ folder.
npm run lint
npm run typecheck
npm run build⚠ Warning: The /web/ UI is considered legacy and will be migrated to /panel/.
DO NOT modify css/coreui.css. Either do a patch in the custom.css or modify the SCSS variables. This doc is a reference if you are trying to re-build the css/coreui.css from the SCSS source. The only thing I changed from CoreUI was the aside-menu size from 200px to 300px in scss/_variables.scss : $aside-menu-width. You can find the other variable names in node_modules/@coreui/coreui/scss/coreui.
git clone https://github.com/coreui/coreui-free-bootstrap-admin-template.git coreui
cd coreui
npm i
# If you want to make sure you used the same version of CoreUI
git checkout 0cb1d81a8471ff4b6eb80c41b45c61a8e2ab3ef6
# Edit your stuff and then to compile:
npx node-sass --output-style expanded --source-map true --source-map-contents true --precision 6 src/scss/style.scss src/css/style.cssThen copy the src/css/style.css to txAdmin's folder.