-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathMakefile
More file actions
27 lines (26 loc) · 840 Bytes
/
Makefile
File metadata and controls
27 lines (26 loc) · 840 Bytes
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
FILE_LIST := $(wildcard *.js)
all:
@echo "make single --make the bootstrap's js files modular"
@echo 'make combine --combine bootstrap.js and make it modular'
single:
@echo "start to make the bootstrap's js file modular..."
@mkdir -p bootstrap.sea
@for X in $(FILE_LIST); \
do echo 'define(function(){return function($$){' > temp.txt; \
cat $$X >> temp.txt; \
echo '}});' >> temp.txt; \
sed 's/window.jQuery/$$/g' temp.txt > bootstrap.sea/$$X; \
done
@rm temp.txt
@echo 'Complete!'
combine:
@echo 'start to combine bootstrap.js and make it modular...'
@mkdir -p bootstrap.sea
@echo 'define(function(){return function($$){' > temp.txt;
@for X in $(FILE_LIST); \
do cat $$X >> temp.txt; \
done
@echo '}});' >> temp.txt;
@sed 's/window.jQuery/$$/g' temp.txt > bootstrap.sea/bootstrap.js;
@rm temp.txt
@echo 'Complete!'