Mean builder
Table of contents
- Installation
- Simple Use
- First Time
- After that
- Production
- Options
- Root
- Output Path
- Frontend Path
- Backend Path
- Ignore Files
- Ignore Folders
- Angular Output Path
- Angular Base href
- Flags
- Use git
- Use TypeScript
- Production
- Dump
Installation
npm install -g mean-builder
Simple Use
To use this you must have a folder structure like
- root
- backend - (express app)
- frontend - (angular app)
1. First time
First time building on a localmachine
mean-builder --use-ts
2. After that
Use thing when you want to build and have a git repo in the folder
mean-builder --use-git --use-ts
3. Production build
mean-builder --use-git --use-ts --prod
Options
mean-builder --="(value)"
Root
Command: --root="(path_from_Local)"
Default: Where the program opened from
Example:
Go back a folder
mean-builder --root="../"
Output Path
Command: --output-path="(path_to_output)"
Default: /dist
Example:
Change from /dist to /build
mean-builder --output-path="/build"
Frontend Path
Command: --frontend-path="(path_to_frontend)"
Default: /frontend
Example:
Change from /frontend to /myangularapp
mean-builder --frontend-path="/myangularapp"
Backend Path
Command: --backend-path="(path_to_backend)"
Default: /backend
Example:
Change from /backend to /myexpressapp
mean-builder --backend-path="/myexpressapp"
Ignore Files
In root or subfolder dosen't matter
Command: --ignore-files="(filenames, comma seperated)"
Default: NONE
Example:
Ignore file bootstrap.min.js and jquery.min.js
mean-builder --ignore-files="bootstrap.min.js,jquery.min.js"
Ignore Folders
This will ignore alld files and subfolders aswell
Command: --ignore-folders="(foldernames, comma seperated)"
Default: NONE
Example:
Ignore the assets folder
mean-builder --ignore-folders="assets"
Angular Output Path
Command: --ng-output-path="(save_folder_inside_output_path>)"
Default: public
Example:
Change from /public to root
mean-builder --ng-output-path="../"
Angular Base href
Angular-cli --base-href
Command: --ng-base-href="(subfolder_on_webserver)"
Default: /
Example:
Change from root to /sideproject
mean-builder --ng-base-href="/sideproject"
Flags
mean-builder --
Use git
Command: --use-git
Function: Stops removal of .git, .gitignore, *.md in dist folder
Use:
mean-builder --use-git
Use TypeScript
Command: --use-ts
Function: Compiles typescript backend
Use:
mean-builder --use-ts
Production
Command: --prod
Function: Compiles typescript and builds angular in production mode
Use:
mean-builder --prod
Dump
Command: --dump
Function: dumps all options and flags to the console. (Aborts the building)
Use:
mean-builder --dump