Commit e5d07f5a authored by JC Brand's avatar JC Brand

Build resources before running tests

parent 01468fc0
...@@ -39,7 +39,8 @@ help: ...@@ -39,7 +39,8 @@ help:
@echo " clean Remove all NPM packages." @echo " clean Remove all NPM packages."
@echo " check Run all tests." @echo " check Run all tests."
@echo " css Generate CSS from the Sass files." @echo " css Generate CSS from the Sass files."
@echo " dev Set up the development environment and start the webpack dev server. To force a fresh start, run 'make clean' first." @echo " dev Set up the development environment and build unminified resources. To force a fresh start, run 'make clean' first."
@echo " devserver Set up the development environment and start the webpack dev server."
@echo " html Make standalone HTML files of the documentation." @echo " html Make standalone HTML files of the documentation."
@echo " po Generate gettext PO files for each i18n language." @echo " po Generate gettext PO files for each i18n language."
@echo " pot Generate a gettext POT file to be used for translations." @echo " pot Generate a gettext POT file to be used for translations."
...@@ -122,12 +123,20 @@ clean: ...@@ -122,12 +123,20 @@ clean:
dev: stamp-npm dev: stamp-npm
npm run dev npm run dev
.PHONY: devserver
devserver: stamp-npm
npm run serve
######################################################################## ########################################################################
## Builds ## Builds
.PHONY: css .PHONY: css
css: sass/*.scss dist/website.css dist/website.min.css css: sass/*.scss dist/website.css dist/website.min.css
dist/converse.js:: stamp-npm dev
dist/converse.css:: stamp-npm dev
dist/website.css:: stamp-npm sass dist/website.css:: stamp-npm sass
$(SASS) --source-map true --include-path $(BOOTSTRAP) sass/website.scss $@ $(SASS) --source-map true --include-path $(BOOTSTRAP) sass/website.scss $@
...@@ -188,7 +197,7 @@ eslint: stamp-npm ...@@ -188,7 +197,7 @@ eslint: stamp-npm
$(ESLINT) spec/ $(ESLINT) spec/
.PHONY: check .PHONY: check
check: eslint build check: eslint dev
LOG_CR_VERBOSITY=INFO $(CHROMIUM) --disable-gpu --no-sandbox http://localhost:$(HTTPSERVE_PORT)/tests/index.html LOG_CR_VERBOSITY=INFO $(CHROMIUM) --disable-gpu --no-sandbox http://localhost:$(HTTPSERVE_PORT)/tests/index.html
######################################################################## ########################################################################
......
...@@ -15,12 +15,13 @@ ...@@ -15,12 +15,13 @@
"src/" "src/"
], ],
"scripts": { "scripts": {
"dev": "webpack-dev-server --config webpack.serve.js", "serve": "webpack-dev-server --config webpack.serve.js",
"clean": "rm -rf node_modules stamp-npm dist *.zip", "clean": "rm -rf node_modules stamp-npm dist *.zip",
"converse-headless.js": "webpack --mode=development --type=headless", "converse-headless.js": "webpack --mode=development --type=headless",
"converse-headless.min.js": "npm run converse-headless.js && webpack --mode=production --type=headless", "converse-headless.min.js": "npm run converse-headless.js && webpack --mode=production --type=headless",
"nodeps": "webpack --config webpack.nodeps.js", "nodeps": "webpack --config webpack.nodeps.js",
"build": "webpack --config webpack.prod.js", "build": "webpack --config webpack.prod.js",
"dev": "webpack --config webpack.dev.js",
"watch": "webpack --watch --config webpack.dev.js", "watch": "webpack --watch --config webpack.dev.js",
"lerna": "lerna bootstrap --hoist --ignore-scripts", "lerna": "lerna bootstrap --hoist --ignore-scripts",
"prepare": "npm run lerna && npm run build" "prepare": "npm run lerna && npm run build"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment