From 8b9171a644c3b6a6479dd29bca0f4218d5333ce3 Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Sun, 21 Mar 2021 16:55:10 +0100 Subject: Remove Browserify We're no longer using the `require` imports to include JS files. Instead we have a template string process. Not as robust, but easier to fit what the final user script needs to be. --- .gitignore | 1 - Makefile | 28 ---------------------------- main.js.in | 3 --- package.json | 7 ------- 4 files changed, 39 deletions(-) delete mode 100644 package.json diff --git a/.gitignore b/.gitignore index 34b23da..84c048a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1 @@ /build/ -/node_modules/ diff --git a/Makefile b/Makefile index fcc0355..59a59c2 100644 --- a/Makefile +++ b/Makefile @@ -14,31 +14,11 @@ # along with this program. If not, see . -BROWSERIFY := ./node_modules/.bin/browserify - IMPORTS := peniquitous.js lib/mousetrap/tests/libs/key-event.js IMPORTS_BASENAME := $(notdir $(IMPORTS)) all: peniquitous.user.js -# peniquitous.user.js: peniquitous.js lib/mousetrap/tests/libs/key-event.js userscript-header.txt -# sed -e '1d' -e '$$d' \ -# lib/mousetrap/tests/libs/key-event.js \ -# > key-event.js -# -# cat \ -# userscript-header.txt \ -# key-event.js \ -# peniquitous.js \ -# > $@ -# -# rm key-event.js - -# build/?: $(IMPORTS) -# sed -e '/^(function/d' -e '$$d' file -# -# build/main.js: build/*.js - build: mkdir -p $@ @@ -57,14 +37,6 @@ build/main.js: main.js.in $(addprefix build/,$(IMPORTS_BASENAME)) $< \ > $@ -peniquitous.user.js: main.js peniquitous.js userscript-header.txt - $(BROWSERIFY) \ - --outfile $@ \ - $< - - cat userscript-header.txt $@ > "$@.tmp" - mv "$@.tmp" $@ - .PHONY: clean clean: rm -rf build diff --git a/main.js.in b/main.js.in index 1079a75..cea96e8 100644 --- a/main.js.in +++ b/main.js.in @@ -14,9 +14,6 @@ // along with this program. If not, see . -// var key_event = require('./lib/mousetrap/tests/libs/key-event.js'); -// var peniquitous = require('./peniquitous'); - function key_event () { $KEY_EVENT } diff --git a/package.json b/package.json deleted file mode 100644 index a00005f..0000000 --- a/package.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "name": "peniquitous", - "version": "0.0.1", - "dependencies": { - "browserify": "17.0.0" - } -} -- cgit v1.2.3