Skip to content

Commit e742f05

Browse files
committed
cambios realizados
1 parent 69f546c commit e742f05

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

netepScript.v0-8-9.sh renamed to netepScript.v0-8-10.sh

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ NEGRITA='\033[1m'
88
NC='\033[0m' # No Color (para resetear)
99

1010
echo -e "${VERDE}=========================================================${NC}"
11-
echo -e "${AZUL} ${NEGRITA}netepScript - V 0.8.9${NC}"
11+
echo -e "${AZUL} ${NEGRITA}netepScript - V 0.8.10${NC}"
1212
echo -e "${AZUL} Script de instalación para servidor Node.js${NC}"
1313
echo -e "${AMARILLO} Incluye: Express.js, TypeScript, ESLint y Prettier${NC}"
1414
echo -e "${ROJO}${NEGRITA} Autores: Marcelo Robin / Jesús García${NC}"
@@ -33,6 +33,14 @@ echo -e "${AZUL}\n4) Generamos el tsconfig.json con las opciones por defecto${NC
3333

3434
npx tsc --init
3535

36+
sed -i '
37+
# Descomentar rootDir
38+
s/\/\/ *"rootDir": ".\/",/"rootDir": ".\/src",/
39+
40+
# Descomentar outDir
41+
s/\/\/ *"outDir": ".\/",/"outDir": ".\/dist",/
42+
' tsconfig.json
43+
3644
# Función para agregar líneas al final del archivo antes de la última llave
3745
add_lines_before_last_brace() {
3846
file=$1
@@ -82,6 +90,7 @@ EOF
8290

8391
echo -e "${AZUL}\n6) Creamos el archivo .gitignore${NC}"
8492

93+
touch ./.env
8594
cat <<EOF > .gitignore
8695
node_modules
8796
.env
@@ -93,10 +102,7 @@ echo -e "${AZUL}\n7) Creamos la estructura de carpetas del proyecto${NC}"
93102
mkdir -p src/{routes,controllers,config,interfaces,models,middlewares,services}
94103
touch src/config/envs.ts
95104
touch src/routes/indexRouter.ts
96-
touch src/routes/userRouter.ts
97-
touch src/routes/appointmentRouter.ts
98105
touch src/controllers/userRouter.ts
99-
touch src/controllers/appointmentRouter.ts
100106

101107
echo -e "${AZUL}\n8) Agregamos los archivos index.ts y server.ts${NC}"
102108

@@ -150,6 +156,9 @@ npx json -I -f package.json -e 'this.scripts.build="tsc"'
150156
npx json -I -f package.json -e 'this.scripts.lint="eslint . --ext .ts"'
151157
npx json -I -f package.json -e 'this.scripts["lint:fix"]="eslint . --ext .ts --fix"'
152158

159+
PACKAGE_JSON="./package.json"
160+
sed -i 's/\^//g' "$PACKAGE_JSON"
161+
153162
echo -e "${VERDE}=========================================================${NC}"
154163
echo -e "${ROJO} ${NEGRITA}Seguinos en Github:${NC}"
155164
echo -e "${ROJO} ${NEGRITA}https://github.com/mnibor${NC}"

0 commit comments

Comments
 (0)