Skip to content

Commit

Permalink
[ACA-3821] Add lite-serve with VSCode launcher (#1584)
Browse files Browse the repository at this point in the history
* Add lite-serve with VSCode launcher

* Make lite-serve smarter to work with Basic authtype as well

* Change and unify app-config-replace script
  • Loading branch information
popovicsandras committed Aug 8, 2020
1 parent d7e61e8 commit 32502e6
Show file tree
Hide file tree
Showing 19 changed files with 973 additions and 213 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

# IDE - VSCode
.vscode/*
!.vscode/closest-config-finder.sh
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
Expand Down
17 changes: 17 additions & 0 deletions .vscode/closest-config-finder.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
specFile=$1;
configFile=$2;

findconfig() {
if [ -f "$1" ]; then
printf '%s\n' "${PWD%/}/$1"
elif [ "$PWD" = / ]; then
false
else
(cd .. && findconfig $1)
fi
}

DIR=$(dirname "$specFile")
cd $DIR
configFile=`findconfig "$configFile"`;
echo "$configFile";
21 changes: 21 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "e2e",
"program": "${workspaceFolder}/node_modules/protractor/bin/protractor",
"args": ["`${workspaceFolder}/.vscode/closest-config-finder.sh ${file} protractor.conf.js`", "--specs=${file}"],
"envFile": "${workspaceFolder}/.env",
"console": "integratedTerminal",
"sourceMaps": true,
"smartStep": true,
"skipFiles": ["${workspaceFolder}/node_modules/**/*.js", "<node_internals>/**/*.js"],
"internalConsoleOptions": "neverOpen"
}
]
}
8 changes: 8 additions & 0 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,11 @@
"options": {
"publicHost": "http://localhost:4200",
"browserTarget": "app:build"
},
"configurations": {
"standalone": {
"watch": true
}
}
},
"extract-i18n": {
Expand Down Expand Up @@ -380,5 +385,8 @@
"@schematics/angular:directive": {
"prefix": "aca"
}
},
"cli": {
"analytics": "a5069b3a-642d-4d97-b810-0c24d7628413"
}
}
Loading

0 comments on commit 32502e6

Please sign in to comment.