2016-05-13 16:17:07 -04:00
|
|
|
.PHONY: build test run clean stop check-style run-unit
|
2016-03-14 08:50:46 -04:00
|
|
|
|
2016-05-13 16:17:07 -04:00
|
|
|
BUILD_SERVER_DIR = ..
|
|
|
|
|
|
2017-05-18 09:28:18 -04:00
|
|
|
check-style: .yarninstall
|
2016-03-14 08:50:46 -04:00
|
|
|
@echo Checking for style guide compliance
|
|
|
|
|
|
2017-05-18 09:28:18 -04:00
|
|
|
yarn run check
|
2016-03-14 08:50:46 -04:00
|
|
|
|
2017-05-18 09:28:18 -04:00
|
|
|
test: .yarninstall
|
2016-06-02 11:00:49 -04:00
|
|
|
cd $(BUILD_SERVER_DIR) && $(MAKE) internal-test-web-client
|
2016-05-13 16:17:07 -04:00
|
|
|
|
2017-05-18 09:28:18 -04:00
|
|
|
.yarninstall: package.json
|
|
|
|
|
@echo Getting dependencies using yarn
|
2016-03-14 08:50:46 -04:00
|
|
|
|
2017-05-24 17:27:41 -04:00
|
|
|
yarn cache clean
|
2017-05-18 09:28:18 -04:00
|
|
|
yarn install --pure-lockfile
|
2016-03-14 08:50:46 -04:00
|
|
|
|
|
|
|
|
touch $@
|
|
|
|
|
|
2017-05-18 09:28:18 -04:00
|
|
|
build: .yarninstall
|
2016-03-16 23:00:33 -04:00
|
|
|
@echo Building mattermost Webapp
|
2016-03-14 08:50:46 -04:00
|
|
|
|
2016-07-15 08:57:52 -04:00
|
|
|
rm -rf dist
|
|
|
|
|
|
2017-05-18 09:28:18 -04:00
|
|
|
yarn run build
|
2016-03-16 23:00:33 -04:00
|
|
|
|
2017-05-18 09:28:18 -04:00
|
|
|
run: .yarninstall
|
2016-03-16 23:00:33 -04:00
|
|
|
@echo Running mattermost Webapp for development
|
|
|
|
|
|
2017-05-18 09:28:18 -04:00
|
|
|
yarn run run &
|
2016-03-18 08:48:26 -04:00
|
|
|
|
2017-05-18 09:28:18 -04:00
|
|
|
run-fullmap: .yarninstall
|
2016-03-29 18:32:15 -04:00
|
|
|
@echo FULL SOURCE MAP Running mattermost Webapp for development FULL SOURCE MAP
|
|
|
|
|
|
2017-05-18 09:28:18 -04:00
|
|
|
yarn run run-fullmap &
|
2016-03-29 18:32:15 -04:00
|
|
|
|
2016-03-18 08:48:26 -04:00
|
|
|
stop:
|
|
|
|
|
@echo Stopping changes watching
|
|
|
|
|
|
2016-10-04 08:56:01 -04:00
|
|
|
ifeq ($(OS),Windows_NT)
|
|
|
|
|
wmic process where "Caption='node.exe' and CommandLine like '%webpack%'" call terminate
|
|
|
|
|
else
|
2016-03-18 08:48:26 -04:00
|
|
|
@for PROCID in $$(ps -ef | grep "[n]ode.*[w]ebpack" | awk '{ print $$2 }'); do \
|
|
|
|
|
echo stopping webpack watch $$PROCID; \
|
|
|
|
|
kill $$PROCID; \
|
|
|
|
|
done
|
2016-10-04 08:56:01 -04:00
|
|
|
endif
|
2016-03-16 23:00:33 -04:00
|
|
|
|
|
|
|
|
clean:
|
|
|
|
|
@echo Cleaning Webapp
|
|
|
|
|
|
|
|
|
|
rm -rf dist
|
|
|
|
|
rm -rf node_modules
|
2017-05-18 09:28:18 -04:00
|
|
|
rm -f .yarninstall
|
2017-05-24 17:27:41 -04:00
|
|
|
|
|
|
|
|
yarn cache clean
|