-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild-chrome.bat
More file actions
72 lines (63 loc) · 2.32 KB
/
build-chrome.bat
File metadata and controls
72 lines (63 loc) · 2.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
@echo off
cd /d "%~dp0"
echo ========================================
echo Building FlowRef for CHROME
echo ========================================
echo.
echo [1/6] Building TypeScript files...
node node_modules\esbuild\bin\esbuild src/popup/popup.ts --bundle --outfile=dist/popup/popup.js --format=iife
if %ERRORLEVEL% NEQ 0 (
echo ERROR: Failed to build popup
pause
exit /b 1
)
node node_modules\esbuild\bin\esbuild src/options/options.ts --bundle --outfile=dist/options/options.js --format=iife
if %ERRORLEVEL% NEQ 0 (
echo ERROR: Failed to build options
pause
exit /b 1
)
node node_modules\esbuild\bin\esbuild src/background/background.ts --bundle --outfile=dist/background/background.js --format=iife
if %ERRORLEVEL% NEQ 0 (
echo ERROR: Failed to build background
pause
exit /b 1
)
node node_modules\esbuild\bin\esbuild src/settings/settings.ts --bundle --outfile=dist/settings/settings.js --format=iife
if %ERRORLEVEL% NEQ 0 (
echo ERROR: Failed to build settings
pause
exit /b 1
)
echo [2/6] Copying HTML files...
copy /Y src\popup\popup.html dist\popup\popup.html >nul
copy /Y src\options\options.html dist\options\options.html >nul
copy /Y src\settings\settings.html dist\settings\settings.html >nul
echo [3/6] Copying CSS files...
copy /Y src\popup\popup.css dist\popup\popup.css >nul
copy /Y src\options\options.css dist\options\options.css >nul
copy /Y src\settings\settings.css dist\settings\settings.css >nul
if not exist dist\core mkdir dist\core
copy /Y src\core\stylePicker.css dist\core\stylePicker.css >nul
echo [4/6] Copying content script...
if not exist dist\content mkdir dist\content
copy /Y src\content\contentScript.js dist\content\contentScript.js >nul
echo [5/6] Copying PDF.js worker...
if not exist dist\pdfjs mkdir dist\pdfjs
copy /Y node_modules\pdfjs-dist\build\pdf.worker.min.js dist\pdfjs\pdf.worker.min.js >nul
echo [6/6] Copying icons and manifest...
if not exist dist\icons mkdir dist\icons
copy /Y icons\*.* dist\icons\ >nul
copy /Y manifest.chrome.json dist\manifest.json >nul
echo.
echo ========================================
echo CHROME BUILD COMPLETE!
echo ========================================
echo.
echo NEXT STEPS:
echo 1. Go to chrome://extensions/ in Chrome
echo 2. Enable "Developer mode"
echo 3. Click "Load unpacked"
echo 4. Select the dist folder
echo.
pause