Commit e9e17cb2 authored by JC Brand's avatar JC Brand

Fixes #1543

parent ad8d4c90
...@@ -35,7 +35,7 @@ all: dev dist ...@@ -35,7 +35,7 @@ all: dev dist
help: help:
@echo "Please use \`make <target>' where <target> is one of the following:" @echo "Please use \`make <target>' where <target> is one of the following:"
@echo "" @echo ""
@echo " all A synonym for 'make dev'." @echo " all Set up dev environment and create all builds
@echo " build Create minified builds of converse.js and all its dependencies." @echo " build Create minified builds of converse.js and all its dependencies."
@echo " clean Remove all NPM packages." @echo " clean Remove all NPM packages."
@echo " check Run all tests." @echo " check Run all tests."
...@@ -57,11 +57,11 @@ help: ...@@ -57,11 +57,11 @@ help:
## Miscellaneous ## Miscellaneous
.PHONY: serve .PHONY: serve
serve: dev serve: stamp-npm
$(HTTPSERVE) -p $(HTTPSERVE_PORT) -c-1 $(HTTPSERVE) -p $(HTTPSERVE_PORT) -c-1
.PHONY: serve_bg .PHONY: serve_bg
serve_bg: dev serve_bg: stamp-npm
$(HTTPSERVE) -p $(HTTPSERVE_PORT) -c-1 -s & $(HTTPSERVE) -p $(HTTPSERVE_PORT) -c-1 -s &
######################################################################## ########################################################################
...@@ -142,32 +142,36 @@ dev: stamp-npm ...@@ -142,32 +142,36 @@ dev: stamp-npm
## Builds ## Builds
.PHONY: css .PHONY: css
css: dev sass/*.scss css/converse.css css/converse.min.css css/website.css css/website.min.css css/font-awesome.css css: sass/*.scss css/converse.css css/converse.min.css css/website.css css/website.min.css css/font-awesome.css
css/converse.css:: dev webpack.config.js sass css/converse.css:: stamp-npm webpack.config.js sass
$(NPX) webpack --type=css $(NPX) webpack --type=css --mode=development
css/website.css:: dev sass css/website.css:: stamp-npm sass
$(SASS) --source-map true --include-path $(BOURBON) --include-path $(BOOTSTRAP) sass/website.scss $@ $(SASS) --source-map true --include-path $(BOURBON) --include-path $(BOOTSTRAP) sass/website.scss $@
css/font-awesome.css:: dev sass css/font-awesome.css:: stamp-npm sass
$(SASS) --source-map true --include-path $(BOURBON) --include-path $(BOOTSTRAP) sass/font-awesome.scss $@ $(SASS) --source-map true --include-path $(BOURBON) --include-path $(BOOTSTRAP) sass/font-awesome.scss $@
css/%.min.css:: css/%.css css/%.min.css:: css/%.css
make dev make stamp-npm
$(CLEANCSS) $< > $@ $(CLEANCSS) $< > $@
.PHONY: watchcss
watchcss: stamp-npm
$(NPX) webpack --type=css --mode=development --watch
.PHONY: watchjs .PHONY: watchjs
watchjs: dev src/headless/dist/converse-headless.js watchjs: stamp-npm src/headless/dist/converse-headless.js
$(NPX) webpack --mode=development --watch $(NPX) webpack --mode=development --watch
.PHONY: watchjsheadless .PHONY: watchjsheadless
watchjsheadless: dev watchjsheadless: stamp-npm
$(NPX) webpack --mode=development --watch --type=headless $(NPX) webpack --mode=development --watch --type=headless
.PHONY: watch .PHONY: watch
watch: dev watch: stamp-npm
make -j 2 watchjsheadless watchjs make -j 3 watchcss watchjsheadless watchjs
.PHONY: logo .PHONY: logo
logo: logo/conversejs-transparent16.png \ logo: logo/conversejs-transparent16.png \
...@@ -218,7 +222,7 @@ dist/converse-no-dependencies-es2015.js: src webpack.config.js stamp-npm @conver ...@@ -218,7 +222,7 @@ dist/converse-no-dependencies-es2015.js: src webpack.config.js stamp-npm @conver
dist:: build dist:: build
.PHONY: build .PHONY: build
build:: dev css $(BUILDS) build:: stamp-npm css $(BUILDS)
######################################################################## ########################################################################
## Tests ## Tests
...@@ -248,7 +252,7 @@ check: eslint dist/converse.js ...@@ -248,7 +252,7 @@ check: eslint dist/converse.js
docsdev: ./bin/activate .installed.cfg docsdev: ./bin/activate .installed.cfg
.PHONY: html .PHONY: html
html: dev docsdev apidoc html: stamp-npm docsdev apidoc
rm -rf $(BUILDDIR)/html rm -rf $(BUILDDIR)/html
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
make apidoc make apidoc
......
This diff is collapsed.
...@@ -3,8 +3,6 @@ ...@@ -3,8 +3,6 @@
* Any of the following components may be removed if they're not needed. * Any of the following components may be removed if they're not needed.
*/ */
import '../sass/converse.scss';
import "@converse/headless/converse-caps"; // XEP-0115 Entity Capabilities import "@converse/headless/converse-caps"; // XEP-0115 Entity Capabilities
import "@converse/headless/converse-mam"; // XEP-0313 Message Archive Management import "@converse/headless/converse-mam"; // XEP-0313 Message Archive Management
import "@converse/headless/converse-ping"; // XEP-0199 XMPP Ping import "@converse/headless/converse-ping"; // XEP-0199 XMPP Ping
......
...@@ -188,9 +188,7 @@ function parameterize () { ...@@ -188,9 +188,7 @@ function parameterize () {
if (type === 'css') { if (type === 'css') {
console.log("Building only CSS"); console.log("Building only CSS");
const fn = config.output.filename; const fn = config.output.filename;
config.output.filename = `${fn.replace(/\.js$/, '')}.css`;
config.entry = path.resolve(__dirname, 'sass/converse.scss'); config.entry = path.resolve(__dirname, 'sass/converse.scss');
config.output = {filename: '../css/converse.css'};
} }
if (mode === 'production') { if (mode === 'production') {
......
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