This repository was archived by the owner on Aug 17, 2025. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 77 " stylelint.vscode-stylelint"
88 ]
99 }
10- }
10+ },
11+ "postCreateCommand" : " chmod +x ./scripts/build.sh"
1112}
Original file line number Diff line number Diff line change 1- node_modules
1+ builds /
Original file line number Diff line number Diff line change 1+ {
2+ "version" : " 2.0.0" ,
3+ "tasks" : [
4+ {
5+ "label" : " Build extension" ,
6+ "type" : " shell" ,
7+ "command" : " ./scripts/build.sh" ,
8+ "group" : {
9+ "kind" : " build" ,
10+ "isDefault" : true
11+ }
12+ }
13+ ]
14+ }
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ set -e
3+
4+ echo " Building Classroom Dark Mode extension..."
5+
6+ VERSION=$( grep -oP ' "version":\s*"\K[0-9.]+(?=")' src/manifest.json)
7+ BUILD_DIR=" builds"
8+ CHROMIUM_FOLDER=" ClassroomDarkMode-$VERSION -chromium"
9+ FIREFOX_FOLDER=" ClassroomDarkMode-$VERSION -firefox"
10+
11+ # Setup build directory
12+ echo " Cleaning up build directory..."
13+ rm -rf " $BUILD_DIR "
14+ mkdir -p " $BUILD_DIR "
15+ cd " $BUILD_DIR "
16+
17+ # Build Chromium extension
18+ mkdir -p " $CHROMIUM_FOLDER "
19+ cp -r ../src/* " $CHROMIUM_FOLDER "
20+ rm " $CHROMIUM_FOLDER /manifest.firefox.json"
21+ cd " $CHROMIUM_FOLDER "
22+ zip -rq " ../$CHROMIUM_FOLDER .zip" *
23+ cd ..
24+ echo " Chromium extension built successfully"
25+
26+ # Build Firefox extension
27+ mkdir -p " $FIREFOX_FOLDER "
28+ cp -r ../src/* " $FIREFOX_FOLDER "
29+ cp " $FIREFOX_FOLDER /manifest.firefox.json" " $FIREFOX_FOLDER /manifest.json"
30+ rm " $FIREFOX_FOLDER /manifest.firefox.json"
31+ cd " $FIREFOX_FOLDER "
32+ zip -rq " ../$FIREFOX_FOLDER .zip" *
33+ cd ..
34+ echo " Firefox extension built successfully"
35+
36+ echo " Build completed successfully!"
You can’t perform that action at this time.
0 commit comments