-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
45 lines (34 loc) · 1.3 KB
/
Makefile
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
# -*- mode:makefile-gmake -*-
all:
.PHONY: all publish
package_directory := ./out/package
$(package_directory):
mkdir -p $@
module_files :=
module_files += $(package_directory)/package.json
$(package_directory)/package.json: package.json | $(package_directory)
cp $< $@
module_files += $(package_directory)/agh.sprintf.js
$(package_directory)/agh.sprintf.js: agh.sprintf.js | $(package_directory)
cp $< $@
module_files += $(package_directory)/agh.sprintf.min.js
$(package_directory)/agh.sprintf.min.js: agh.sprintf.js | $(package_directory)
uglifyjs -m -c -o $@ $<
# uglifyjs -m -c -o agh.sprintf.min.tmp $<
# gzjs -Wsfx85 -o$@ agh.sprintf.min.tmp
module_files += $(package_directory)/README.md $(package_directory)/LICENSE.md
$(package_directory)/README.md: README.md | $(package_directory)
cp $< $@
$(package_directory)/LICENSE.md: LICENSE.md | $(package_directory)
cp $< $@
module_files += $(package_directory)/example.js $(package_directory)/example.html
$(package_directory)/example.js: example.js | $(package_directory)
cp $< $@
$(package_directory)/example.html: example.html | $(package_directory)
cp $< $@
module_files += $(package_directory)/test.js
$(package_directory)/test.js: test.js | $(package_directory)
cp $< $@
all: $(module_files)
publish: $(module_files)
cd $(package_directory); npm publish