@angular-custom-builders/lite-serve
Advanced tools
Comparing version 0.1.1 to 0.1.2
{ | ||
"name": "@angular-custom-builders/lite-serve", | ||
"version": "0.1.1", | ||
"version": "0.1.2", | ||
"description": "Custom builder to run lite-server with options", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
@@ -6,8 +6,89 @@ # lite-serve | ||
## Running unit tests | ||
The only mandatory option is *browserTarget*. Using the target the *lite-serve* builder is able to figure out the path of the dist folder. | ||
Run `ng test lite-serve` to execute the unit tests via [Jest](https://jestjs.io). | ||
## Options | ||
*browserTarget*: Target to serve | ||
## Running e2e | ||
*port*: Port to listen on. Default 4200 | ||
Run `ng e2e lite-serve` to execute the e2e tests | ||
*logLevel*: Can be either "info", "debug", "warn", or "silent". Default: info | ||
*watch*: Rebuild on change. Default false | ||
*open*: Opens the url in default browser. Default false | ||
## How to use it | ||
### Basic Configuration | ||
```json | ||
"example-app": { | ||
"projectType": "application", | ||
"root": "apps/example-app", | ||
"sourceRoot": "apps/example-app/src", | ||
"architect": { | ||
"build": { | ||
"builder": "@angular-devkit/build-angular:browser", | ||
"options": { | ||
"outputPath": "dist/apps/example-app" | ||
} | ||
}, | ||
"lite-serve": { | ||
"builder": "@angular-custom-builders/lite-serve:dist-serve", | ||
"options": { | ||
"browserTarget": "example-app:build" | ||
} | ||
} | ||
} | ||
``` | ||
1. Build the example app to generate the dist folder `dist/apps/example-app` | ||
```cmd | ||
nx build example-app | ||
``` | ||
2. Run the e2e without rebuilding the app | ||
```cmd | ||
nx run example-app:lite-serve | ||
``` | ||
### Override the default Configuration | ||
```json | ||
"example-app": { | ||
"projectType": "application", | ||
"root": "apps/example-app", | ||
"sourceRoot": "apps/example-app/src", | ||
"architect": { | ||
"build": { | ||
"builder": "@angular-devkit/build-angular:browser", | ||
"options": { | ||
"outputPath": "dist/apps/example-app" | ||
} | ||
}, | ||
"lite-serve": { | ||
"builder": "@angular-custom-builders/lite-serve:dist-serve", | ||
"options": { | ||
"browserTarget": "example-app:build" | ||
}, | ||
"configuration": { | ||
"verbose": { | ||
"port": 9999, | ||
"open": true, | ||
"logLevel": "debug" | ||
} | ||
} | ||
} | ||
} | ||
``` | ||
1. Build the example app to generate the dist folder `dist/apps/example-app` | ||
```cmd | ||
nx build example-app | ||
``` | ||
2. Run the e2e with a custom configuration | ||
```cmd | ||
nx run example-app:lite-serve:verbose | ||
``` | ||
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
14586
94