Skip to content

Commit

Permalink
Add Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
hkurokawa committed Jul 31, 2022
1 parent 68182e3 commit ed5adf5
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
dist
17 changes: 17 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
SRC := ./extension
DIST := ./dist
ZIP := $(shell which zip)

PACKAGE_NAME := chrome-skk
PACKAGE_VERSION := $(shell node -e "fs=require('fs');console.log(JSON.parse(fs.readFileSync(process.argv[1])).version)" ./extension/manifest.json)
NODE_MODULES := ../node_modules

build:
rm -rf $(DIST); \
mkdir -p $(DIST); \
cd $(SRC); \
find . -type f -print | $(ZIP) ../$(DIST)/$(PACKAGE_NAME)-$(PACKAGE_VERSION).zip -@; \
$(ZIP) ../$(DIST)/$(PACKAGE_NAME)-$(PACKAGE_VERSION).zip -j $(NODE_MODULES)/pako/dist/pako_inflate.es5.min.js;

clean:
rm -rf $(DIST)
2 changes: 1 addition & 1 deletion extension/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"roman_modes.js",
"preedit_modes.js",
"conversion_modes.js",
"pako.es5.min.js",
"pako_inflate.es5.min.js",
"main.js"
]
},
Expand Down
2 changes: 0 additions & 2 deletions extension/pako.es5.min.js

This file was deleted.

12 changes: 12 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"name": "chrome-skk",
"version": "0.0.1",
"description": "SKK for Chrome OS",
"main": "index.js",
"repository": "ssh://[email protected]/hkurokawa/chrome-skk.git",
"author": "hkurokawa <[email protected]>",
"license": "MIT",
"dependencies": {
"pako": "^2.0.4"
}
}
8 changes: 8 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1


pako@^2.0.4:
version "2.0.4"
resolved "https://registry.yarnpkg.com/pako/-/pako-2.0.4.tgz#6cebc4bbb0b6c73b0d5b8d7e8476e2b2fbea576d"
integrity sha512-v8tweI900AUkZN6heMU/4Uy4cXRc2AYNRggVmTR+dEncawDJgCdLMximOVA2p4qO57WMynangsfGRb5WD6L1Bg==

0 comments on commit ed5adf5

Please sign in to comment.