[beast/ebeast: 23/24] EBEAST: generate package.json and auto-update npm packages



commit 4059401a2d47de9245ce7581b341c66b2f25b4ed
Author: Tim Janik <timj gnu org>
Date:   Tue Feb 21 15:52:35 2017 +0100

    EBEAST: generate package.json and auto-update npm packages
    
    Signed-off-by: Tim Janik <timj gnu org>

 ebeast/.gitignore      |    3 +++
 ebeast/Makefile.am     |   23 ++++++++---------------
 ebeast/package.json.in |   16 ++++++++++++++++
 3 files changed, 27 insertions(+), 15 deletions(-)
---
diff --git a/ebeast/.gitignore b/ebeast/.gitignore
new file mode 100644
index 0000000..37e3ca1
--- /dev/null
+++ b/ebeast/.gitignore
@@ -0,0 +1,3 @@
+/package.json
+/config.log
+/node_modules/
\ No newline at end of file
diff --git a/ebeast/Makefile.am b/ebeast/Makefile.am
index 75cf1ad..e58352f 100644
--- a/ebeast/Makefile.am
+++ b/ebeast/Makefile.am
@@ -9,27 +9,20 @@ EXTRA_DIST += $(strip \
 # == all: ==
 all:
        @echo "$$(basename $$(pwd))/: experimental code, not built by default. Usage:"
-       @echo " make npm        # install electron and build tools locally"
        @echo " make app        # build the v8 Bse module and app files"
        @echo " make run        # run the electron app in the current directory"
        @echo " make clean      # remove build files"
-       @echo " make npmclean   # remove npm installations and make clean"
 
-# == electron ==
-npm:
-       npm install --save electron             # ./node_modules/electron/dist/electron
-       npm install --save-dev node-gyp         # builds build/Release/v8bse.node
-node_modules/: npm
-clean-node_modules:
-       rm -rf node_modules/
-npmclean: clean-node_modules clean
-check-npm:
-       $(Q) test -d ./node_modules/ || { \
-        echo "make $(MAKECMDGOALS): error: missing ./node_modules/ - first 'make npm'" ; \
-        false ; }
+# == package.json ==
+package.json: package.json.in ../config.status
+       $(AM_V_GEN)
+       $(Q) ../config.status --file package.json
+       $(Q) npm install
+clean-local: clean-node_modules
+clean-node_modules: ; rm -rf node_modules/ package.json
 
 # == app ==
-app:   check-npm
+app:   package.json
        $(Q) $(MAKE) $(AM_MAKEFLAGS) -C v8bse v8bse.node
 
 # == run ==
diff --git a/ebeast/package.json.in b/ebeast/package.json.in
new file mode 100644
index 0000000..d4e2f2c
--- /dev/null
+++ b/ebeast/package.json.in
@@ -0,0 +1,16 @@
+{
+  "name":            "ebeast",
+  "version":         "@MAJOR@.@MINOR@.@MICRO@",
+  "description":     "Beast - Music Synthesizer and Composer",
+  "main":            "main.js",
+  "dependencies":    { "electron": "^1.4.15" },
+  "devDependencies": { "node-gyp": "^3.5.0" },
+  "license":         "LGPL-3.0",
+  "scripts": {
+    "test": "echo \"Error: no test specified\" && exit 1"
+  },
+  "repository": {
+    "type": "git",
+    "url": "git+https://github.com/tim-janik/beast.git";
+  }
+}


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]