@jterrazz/typescript 2.3.3 → 2.3.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/bin/ts-compile.sh +16 -16
  2. package/package.json +1 -1
package/bin/ts-compile.sh CHANGED
@@ -18,35 +18,35 @@ else
18
18
  PROJECT_ROOT=$(pwd)
19
19
  fi
20
20
 
21
- echo "${CYAN_BG}${BRIGHT_WHITE} START ${NC} Starting TypeScript compilation process...\n"
21
+ printf "${CYAN_BG}${BRIGHT_WHITE} START ${NC} Starting TypeScript compilation process...\n\n"
22
22
 
23
23
  # Default paths relative to project root
24
24
  IN_PATH="$PROJECT_ROOT/src"
25
25
  OUT_PATH="$PROJECT_ROOT/dist"
26
26
 
27
- echo "Input directory: $IN_PATH"
28
- echo "Output directory: $OUT_PATH"
27
+ printf "Input directory: %s\n" "$IN_PATH"
28
+ printf "Output directory: %s\n" "$OUT_PATH"
29
29
 
30
30
  # Convert tsconfig.json to .swcrc
31
- echo "\n${CYAN_BG}${BRIGHT_WHITE} RUN ${NC} Converting tsconfig.json to .swcrc\n"
31
+ printf "\n${CYAN_BG}${BRIGHT_WHITE} RUN ${NC} Converting tsconfig.json to .swcrc\n\n"
32
32
  TMP_SWCRC=$(mktemp -q /tmp/.swcrc.XXXXXX)
33
33
  if [ $? -ne 0 ]; then
34
- echo "${RED}✗ Error: Can't create temporary .swcrc file${NC}"
34
+ printf "${RED}✗ Error: Can't create temporary .swcrc file${NC}\n"
35
35
  exit 1
36
36
  fi
37
37
 
38
38
  # Ensure we're in the project root directory for TypeScript configuration
39
39
  cd "$PROJECT_ROOT"
40
40
  npx tsconfig-to-swcconfig --output="$TMP_SWCRC"
41
- echo "${GREEN}✓ Completed${NC}"
41
+ printf "${GREEN}✓ Completed${NC}\n"
42
42
 
43
43
  # Create typescript declaration files
44
- echo "\n${CYAN_BG}${BRIGHT_WHITE} RUN ${NC} Generating TypeScript declaration files\n"
44
+ printf "\n${CYAN_BG}${BRIGHT_WHITE} RUN ${NC} Generating TypeScript declaration files\n\n"
45
45
  npx tsc --rootDir "$IN_PATH" --declaration --emitDeclarationOnly --outDir "$OUT_PATH"
46
- echo "${GREEN}✓ Completed${NC}"
46
+ printf "${GREEN}✓ Completed${NC}\n"
47
47
 
48
48
  # Create javascript ESM files with improved source maps
49
- echo "\n${CYAN_BG}${BRIGHT_WHITE} RUN ${NC} Compiling TypeScript to ESM with source maps\n"
49
+ printf "\n${CYAN_BG}${BRIGHT_WHITE} RUN ${NC} Compiling TypeScript to ESM with source maps\n\n"
50
50
  if ! "$PROJECT_ROOT/node_modules/.bin/swc" "$IN_PATH" \
51
51
  --source-maps \
52
52
  --copy-files \
@@ -55,18 +55,18 @@ if ! "$PROJECT_ROOT/node_modules/.bin/swc" "$IN_PATH" \
55
55
  --strip-leading-paths \
56
56
  --log-watch-compilation \
57
57
  "$@"; then
58
- echo "${RED}✗ SWC compilation failed${NC}"
58
+ printf "${RED}✗ SWC compilation failed${NC}\n"
59
59
  exit 1
60
60
  fi
61
- echo "${GREEN}✓ Completed${NC}"
61
+ printf "${GREEN}✓ Completed${NC}\n"
62
62
 
63
63
  # Create javascript CJS files
64
- echo "\n${CYAN_BG}${BRIGHT_WHITE} RUN ${NC} Creating CommonJS bundle\n"
64
+ printf "\n${CYAN_BG}${BRIGHT_WHITE} RUN ${NC} Creating CommonJS bundle\n\n"
65
65
  if ! npx rollup "$OUT_PATH/index.js" --format cjs --file "$OUT_PATH/index.cjs" --silent; then
66
- echo "${RED}✗ Rollup bundling failed${NC}"
66
+ printf "${RED}✗ Rollup bundling failed${NC}\n"
67
67
  exit 1
68
68
  fi
69
- echo "${GREEN}✓ Completed${NC}"
69
+ printf "${GREEN}✓ Completed${NC}\n"
70
70
 
71
- echo "\n${CYAN_BG}${BRIGHT_WHITE} END ${NC} Finalizing compilation process\n"
72
- echo "${GREEN}✓ Completed${NC}"
71
+ printf "\n${CYAN_BG}${BRIGHT_WHITE} END ${NC} Finalizing compilation process\n\n"
72
+ printf "${GREEN}✓ Completed${NC}\n"
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@jterrazz/typescript",
3
3
  "author": "Jean-Baptiste Terrazzoni <contact@jterrazz.com>",
4
- "version": "2.3.3",
4
+ "version": "2.3.4",
5
5
  "files": [
6
6
  "tsconfig",
7
7
  "bin"