From ef045232d1d867113e6c711069ce022fb8709506 Mon Sep 17 00:00:00 2001 From: Carsten Grohmann Date: Sun, 26 Dec 2021 23:03:04 +0100 Subject: [PATCH] Move rollup.js configuration into own config file --- Makefile | 8 ++++---- README.md | 2 +- rollup.config.js | 14 ++++++++++++++ 3 files changed, 19 insertions(+), 5 deletions(-) create mode 100644 rollup.config.js diff --git a/Makefile b/Makefile index 2d7cec1..32f3ef2 100644 --- a/Makefile +++ b/Makefile @@ -22,14 +22,14 @@ TEST_FILE = $(BASE_DIR)/test.py VERSION = 0.5.0 RELEASE_DIR = $(BASE_DIR)/release -RELEASE_FILES = $(HTML_FILE) $(JS_OUT_FILE) $(PY_SOURCE) $(TEST_FILE ) Makefile requirements.txt LICENSE.txt \ - README.md +RELEASE_FILES = $(HTML_FILE) $(JS_OUT_FILE) $(PY_SOURCE) $(TEST_FILE ) rollup.config.js Makefile requirements.txt \ + LICENSE.txt README.md RELEASE_INST_DIR = $(RELEASE_DIR)/OOMAnalyser-$(VERSION) RELEASE_TARGZ = OOMAnalyser-$(VERSION).tar.gz RELEASE_ZIP = OOMAnalyser-$(VERSION).zip ROLLUP_BIN = rollup -ROLLUP_OPTS = --format=umd --name OOMAnalyser --file=${JS_OUT_FILE} +ROLLUP_OPTS = --config rollup.config.js TRANSCRYPT_BIN = transcrypt TRANSCRYPT_OPTS = --build --map --nomin --sform --esv 6 @@ -88,7 +88,7 @@ ${JS_TEMP_FILE}: $(VIRTUAL_ENV_DIR)/bin/activate ${PY_SOURCE} ${JS_OUT_FILE}: $(VIRTUAL_ENV_DIR)/bin/activate ${JS_TEMP_FILE} . $(VIRTUAL_ENV_DIR)/bin/activate - $(ROLLUP_BIN) $(ROLLUP_OPTS) -- ${JS_TEMP_FILE} + $(ROLLUP_BIN) $(ROLLUP_OPTS) #+ Compile Python to JavaScript build: $(VIRTUAL_ENV_DIR)/bin/activate ${JS_OUT_FILE} diff --git a/README.md b/README.md index 833e584..1653655 100644 --- a/README.md +++ b/README.md @@ -63,7 +63,7 @@ or ``` # . env/bin/activate # transcrypt --build --map --nomin -e 6 OOMAnalyser.py -# rollup --format=umd --name OOMAnalyser --file=OOMAnalyser.js -- __target__/OOMAnalyser.js +# rollup --config rollup.config.js or diff --git a/rollup.config.js b/rollup.config.js new file mode 100644 index 0000000..916b5d8 --- /dev/null +++ b/rollup.config.js @@ -0,0 +1,14 @@ +// Rollup.js configuration for OOMAnalyser +// +// Copyright (c) 2017-2021 Carsten Grohmann +// License: MIT (see LICENSE.txt) +// THIS PROGRAM COMES WITH NO WARRANTY + +export default { + input: '__target__/OOMAnalyser.js', + output: { + file: 'OOMAnalyser.js', + name: 'OOMAnalyser', + format: 'umd' + } +}; \ No newline at end of file