mirror of
https://github.com/rstudio/shiny.git
synced 2026-01-09 15:08:04 -05:00
Add Makefile for building web assets
This commit is contained in:
@@ -8,3 +8,4 @@
|
||||
^run\.R$
|
||||
^\.gitignore$
|
||||
^res$
|
||||
^tools$
|
||||
|
||||
2
tools/.gitignore
vendored
Normal file
2
tools/.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
node_modules/
|
||||
|
||||
17
tools/Makefile
Normal file
17
tools/Makefile
Normal file
@@ -0,0 +1,17 @@
|
||||
UGLIFY = ./node_modules/.bin/uglifyjs
|
||||
|
||||
# Directory of bootstrap datepicker
|
||||
DATEPICKER = ../inst/www/shared/datepicker/js/
|
||||
|
||||
all: $(DATEPICKER)/bootstrap-datepicker.min.js
|
||||
|
||||
clean:
|
||||
rm -f $(DATEPICKER)/bootstrap-datepicker.min.js
|
||||
|
||||
|
||||
$(DATEPICKER)/bootstrap-datepicker.min.js: $(DATEPICKER)/bootstrap-datepicker.js \
|
||||
$(wildcard $(DATEPICKER)/locales/bootstrap-datepicker.*.js)
|
||||
$(UGLIFY) \
|
||||
$(DATEPICKER)/bootstrap-datepicker.js \
|
||||
$(DATEPICKER)/locales/bootstrap-datepicker.*.js \
|
||||
--output $(DATEPICKER)/bootstrap-datepicker.min.js
|
||||
20
tools/README.md
Normal file
20
tools/README.md
Normal file
@@ -0,0 +1,20 @@
|
||||
The contents in this subdirectory are used for building web assets.
|
||||
|
||||
To build, install the requirements (below), then go to this directory and run:
|
||||
|
||||
```
|
||||
make
|
||||
```
|
||||
|
||||
## Requirements
|
||||
|
||||
### UglifyJS
|
||||
|
||||
UglifyJS is a module for node.js which minifies Javascript files. It should be
|
||||
installed with the following command (run from this directory):
|
||||
|
||||
```
|
||||
npm install uglify-js
|
||||
```
|
||||
|
||||
This will install the UglifyJS into `./node_modules/`.
|
||||
Reference in New Issue
Block a user