diff --git a/README.md b/README.md index 434e3d9..60a7ca4 100644 --- a/README.md +++ b/README.md @@ -139,11 +139,12 @@ When you approach the login screen, your secret key is the key generated for you 2. Add this repo as a submodule into ASS `git submodule add https://github.com/Facinorous-420/dick` 3. Go into the frontend's directory, `cd dick`, and run `git submodule update --init --recursive` to initiaze it -4. Install the dependancies for the frontend, `npm i` -5. Run `npm run build` to compile the frontend and get it ready to run -6. Then move to the ASS directory and run the ASS setup again `npm run setup` -7. Leave everything as you did prior, but this time under `frontend name`, type `dick` and continue -8. Go into the `.gitmodules` file, and youll notice two submodules. Remove the +4. Go into `/src` and copy `CONSTANTS.ts.example` to `CONSTANTS.ts` and edit it as needed +5. Install the dependancies for the frontend, `npm i` +6. Run `npm run build` to compile the frontend and get it ready to run +7. Then move to the ASS directory and run the ASS setup again `npm run setup` +8. Leave everything as you did prior, but this time under `frontend name`, type `dick` and continue +9. Go into the `.gitmodules` file, and youll notice two submodules. Remove the ``` [submodule "ass-x"] path = ass-x @@ -156,8 +157,8 @@ When you approach the login screen, your secret key is the key generated for you url = https://github.com/Facinorous-420/dick ``` one is left -9. Run `npm run build` to recompile this change -10. You can run ASS, `npm start` or however you normally run your ass instance +10. Run `npm run build` to recompile this change +11. You can run ASS, `npm start` or however you normally run your ass instance diff --git a/package.json b/package.json index 1f73087..246e317 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "dick", - "version": "1.0.1", + "version": "1.0.2", "description": "A frontend for ASS", "main": "./dist/dashboard.js", "repository": { diff --git a/src/constants.ts.example b/src/constants.ts.example index c9362ad..c431929 100644 --- a/src/constants.ts.example +++ b/src/constants.ts.example @@ -1,11 +1,5 @@ import { templatePathBuilder } from "./utils/utils" -/* ------------------- USER CONSTANTS ------------------------ */ - -// Variable to set DICK to run as a submodule to ASS or separately -// true = submodule | false = separate -export const DICK_SUBMODULE = false - /* ------------------- ASS HOST INFORMATION ---------------------------- */ // Boolean variable if your ASS is secured with HTTPS // true = https | false = http @@ -17,6 +11,8 @@ export const ASS_DOMAIN = "127.0.0.1:40115" // If running DICK in separate mode, it will need to know where your ASS is installed // do note that it must be a *relative* location. // For example "../ass" means ass is installed in the parent directory. + +//NOTE: If you are using DICK as a submodule to ASS, you would simply use './' as ASS is running DICK and the folder structure starts in ASS' folder. export const ASS_LOCATION = "../ass" /* ------------------- STAFF ID CONSTANTS ---------------------------- */ diff --git a/src/utils/assJSONStructure.ts b/src/utils/assJSONStructure.ts index 8636b9b..c416896 100644 --- a/src/utils/assJSONStructure.ts +++ b/src/utils/assJSONStructure.ts @@ -1,14 +1,10 @@ -import { DICK_SUBMODULE, ASS_LOCATION } from "../constants" +import { ASS_LOCATION } from "../constants" import fs from "fs" import path from "path" import { ASSItem } from "typings/ASSTypes" - let DATA_FILE_PATH = path.resolve(`${ASS_LOCATION}/data.json`) - let AUTH_FILE_PATH = path.resolve(`${ASS_LOCATION}/auth.json`) - if (DICK_SUBMODULE !== false) { - DATA_FILE_PATH = path.resolve(`data.json`) - AUTH_FILE_PATH = path.resolve(`auth.json`) - } + const DATA_FILE_PATH = path.resolve(`${ASS_LOCATION}/data.json`) + const AUTH_FILE_PATH = path.resolve(`${ASS_LOCATION}/auth.json`) export const parseDataFile = () => { const rawDataJson = JSON.parse(fs.readFileSync(DATA_FILE_PATH).toString())