aurora-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dmclaugh...@apache.org
Subject aurora git commit: Add a package.json file in the plugin directory to allow custom dependencies
Date Wed, 25 Oct 2017 20:03:20 GMT
Repository: aurora
Updated Branches:
  refs/heads/master 418813cf1 -> 2aa968624


Add a package.json file in the plugin directory to allow custom dependencies

Problem: if you're using the plugin mechanism of the new UI, you cannot add your own custom
dependencies without a fork of the package.json file. This adds a package.json file into the
plugin diretory that is used to install dependencies into the main node_modules directory.
With this separate package.json file, we remove the burden of upstream merge conflicts.

Reviewed at https://reviews.apache.org/r/63262/


Project: http://git-wip-us.apache.org/repos/asf/aurora/repo
Commit: http://git-wip-us.apache.org/repos/asf/aurora/commit/2aa96862
Tree: http://git-wip-us.apache.org/repos/asf/aurora/tree/2aa96862
Diff: http://git-wip-us.apache.org/repos/asf/aurora/diff/2aa96862

Branch: refs/heads/master
Commit: 2aa968624d5e5b9bc457f19d7550efd10c818367
Parents: 418813c
Author: David McLaughlin <david@dmclaughlin.com>
Authored: Wed Oct 25 13:00:04 2017 -0700
Committer: David McLaughlin <david@dmclaughlin.com>
Committed: Wed Oct 25 13:00:04 2017 -0700

----------------------------------------------------------------------
 build.gradle           | 9 ++++++++-
 ui/plugin/package.json | 9 +++++++++
 ui/webpack.config.js   | 2 +-
 3 files changed, 18 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/aurora/blob/2aa96862/build.gradle
----------------------------------------------------------------------
diff --git a/build.gradle b/build.gradle
index d110d4a..1c1d381 100644
--- a/build.gradle
+++ b/build.gradle
@@ -145,7 +145,14 @@ project(':ui') {
     args = ['test']
   }
 
-  task install(type: NpmTask) {
+  task pluginInstall(type: NpmTask) {
+    inputs.files(file('plugin/package.json'))
+    outputs.files(fileTree('node_modules'))
+
+    args = ['install', 'plugin/']
+  }
+
+  task install(type: NpmTask, dependsOn: 'pluginInstall') {
     inputs.files(file('package.json'))
     outputs.files(fileTree('node_modules'))
     // Install into the project dir to sandbox everything under ui/

http://git-wip-us.apache.org/repos/asf/aurora/blob/2aa96862/ui/plugin/package.json
----------------------------------------------------------------------
diff --git a/ui/plugin/package.json b/ui/plugin/package.json
new file mode 100644
index 0000000..ea7c834
--- /dev/null
+++ b/ui/plugin/package.json
@@ -0,0 +1,9 @@
+{
+  "name": "aurora-ui-plugin",
+  "version": "1.0.0",
+  "description": "Use this package.json to enter your own custom npm dependencies (for custom
UIs)",
+  "scripts": {
+    "test": "echo \"Error: no test specified\" && exit 1"
+  },
+  "dependencies": {}
+}

http://git-wip-us.apache.org/repos/asf/aurora/blob/2aa96862/ui/webpack.config.js
----------------------------------------------------------------------
diff --git a/ui/webpack.config.js b/ui/webpack.config.js
index 60e611c..363abdd 100644
--- a/ui/webpack.config.js
+++ b/ui/webpack.config.js
@@ -2,7 +2,7 @@ var path = require('path');
 var webpack = require('webpack');
 
 var SOURCE_PATH = path.resolve(__dirname, 'src/main/js');
-var EXTENSION_PATH = path.resolve(__dirname, 'plugin/js')
+var EXTENSION_PATH = path.resolve(__dirname, 'plugin/js');
 
 module.exports = {
   devtool: 'source-map',


Mime
View raw message