]> source.dussan.org Git - vaadin.git/commitdiff
Update core dependency when updating version (#19)
authorArtur <artur@vaadin.com>
Thu, 8 Mar 2018 21:17:03 +0000 (23:17 +0200)
committerGitHub <noreply@github.com>
Thu, 8 Mar 2018 21:17:03 +0000 (23:17 +0200)
package.json
update-core-version.js [new file with mode: 0644]

index 2347663c47c08e4a5ebbb7599f066e3ba6132c88..2b76d85b74fb94b63b7cb6c449c830e5b04a202e 100644 (file)
@@ -7,6 +7,9 @@
   "dependencies": {
     "bower": "latest"
   },
+  "scripts": {
+    "version": "node update-core-version.js && git add bower.json"
+  },
   "devDependencies": {},
   "keywords": [
     "vaadin",
diff --git a/update-core-version.js b/update-core-version.js
new file mode 100644 (file)
index 0000000..a284e4e
--- /dev/null
@@ -0,0 +1,8 @@
+var fs = require('fs');
+const fileName = './bower.json';
+var bowerjson = require(fileName);
+
+const version = require('./package.json').version;
+bowerjson.dependencies["vaadin-core"] = version;
+
+fs.writeFileSync(fileName, JSON.stringify(bowerjson, null, 2));