Skip to content

Commit 40bb51d

Browse files
committed
Refactor: Complete codebase rewrite. Migrate to Manifest V3 and add host permissions for favicons.
1 parent d198475 commit 40bb51d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+4533
-7777
lines changed

.gitignore

Lines changed: 40 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,41 @@
1-
/node_modules/
2-
/dist/
3-
*.xpi
1+
# OS generated files
2+
.DS_Store
3+
Thumbs.db
4+
._*
5+
6+
# Editor/IDE specific files & directories
7+
.vscode/
8+
.idea/
9+
*.sublime-project
10+
*.sublime-workspace
11+
# NetBeans
12+
nbproject/
13+
# Komodo Edit
14+
*.komodoproject
15+
16+
# Packaged extension files (if generated locally)
17+
# These are usually built/packaged before distribution
418
*.zip
5-
*.txt
19+
*.xpi
20+
21+
# Log files
22+
*.log
23+
npm-debug.log*
24+
yarn-debug.log*
25+
yarn-error.log*
26+
27+
# Dependency directories (Uncomment if you use npm or yarn)
28+
node_modules/
29+
30+
# Lock files (Uncomment if you use npm or yarn)
31+
package-lock.json
32+
yarn.lock
33+
34+
# Build output directories (Uncomment if you have a build process)
35+
# dist/
36+
# build/
37+
# out/
38+
39+
# Temporary files
40+
tmp/
41+
temp/

Makefile

Lines changed: 32 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,40 @@
1-
NAME := advanced-library-search
2-
TARGET = all
3-
SRCZIP := source-code.zip
1+
# Makefile for Advanced Library Search Firefox Extension
42

5-
.PHONY: build clean build-all build-chrome build-firefox source-code
3+
# --- Variables ---
64

7-
build: build-$(TARGET)
5+
# Output filename for the packaged extension
6+
TARGET = advanced-library-search.zip
7+
# You can use .xpi if you prefer, Firefox accepts both for temporary loading
8+
# TARGET = advanced-library-search.xpi
89

9-
build-all: build-firefox build-chrome
10+
# Source files and directories to include in the package
11+
SOURCES = manifest.json index.html css/ js/ icons/
1012

11-
build-firefox:
12-
@cd ./dist && \
13-
zip -r ../$(NAME).xpi icons js index.html manifest.json
13+
# --- Targets ---
1414

15-
build-chrome:
16-
zip -r $(NAME).zip dist
15+
# Default target: build the extension
16+
all: build
1717

18-
# for source code submission for firefox
19-
source-code:
20-
zip -r $(SRCZIP) ./src ./package.json ./tsconfig.json ./webpack.config.js
18+
# Build the extension package (zip file)
19+
# -r: Recurse into directories
20+
# -FS: Sync filesystem contents (useful for reproducibility if files change)
21+
# -9: Use highest compression level
22+
build: $(TARGET)
2123

24+
# zip option -x Exclude OS specific hidden files
25+
$(TARGET): $(SOURCES)
26+
@echo "Packaging extension into $(TARGET)..."
27+
@# Ensure the target directory exists if needed (not strictly needed here)
28+
@# mkdir -p $(dir $(TARGET))
29+
@# Using zip command to create the archive
30+
@zip -r -FS $(TARGET) $(SOURCES) -x '*.DS_Store' -x '*._*'
31+
@echo "Extension packaged successfully: $(TARGET)"
32+
33+
# Clean up the build artifact
2234
clean:
23-
rm -rf ./dist ./node_modules $(SRCZIP) $(NAME).zip $(NAME).xpi
35+
@echo "Cleaning up build artifacts..."
36+
@rm -f $(TARGET)
37+
@echo "Cleanup complete."
38+
39+
# Declare targets that are not actual files
40+
.PHONY: all build clean

0 commit comments

Comments
 (0)