You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@aurora.apache.org by dm...@apache.org on 2017/10/16 23:48:32 UTC

aurora git commit: Manage Bootstrap with webpack.

Repository: aurora
Updated Branches:
  refs/heads/master 3e239b48b -> 24ae6e1b3


Manage Bootstrap with webpack.

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


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

Branch: refs/heads/master
Commit: 24ae6e1b36422f9aaf2139c752e6393c82d9e784
Parents: 3e239b4
Author: David McLaughlin <da...@dmclaughlin.com>
Authored: Mon Oct 16 16:36:56 2017 -0700
Committer: David McLaughlin <da...@dmclaughlin.com>
Committed: Mon Oct 16 16:36:56 2017 -0700

----------------------------------------------------------------------
 .gitignore                                                   | 1 +
 src/main/resources/scheduler/assets/scheduler/new-index.html | 2 --
 ui/package.json                                              | 3 +++
 ui/src/main/js/index.js                                      | 3 ++-
 ui/webpack.config.js                                         | 6 ++++++
 5 files changed, 12 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/aurora/blob/24ae6e1b/.gitignore
----------------------------------------------------------------------
diff --git a/.gitignore b/.gitignore
index 2f24af5..829ab05 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,6 +5,7 @@
 *.pyc
 *~
 *bundle.js*
+*.svg
 .gradle
 /.cache/
 /.coverage

http://git-wip-us.apache.org/repos/asf/aurora/blob/24ae6e1b/src/main/resources/scheduler/assets/scheduler/new-index.html
----------------------------------------------------------------------
diff --git a/src/main/resources/scheduler/assets/scheduler/new-index.html b/src/main/resources/scheduler/assets/scheduler/new-index.html
index d59a6f5..af84236 100644
--- a/src/main/resources/scheduler/assets/scheduler/new-index.html
+++ b/src/main/resources/scheduler/assets/scheduler/new-index.html
@@ -16,8 +16,6 @@
     <meta name='google' value='notranslate'>
     <link rel='icon' href='/assets/images/aurora.png' type='image/png'/>
     <title>Aurora</title>
-    <!-- Load our css at the end so we can override bootstrap css properties as needed -->
-    <link href='/assets/bower_components/bootstrap/dist/css/bootstrap.min.css' rel='stylesheet'>
   </head>
   <body>
     <div id="root"></div>

http://git-wip-us.apache.org/repos/asf/aurora/blob/24ae6e1b/ui/package.json
----------------------------------------------------------------------
diff --git a/ui/package.json b/ui/package.json
index cde8d10..c7f593d 100644
--- a/ui/package.json
+++ b/ui/package.json
@@ -4,6 +4,7 @@
   "description": "UI project for Apache Aurora",
   "main": "index.js",
   "dependencies": {
+    "bootstrap": "^3.3.7",
     "diff": "^3.4.0",
     "es6-shim": "^0.35.3",
     "moment": "^2.18.1",
@@ -33,12 +34,14 @@
     "eslint-plugin-promise": "^3.5.0",
     "eslint-plugin-react": "^7.2.1",
     "eslint-plugin-standard": "^3.0.1",
+    "file-loader": "^1.1.5",
     "jest": "^21.2.0",
     "jest-cli": "^21.2.0",
     "node-sass": "^4.5.3",
     "react-test-renderer": "^16.0.0",
     "sass-loader": "^6.0.6",
     "style-loader": "^0.18.2",
+    "url-loader": "^0.6.2",
     "webpack": "^2.6.1"
   },
   "jest": {

http://git-wip-us.apache.org/repos/asf/aurora/blob/24ae6e1b/ui/src/main/js/index.js
----------------------------------------------------------------------
diff --git a/ui/src/main/js/index.js b/ui/src/main/js/index.js
index 13d722f..5ad5f37 100644
--- a/ui/src/main/js/index.js
+++ b/ui/src/main/js/index.js
@@ -11,7 +11,8 @@ import Jobs from 'pages/Jobs';
 import Update from 'pages/Update';
 import Updates from 'pages/Updates';
 
-import styles from '../sass/app.scss'; // eslint-disable-line no-unused-vars
+import 'bootstrap/dist/css/bootstrap.css';
+import '../sass/app.scss';
 
 const injectApi = (Page) => (props) => <Page api={SchedulerClient} {...props} />;
 

http://git-wip-us.apache.org/repos/asf/aurora/blob/24ae6e1b/ui/webpack.config.js
----------------------------------------------------------------------
diff --git a/ui/webpack.config.js b/ui/webpack.config.js
index 4fd7b35..789817f 100644
--- a/ui/webpack.config.js
+++ b/ui/webpack.config.js
@@ -33,6 +33,12 @@ module.exports = {
           includePaths: [path.resolve(__dirname, 'src/main/sass')]
         }
       }]
+    }, {
+      test: /\.css$/,
+      use: ['style-loader', 'css-loader']
+    }, {
+      test: /\.(png|woff|woff2|eot|ttf|svg)$/,
+      loader: 'url-loader?limit=100000'
     }]
   }
 };