diff options
Diffstat (limited to 'ecomp-portal-FE/client/bower_components/angular-cache/build_examples')
20 files changed, 180 insertions, 0 deletions
diff --git a/ecomp-portal-FE/client/bower_components/angular-cache/build_examples/browserify/README.md b/ecomp-portal-FE/client/bower_components/angular-cache/build_examples/browserify/README.md new file mode 100644 index 00000000..0d762e6d --- /dev/null +++ b/ecomp-portal-FE/client/bower_components/angular-cache/build_examples/browserify/README.md @@ -0,0 +1 @@ +Running `browserify app.js > bundle.js` in this directory will produce `bundle.js` diff --git a/ecomp-portal-FE/client/bower_components/angular-cache/build_examples/browserify/app.js b/ecomp-portal-FE/client/bower_components/angular-cache/build_examples/browserify/app.js new file mode 100644 index 00000000..6f841e7f --- /dev/null +++ b/ecomp-portal-FE/client/bower_components/angular-cache/build_examples/browserify/app.js @@ -0,0 +1,11 @@ +var angular = require('angular'); + +angular.module('app', [ + // this is what you would do in a real app + // require('angular-cache') + + // for the example to work + require('../../dist/angular-cache.js') +]).run(function ($rootScope, CacheFactory) { + $rootScope.test = 'It works! Using ' + (CacheFactory ? 'angular-cache' : 'undefined'); +}); diff --git a/ecomp-portal-FE/client/bower_components/angular-cache/build_examples/browserify/index.html b/ecomp-portal-FE/client/bower_components/angular-cache/build_examples/browserify/index.html new file mode 100644 index 00000000..9769ccd3 --- /dev/null +++ b/ecomp-portal-FE/client/bower_components/angular-cache/build_examples/browserify/index.html @@ -0,0 +1,11 @@ +<!DOCTYPE html> +<html ng-app="app"> +<head> + <title>My App</title> + <!-- load bundled scripts --> + <script src="bundle.js"></script> +</head> +<body> +<h1>{{ test }}</h1> +</body> +</html> diff --git a/ecomp-portal-FE/client/bower_components/angular-cache/build_examples/r.js/README.md b/ecomp-portal-FE/client/bower_components/angular-cache/build_examples/r.js/README.md new file mode 100644 index 00000000..0632f376 --- /dev/null +++ b/ecomp-portal-FE/client/bower_components/angular-cache/build_examples/r.js/README.md @@ -0,0 +1,3 @@ +Running `r.js -o require.config.js` in this directory will produce `bundle.js` + +In `index.html` switch `script/main` between `main` (load scripts dynamically) and `bundle` (load bundled scripts) diff --git a/ecomp-portal-FE/client/bower_components/angular-cache/build_examples/r.js/app.js b/ecomp-portal-FE/client/bower_components/angular-cache/build_examples/r.js/app.js new file mode 100644 index 00000000..74cb9040 --- /dev/null +++ b/ecomp-portal-FE/client/bower_components/angular-cache/build_examples/r.js/app.js @@ -0,0 +1,9 @@ +define('app', [ + 'angular', + 'angular-cache' +], function (angular, angularCacheModuleName) { + return angular.module('app', ['angular-cache']) + .run(function ($rootScope) { + $rootScope.test = 'It works! Using ' + angularCacheModuleName; + }); +}); diff --git a/ecomp-portal-FE/client/bower_components/angular-cache/build_examples/r.js/index.html b/ecomp-portal-FE/client/bower_components/angular-cache/build_examples/r.js/index.html new file mode 100644 index 00000000..781e49df --- /dev/null +++ b/ecomp-portal-FE/client/bower_components/angular-cache/build_examples/r.js/index.html @@ -0,0 +1,14 @@ +<!DOCTYPE html> +<html> +<head> + <title>My App</title> + <!-- load scripts dynamically --> + <script data-main="main" src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.1.17/require.min.js"></script> + + <!-- load bundled scripts --> + <!--<script data-main="bundle" src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.1.17/require.min.js"></script>--> +</head> +<body ng-cloak> +<h1>{{ test }}</h1> +</body> +</html> diff --git a/ecomp-portal-FE/client/bower_components/angular-cache/build_examples/r.js/main.js b/ecomp-portal-FE/client/bower_components/angular-cache/build_examples/r.js/main.js new file mode 100644 index 00000000..0fb6e498 --- /dev/null +++ b/ecomp-portal-FE/client/bower_components/angular-cache/build_examples/r.js/main.js @@ -0,0 +1,22 @@ +require.config({ + paths: { + angular: '../../bower_components/angular/angular', + 'angular-cache': '../../dist/angular-cache', + }, + shim: { + 'angular': { + exports: 'angular' + } + } +}); + +require([ + 'angular', + 'app' + ], function (angular, app) { + angular.element(document.getElementsByTagName('html')[0]).ready(function () { + // bootstrap the app manually + angular.bootstrap(document, ['app']); + }); + } +); diff --git a/ecomp-portal-FE/client/bower_components/angular-cache/build_examples/r.js/require.config.js b/ecomp-portal-FE/client/bower_components/angular-cache/build_examples/r.js/require.config.js new file mode 100644 index 00000000..a89ae0fb --- /dev/null +++ b/ecomp-portal-FE/client/bower_components/angular-cache/build_examples/r.js/require.config.js @@ -0,0 +1,6 @@ +({ + name: 'main', + mainConfigFile: 'main.js', + out: 'bundle.js', + optimize: 'none' +}) diff --git a/ecomp-portal-FE/client/bower_components/angular-cache/build_examples/webpack/README.md b/ecomp-portal-FE/client/bower_components/angular-cache/build_examples/webpack/README.md new file mode 100644 index 00000000..77d2d8f2 --- /dev/null +++ b/ecomp-portal-FE/client/bower_components/angular-cache/build_examples/webpack/README.md @@ -0,0 +1 @@ +Running `webpack` in this directory will produce `bundle.js` diff --git a/ecomp-portal-FE/client/bower_components/angular-cache/build_examples/webpack/app.js b/ecomp-portal-FE/client/bower_components/angular-cache/build_examples/webpack/app.js new file mode 100644 index 00000000..7b904ee5 --- /dev/null +++ b/ecomp-portal-FE/client/bower_components/angular-cache/build_examples/webpack/app.js @@ -0,0 +1,8 @@ +var angular = require('angular'); +var angularCacheModuleName = require('angular-cache'); + +var app = angular.module('app', [ + angularCacheModuleName +]).run(function ($rootScope) { + $rootScope.test = 'It works, imported ' + angularCacheModuleName; +}); diff --git a/ecomp-portal-FE/client/bower_components/angular-cache/build_examples/webpack/index.html b/ecomp-portal-FE/client/bower_components/angular-cache/build_examples/webpack/index.html new file mode 100644 index 00000000..9769ccd3 --- /dev/null +++ b/ecomp-portal-FE/client/bower_components/angular-cache/build_examples/webpack/index.html @@ -0,0 +1,11 @@ +<!DOCTYPE html> +<html ng-app="app"> +<head> + <title>My App</title> + <!-- load bundled scripts --> + <script src="bundle.js"></script> +</head> +<body> +<h1>{{ test }}</h1> +</body> +</html> diff --git a/ecomp-portal-FE/client/bower_components/angular-cache/build_examples/webpack/webpack.config.js b/ecomp-portal-FE/client/bower_components/angular-cache/build_examples/webpack/webpack.config.js new file mode 100644 index 00000000..1b3a6dfb --- /dev/null +++ b/ecomp-portal-FE/client/bower_components/angular-cache/build_examples/webpack/webpack.config.js @@ -0,0 +1,11 @@ +module.exports = { + entry: './app.js', + output: { + filename: 'bundle.js' + }, + resolve: { + alias: { + 'angular-cache': '../../dist/angular-cache.js' + } + } +}; diff --git a/ecomp-portal-FE/client/bower_components/angular-cache/build_examples/webpack_es6/README.md b/ecomp-portal-FE/client/bower_components/angular-cache/build_examples/webpack_es6/README.md new file mode 100644 index 00000000..77d2d8f2 --- /dev/null +++ b/ecomp-portal-FE/client/bower_components/angular-cache/build_examples/webpack_es6/README.md @@ -0,0 +1 @@ +Running `webpack` in this directory will produce `bundle.js` diff --git a/ecomp-portal-FE/client/bower_components/angular-cache/build_examples/webpack_es6/app.js b/ecomp-portal-FE/client/bower_components/angular-cache/build_examples/webpack_es6/app.js new file mode 100644 index 00000000..78a3d254 --- /dev/null +++ b/ecomp-portal-FE/client/bower_components/angular-cache/build_examples/webpack_es6/app.js @@ -0,0 +1,8 @@ +import angular from 'angular'; +import angularCacheModuleName from 'angular-cache'; + +let app = angular.module('app', [ + angularCacheModuleName +]).run($rootScope => { + $rootScope.test = 'It works, imported ' + angularCacheModuleName; +}); diff --git a/ecomp-portal-FE/client/bower_components/angular-cache/build_examples/webpack_es6/index.html b/ecomp-portal-FE/client/bower_components/angular-cache/build_examples/webpack_es6/index.html new file mode 100644 index 00000000..9769ccd3 --- /dev/null +++ b/ecomp-portal-FE/client/bower_components/angular-cache/build_examples/webpack_es6/index.html @@ -0,0 +1,11 @@ +<!DOCTYPE html> +<html ng-app="app"> +<head> + <title>My App</title> + <!-- load bundled scripts --> + <script src="bundle.js"></script> +</head> +<body> +<h1>{{ test }}</h1> +</body> +</html> diff --git a/ecomp-portal-FE/client/bower_components/angular-cache/build_examples/webpack_es6/webpack.config.js b/ecomp-portal-FE/client/bower_components/angular-cache/build_examples/webpack_es6/webpack.config.js new file mode 100644 index 00000000..3caf2bef --- /dev/null +++ b/ecomp-portal-FE/client/bower_components/angular-cache/build_examples/webpack_es6/webpack.config.js @@ -0,0 +1,16 @@ +module.exports = { + entry: './app.js', + output: { + filename: 'bundle.js' + }, + resolve: { + alias: { + 'angular-cache': '../../dist/angular-cache.js' + } + }, + module: { + loaders: [ + { test: /(.+)\.js$/, loader: 'babel-loader?blacklist=useStrict' } + ] + } +}; diff --git a/ecomp-portal-FE/client/bower_components/angular-cache/build_examples/webpack_es6_2/README.md b/ecomp-portal-FE/client/bower_components/angular-cache/build_examples/webpack_es6_2/README.md new file mode 100644 index 00000000..77d2d8f2 --- /dev/null +++ b/ecomp-portal-FE/client/bower_components/angular-cache/build_examples/webpack_es6_2/README.md @@ -0,0 +1 @@ +Running `webpack` in this directory will produce `bundle.js` diff --git a/ecomp-portal-FE/client/bower_components/angular-cache/build_examples/webpack_es6_2/app.js b/ecomp-portal-FE/client/bower_components/angular-cache/build_examples/webpack_es6_2/app.js new file mode 100644 index 00000000..c75a0b36 --- /dev/null +++ b/ecomp-portal-FE/client/bower_components/angular-cache/build_examples/webpack_es6_2/app.js @@ -0,0 +1,8 @@ +import 'angular'; +import 'angular-cache'; + +let app = angular.module('app', [ + 'angular-cache' +]).run(($rootScope, CacheFactory) => { + $rootScope.test = 'It works, imported ' + (CacheFactory ? 'angular-cache' : 'undefined'); +}); diff --git a/ecomp-portal-FE/client/bower_components/angular-cache/build_examples/webpack_es6_2/index.html b/ecomp-portal-FE/client/bower_components/angular-cache/build_examples/webpack_es6_2/index.html new file mode 100644 index 00000000..9769ccd3 --- /dev/null +++ b/ecomp-portal-FE/client/bower_components/angular-cache/build_examples/webpack_es6_2/index.html @@ -0,0 +1,11 @@ +<!DOCTYPE html> +<html ng-app="app"> +<head> + <title>My App</title> + <!-- load bundled scripts --> + <script src="bundle.js"></script> +</head> +<body> +<h1>{{ test }}</h1> +</body> +</html> diff --git a/ecomp-portal-FE/client/bower_components/angular-cache/build_examples/webpack_es6_2/webpack.config.js b/ecomp-portal-FE/client/bower_components/angular-cache/build_examples/webpack_es6_2/webpack.config.js new file mode 100644 index 00000000..3caf2bef --- /dev/null +++ b/ecomp-portal-FE/client/bower_components/angular-cache/build_examples/webpack_es6_2/webpack.config.js @@ -0,0 +1,16 @@ +module.exports = { + entry: './app.js', + output: { + filename: 'bundle.js' + }, + resolve: { + alias: { + 'angular-cache': '../../dist/angular-cache.js' + } + }, + module: { + loaders: [ + { test: /(.+)\.js$/, loader: 'babel-loader?blacklist=useStrict' } + ] + } +}; |