-
Notifications
You must be signed in to change notification settings - Fork 5
/
docs.sh
executable file
·13 lines (13 loc) · 1.27 KB
/
docs.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/bin/bash
BASE_HREF=/ngx-tru-forms
rm -fr docs/*
cp src/index.html src/index.html.org
# sed -i 's/forRoot(.*),/forRoot(JsonFormMaterialModule),/' src/app/json-schema-examples/json-schema-examples.module.ts
mkdir -p docs && ./node_modules/.bin/ng build --configuration production --base-href=$BASE_HREF/ --deploy-url=$BASE_HREF/ && cp -R dist/ngx-tru-forms-app/* docs
# sed -i 's/forRoot(.*),/forRoot(JsonFormBootstrap4Module),/' src/app/json-schema-examples/json-schema-examples.module.ts
# sed -i 's/<!-- bootstrap4-cdn -->/<link rel="stylesheet" href="https:\/\/stackpath.bootstrapcdn.com\/bootstrap\/4.1.3\/css\/bootstrap.min.css" crossorigin="anonymous">/' src/index.html
# mkdir -p docs/bootstrap4 && ./node_modules/.bin/ng build --prod --base-href=$BASE_HREF/bootstrap4/ --deploy-url=$BASE_HREF/bootstrap4/ && cp -R dist/ngx-tru-forms-app/* docs/bootstrap4
# sed -i 's/forRoot(.*),/forRoot(TruUiModule),/' src/app/json-schema-examples/json-schema-examples.module.ts
# mkdir -p docs/tru-ui && ./node_modules/.bin/ng build --prod --base-href=$BASE_HREF/tru-ui/ --deploy-url=$BASE_HREF/tru-ui/ && cp -R dist/ngx-tru-forms-app/* docs/tru-ui
mv src/index.html.org src/index.html
# sed -i 's/forRoot(.*),/forRoot(JsonFormMaterialModule),/' src/app/json-schema-examples/json-schema-examples.module.ts