xmpp.chapril.org-conversejs/Makefile.win

56 lines
1.3 KiB
Makefile
Raw Normal View History

# You can set these variables from the command line.
GRUNT ?= node_modules\.bin\grunt.cmd
BOWER ?= node_modules\.bin\bower
PHANTOMJS ?= node_modules\.bin\phantomjs
SASS ?= sass
RMRF ?= rmdir /q /s
RMF ?= del /q
.PHONY: all help clean css minjs build
all: dev
help:
@echo "Please use \`make <target>' where <target> is one of"
@echo " dev to set up the development environment"
@echo " build create minified builds containing converse.js and all its dependencies"
########################################################################
## Install dependencies
stamp-npm: package.json
npm install
$(GRUNT) touch:npm
stamp-bower: stamp-npm bower.json
$(BOWER) install
$(GRUNT) touch:bower
clean::
@if EXIST stamp-npm $(RMF) stamp-npm
@if EXIST stamp-bower $(RMF) stamp-bower
@if EXIST node_modules\. $(RMRF) node_modules
@if EXIST components\. $(RMRF) components
dev: clean
npm install
$(BOWER) update
bundler install --path=.
########################################################################
## Builds
css::
$(SASS) sass/converse.scss > css/converse.css
build::
$(GRUNT) jst
$(GRUNT) minify
########################################################################
## Tests
check:: stamp-npm
$(PHANTOMJS) node_modules/phantom-jasmine/lib/run_jasmine_test.coffee tests.html