Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id DACE6200D27 for ; Wed, 25 Oct 2017 22:03:21 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id D93A8160BDA; Wed, 25 Oct 2017 20:03:21 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 2D2721609CE for ; Wed, 25 Oct 2017 22:03:21 +0200 (CEST) Received: (qmail 54576 invoked by uid 500); 25 Oct 2017 20:03:20 -0000 Mailing-List: contact commits-help@aurora.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@aurora.apache.org Delivered-To: mailing list commits@aurora.apache.org Received: (qmail 54567 invoked by uid 99); 25 Oct 2017 20:03:20 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 25 Oct 2017 20:03:20 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 477BDDFBD7; Wed, 25 Oct 2017 20:03:20 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: dmclaughlin@apache.org To: commits@aurora.apache.org Message-Id: X-Mailer: ASF-Git Admin Mailer 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 +0000 (UTC) archived-at: Wed, 25 Oct 2017 20:03:22 -0000 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 Authored: Wed Oct 25 13:00:04 2017 -0700 Committer: David McLaughlin 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',