AngularJS: showcase
authorGustavo Martin Morcuende <gu.martinm@gmail.com>
Mon, 20 Jul 2015 00:48:15 +0000 (02:48 +0200)
committerGustavo Martin Morcuende <gu.martinm@gmail.com>
Mon, 20 Jul 2015 00:48:15 +0000 (02:48 +0200)
angularjs/showcase/app/app.module.js [new file with mode: 0644]
angularjs/showcase/app/index.html [new file with mode: 0644]
angularjs/showcase/bower.json [new file with mode: 0644]
angularjs/showcase/package.json [new file with mode: 0644]
angularjs/showcase/server.js [new file with mode: 0644]

diff --git a/angularjs/showcase/app/app.module.js b/angularjs/showcase/app/app.module.js
new file mode 100644 (file)
index 0000000..368471b
--- /dev/null
@@ -0,0 +1,21 @@
+(function () {
+
+  'use strict';
+
+  angular.module('app', [
+    'ui.router',
+    'ui.grid',
+    'ui.grid.pagination',
+    'ui.grid.expandable',
+    'ui.grid.saveState',
+    'ui.grid.pinning',
+    'ui.grid.selection',
+    'ui.grid.edit',
+    'ui.grid.cellNav',
+    'ui.grid.resizeColumns',
+    'ui.grid.autoResize',
+    'ui.bootstrap',
+    'ui.bootstrap.modal'
+  ]);
+}());
+
diff --git a/angularjs/showcase/app/index.html b/angularjs/showcase/app/index.html
new file mode 100644 (file)
index 0000000..7e7248f
--- /dev/null
@@ -0,0 +1,83 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+  <meta charset="utf-8" />
+  <title>Showcase</title>
+
+
+  <!-- Using wiredep for filling up index.html file with bower dependencies (no devDependencies) by means of tags: bower:css/bower:js/-->
+  <!-- Using gulp-useref for combining css and js files by means of the found tags in index.html file: build:css/build:js/build:remove -->
+
+
+  <!-- build:css css/combined.css -->
+  <!-- bower:css -->
+  <link rel="stylesheet" href="../bower_components/font-awesome/css/font-awesome.css" />
+  <link rel="stylesheet" href="../bower_components/angular-loading-bar/build/loading-bar.css" />
+  <link rel="stylesheet" href="../bower_components/angular-toggle-switch/angular-toggle-switch.css" />
+  <link rel="stylesheet" href="../bower_components/metisMenu/dist/metisMenu.css" />
+  <link rel="stylesheet" href="../bower_components/angular-chart.js/dist/angular-chart.css" />
+  <!-- endbower -->
+  <!-- endbuild -->
+
+
+  <!-- build:js js/lib.js -->
+  <!-- bower:js -->
+  <script src="../bower_components/angular/angular.js"></script>
+  <script src="../bower_components/angular-translate/angular-translate.js"></script>
+  <script src="../bower_components/angular-ui-router/release/angular-ui-router.js"></script>
+  <script src="../bower_components/angular-bootstrap/ui-bootstrap-tpls.js"></script>
+  <script src="../bower_components/jquery/dist/jquery.js"></script>
+  <script src="../bower_components/bootstrap/dist/js/bootstrap.js"></script>
+  <script src="../bower_components/json3/lib/json3.js"></script>
+  <script src="../bower_components/es5-shim/es5-shim.js"></script>
+  <script src="../bower_components/angular-resource/angular-resource.js"></script>
+  <script src="../bower_components/angular-cookies/angular-cookies.js"></script>
+  <script src="../bower_components/angular-sanitize/angular-sanitize.js"></script>
+  <script src="../bower_components/angular-animate/angular-animate.js"></script>
+  <script src="../bower_components/angular-touch/angular-touch.js"></script>
+  <script src="../bower_components/angular-route/angular-route.js"></script>
+  <script src="../bower_components/oclazyload/dist/ocLazyLoad.min.js"></script>
+  <script src="../bower_components/angular-loading-bar/build/loading-bar.js"></script>
+  <script src="../bower_components/angular-toggle-switch/angular-toggle-switch.js"></script>
+  <script src="../bower_components/metisMenu/dist/metisMenu.js"></script>
+  <script src="../bower_components/Chart.js/Chart.js"></script>
+  <script src="../bower_components/angular-chart.js/dist/angular-chart.js"></script>
+  <!-- endbower -->
+  <!-- endbuild -->
+
+
+  <!-- Custom JavaScript -->
+  <!-- build:js js/showcase.js -->
+  <script src="app/app.module.js"></script>
+  <!-- endbuild -->
+
+
+  <script>
+  (function() {
+    'use strict';
+
+    angular
+      .element(document)
+      .ready(function() {
+        angular.bootstrap(document.body, ['app',
+          'showcase'
+        ]);
+      });
+  })();
+  </script>
+
+
+  <!-- build:remove -->
+  <!-- MOCKS -->
+  <!-- MOCKS END -->
+  <!-- endbuild -->
+
+
+</head>
+
+
+<body ng-controller="AppCtrl" >
+</body>
+
+</html>
diff --git a/angularjs/showcase/bower.json b/angularjs/showcase/bower.json
new file mode 100644 (file)
index 0000000..8ac0813
--- /dev/null
@@ -0,0 +1,32 @@
+{
+  "name": "showcase",
+  "description": "My showcase module",
+  "version": "0.0.1",
+  "keywords": [
+    "showcase"
+  ],
+  "appPath": "app",
+  "private": "true",
+  "ignore": [
+    "src/",
+    "test/",
+    "package.json",
+    "gulpfile.js",
+    "karma.conf.js",
+    "server.js"
+  ],
+  "dependencies": {
+    "angular-translate": "2.7.2",
+    "angular-ui-router": "0.2.13",
+    "angular-bootstrap": "0.12.1",
+    "bootstrap": "latest",
+    "sb-admin": "latest"
+  },
+  "devDependencies": {
+    "angular-mocks": "latest"
+  },
+  "resolutions": {
+    "angular-bootstrap": "0.12.1",
+    "angular": "1.x"
+  }
+}
diff --git a/angularjs/showcase/package.json b/angularjs/showcase/package.json
new file mode 100644 (file)
index 0000000..2c360ed
--- /dev/null
@@ -0,0 +1,23 @@
+{
+  "name": "showcase",
+  "version": "0.0.1",
+  "description": "My showcase module",
+  "devDependencies": {
+    "express": "latest",
+    "express-http-proxy": "latest",
+    "gulp": "latest",
+    "gulp-useref": "latest",
+    "gulp-util": "latest",
+    "wiredep": "latest"
+  },
+  "config" : {
+    "backend-port": "8080",
+    "express-port": "8081",
+    "backend-server-name": "gumartinm.name",
+    "backend-server-url": "showcase"
+  },
+  "scripts": {
+    "prestart": "wiredep -s app/index.html",
+    "postinstall": "bower install --force-latest && wiredep -s app/index.html"
+  }
+}
diff --git a/angularjs/showcase/server.js b/angularjs/showcase/server.js
new file mode 100644 (file)
index 0000000..32f6871
--- /dev/null
@@ -0,0 +1,24 @@
+var express = require('express');
+var proxy = require('express-http-proxy');
+var app = express();
+
+// URL to backend server
+var moduleName = process.env.npm_package_config_backend_server_url;
+
+// Backend server port:
+var serverPort = process.env.npm_package_config_backend_port;
+
+// Backend server name:
+var serverName = process.env.npm_package_config_backend_server_name;
+
+
+app.use('/', express.static('app'));
+app.use('/' + moduleName, proxy('http://' + serverName, {
+  forwardPath: function(req, res) {
+    return require('url').parse('/' + moduleName + req.url).path;
+  },
+  port: serverPort
+}));
+
+app.listen(process.env.npm_package_config_express_port);