UNPKG

dotwar

Version:

WAR FILE CREATE AND EXTRACT CLI

91 lines (69 loc) 2.02 kB
# DOT WAR This package helps to create and extract war file. ```bash npx dotwar ``` ## FOR ANGULAR First run below command. ```bash ng build ``` File Structure must be like below. <br> root/ dist/ your-app-name/ browser<br> ├── index.html<br> ├── main.js<br> ├── styles.css<br> ├── assets/<br> └── ...<br> Run `npx dotwar` , then chose `Angular`. set `<base href:"/app-name/">` in index.html to set base url. (optional). ## FOR REACT CRA First run below command. ```bash npm run build ``` File Structure must be like below. <br> root /build<br> ├── index.html<br> ├── main.js<br> ├── styles.css<br> ├── assets/<br> └── ...<br> run `npx dotwar` then chose `React CRA` <br> .WAR FILE IS READY IN Root\ DOTWAR \ war-name.war set "homepage":"/app-name" in package.json to set base url. (optional). ## FOR REACT VITE First run below command. ```bash npm run build ``` File Structure must be like below.<br> root /dist<br> ├── index.html<br> ├── main.js<br> ├── styles.css<br> ├── assets/<br> └── ...<br> run `npx dotwar` then chose `React Vite`<br> .WAR FILE IS READY IN Root\ DOTWAR \ war-name.war set defineConfig({base:"./"}) in vite.config.js to set base url. (optional). ## FOR OTHER run below command. ```bash npx dotwar ``` Specify file or folder location separeted by `\` (ex: `dist\your-file`).<br> Then give war file name.<br> .WAR FILE IS READY IN Root\ DOTWAR \ war-name.war The ` / `is used to go to the drive location (`D:\` or `C:\`). <br> The ` ../` or ` ..\` is used to go back. ## FOR BACK TO ORIGINAL FILES Ensure your war file is in Root\ DOTWAR folder. run below command. ```bash npx dotwar reverse ``` if you have multiple war files in it plese Specify file name. YOUR ORIGINAL FILE(S) IS READY IN Root\ DOTWAR-REVERSE \ Your-Files ### Contact Maintainer Bikram Sahoo -[bikramsahoo@live.in]