# coffee-client
features/bind-jade/build/client.js: features/bind-jade/client.coffee
	$(COFFEEC) -c $(COFFEE_FLAGS) -o features/bind-jade/build $^

# stylus
: 
	mkdir -p features/bind-jade/build/styles
	$(STYLUSC) $(STYLUS_FLAGS) -o features/bind-jade/build/styles $^

# component.json
features/bind-jade/build/component.json: features/bind-jade/Manifest.coffee
	mkdir -p features/bind-jade/build
	$(COMPONENT_GENERATOR) $< $@

# component-install
features/bind-jade/build/components: features/bind-jade/build/component.json
	cd features/bind-jade/build && $(COMPONENT_INSTALL) $(COMPONENT_INSTALL_FLAGS) || rm -rf features/bind-jade/build/components
	test -d features/bind-jade/build/components
	touch features/bind-jade/build/components

# component-build
features/bind-jade/build/bind-jade.js features/bind-jade/build/bind-jade.css: features/bind-jade/build/components features/bind-jade/build/client.js
	cd features/bind-jade/build && $(COMPONENT_BUILD) $(COMPONENT_BUILD_FLAGS) --name bind-jade -v -o ./

# local-components
build/local_components/features/bind-jade: features/bind-jade/build/client.js features/bind-jade/build/component.json features/bind-jade/build/components features/bind-jade/build/bind-jade.js features/bind-jade/build/bind-jade.css
	mkdir -p build/local_components/features/bind-jade
	cp -r features/bind-jade/build/* build/local_components/features/bind-jade
	touch build/local_components/features/bind-jade

# feature
features/bind-jade: build/local_components/features/bind-jade

# runtime
features/bind-jade/install: build/local_components/features/bind-jade
	rsync -rR $^ build/runtime/features/bind-jade

# global-coverage
build/coverage/features/bind-jade: features/bind-jade
	@mkdir -p build/coverage/features/bind-jade
	@cp -r features/bind-jade/* build/coverage/features/bind-jade
	$(COFFEEC) -c $(COFFEE_FLAGS) -o build/coverage/uninstrumented_js_files/features/bind-jade features/bind-jade
	$(ISTANBUL) instrument --no-compact -x "**/test/**" -x "**/build/**" -x "**/_design/**" -x "**/components/**" --output build/coverage/features/bind-jade build/coverage/uninstrumented_js_files/features/bind-jade
	touch build/coverage/features/bind-jade

# test-all
features/bind-jade/testall: 

# clean
features/bind-jade/clean: 
	rm -rf features/bind-jade/build

