├── .editorconfig ├── .gitignore ├── .jshintrc ├── .npmignore ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── aurelia.protractor.js ├── build ├── args.js ├── babel-options.js ├── paths.js └── tasks │ ├── build.js │ ├── clean.js │ ├── dev.js │ ├── doc.js │ ├── e2e.js │ ├── lint.js │ ├── prepare-release.js │ ├── serve.js │ ├── test.js │ └── watch.js ├── config.js ├── dist ├── app.html ├── app.js ├── child-router.html ├── child-router.js ├── flickr.html ├── flickr.js ├── nav-bar.html ├── nav-bar.js ├── welcome.html └── welcome.js ├── doc ├── CHANGELOG.md └── api.json ├── gulpfile.js ├── index.html ├── karma.conf.js ├── package.json ├── protractor.conf.js ├── src ├── app.html ├── app.js ├── child-router.html ├── child-router.js ├── flickr.html ├── flickr.js ├── nav-bar.html ├── nav-bar.js ├── welcome.html └── welcome.js ├── styles └── styles.css └── test ├── e2e ├── dist │ ├── demo.spec.js │ ├── skeleton.po.js │ └── welcome.po.js └── src │ ├── demo.spec.js │ ├── skeleton.po.js │ └── welcome.po.js └── unit ├── app.spec.js ├── child-router.spec.js └── flickr.spec.js /.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig is awesome: http://EditorConfig.org 2 | 3 | # top-most EditorConfig file 4 | root = true 5 | 6 | # Unix-style newlines with a newline ending every file 7 | [*] 8 | end_of_line = lf 9 | insert_final_newline = true 10 | 11 | # 2 space indentation 12 | [**.*] 13 | indent_style = space 14 | indent_size = 2 -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | jspm_packages 3 | bower_components 4 | .idea 5 | .DS_STORE -------------------------------------------------------------------------------- /.jshintrc: -------------------------------------------------------------------------------- 1 | { 2 | "esnext": true 3 | } 4 | -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | jspm_packages 2 | bower_components 3 | .idea -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | We'd love for you to contribute and to make this project even better than it is today! If this interests you, please begin by reading [our contributing guidelines](https://github.com/DurandalProject/about/blob/master/CONTRIBUTING.md). The contributing document will provide you with all the information you need to get started. Once you have read that, you will need to also [sign our CLA](http://goo.gl/forms/dI8QDDSyKR) before we can accept a Pull Request from you. More information on the process is included in the [contributor's guide](https://github.com/DurandalProject/about/blob/master/CONTRIBUTING.md). 4 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 Durandal Inc. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # aurelia-skeleton-navigation 2 | 3 | This skeleton is part of the [Aurelia](http://www.aurelia.io/) platform. It sets up a standard navigation-style app using gulp to build your ES6 code with the Babel compiler. Karma/Protractor/Jasmine testing is also configured. 4 | 5 | > To keep up to date on [Aurelia](http://www.aurelia.io/), please visit and subscribe to [the official blog](http://blog.durandal.io/). If you have questions, we invite you to join us on [![Join the chat at https://gitter.im/aurelia/discuss](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/aurelia/discuss?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge). 6 | 7 | ## Running The App 8 | 9 | To run the app, follow these steps. 10 | 11 | 1. Ensure that [NodeJS](http://nodejs.org/) is installed. This provides the platform on which the build tooling runs. 12 | 2. From the project folder, execute the following command: 13 | 14 | ```shell 15 | npm install 16 | ``` 17 | 3. Ensure that [Gulp](http://gulpjs.com/) is installed. If you need to install it, use the following command: 18 | 19 | ```shell 20 | npm install -g gulp 21 | ``` 22 | 4. Ensure that [jspm](http://jspm.io/) is installed. If you need to install it, use the following command: 23 | 24 | ```shell 25 | npm install -g jspm 26 | ``` 27 | > **Note:** jspm queries GitHub to install semver packages, but GitHub has a rate limit on anonymous API requests. It is advised that you configure jspm with your GitHub credentials in order to avoid problems. You can do this by executing `jspm endpoint config github` and following the prompts. 28 | 5. Install the client-side dependencies with jspm: 29 | 30 | ```shell 31 | jspm install -y 32 | ``` 33 | >**Note:** Windows users, if you experience an error of "unknown command unzip" you can solve this problem by doing `npm install -g unzip` and then re-running `jspm install`. 34 | 6. To run the app, execute the following command: 35 | 36 | ```shell 37 | gulp watch 38 | ``` 39 | 7. Browse to [http://localhost:9000](http://localhost:9000) to see the app. You can make changes in the code found under `src` and the browser should auto-refresh itself as you save files. 40 | 41 | > Note: At present there is a bug in the HTMLImports polyfill which only occurs on IE. We have submitted a pull request to the team with the fix. In the mean time, if you want to test on IE, you can work around the issue by explicitly adding a script tag before you load system.js. The script tag should look something like this (be sure to confirm the version number): 42 | 43 | ```html 44 | 45 | ``` 46 | 47 | ## Running The Unit Tests 48 | 49 | To run the unit tests, first ensure that you have followed the steps above in order to install all dependencies and successfully build the library. Once you have done that, proceed with these additional steps: 50 | 51 | 1. Ensure that the [Karma](http://karma-runner.github.io/) CLI is installed. If you need to install it, use the following command: 52 | 53 | ```shell 54 | npm install -g karma-cli 55 | ``` 56 | 2. Install Aurelia libs for test visibility: 57 | 58 | ```shell 59 | jspm install aurelia-framework 60 | jspm install aurelia-http-client 61 | jspm install aurelia-router 62 | ``` 63 | 3. You can now run the tests with this command: 64 | 65 | ```shell 66 | karma start 67 | ``` 68 | 69 | ## Running The E2E Tests 70 | Integration tests are performed with [Protractor](http://angular.github.io/protractor/#/). 71 | 72 | 1. Place your E2E-Tests into the folder ```test/e2e/src``` 73 | 2. Install the necessary webdriver 74 | 75 | ```shell 76 | gulp webdriver_update 77 | ``` 78 | 79 | 3. Configure the path to the webdriver by opening the file ```protractor.conf.js``` and adjusting the ```seleniumServerJar``` property. Typically its only needed to adjust the version number. 80 | 81 | 4. Run the E2E-Tests 82 | 83 | ```shell 84 | gulp e2e 85 | ``` 86 | -------------------------------------------------------------------------------- /aurelia.protractor.js: -------------------------------------------------------------------------------- 1 | /* Aurelia Protractor Plugin */ 2 | function addValueBindLocator() { 3 | by.addLocator('valueBind', function (bindingModel, opt_parentElement) { 4 | var using = opt_parentElement || document; 5 | var matches = using.querySelectorAll('*[value\\.bind="' + bindingModel +'"]'); 6 | var result; 7 | 8 | if (matches.length === 0) { 9 | result = null; 10 | } else if (matches.length === 1) { 11 | result = matches[0]; 12 | } else { 13 | result = matches; 14 | } 15 | 16 | return result; 17 | }); 18 | } 19 | 20 | function loadAndWaitForAureliaPage(pageUrl) { 21 | browser.get(pageUrl); 22 | return browser.executeAsyncScript( 23 | 'var cb = arguments[arguments.length - 1];' + 24 | 'document.addEventListener("aurelia-composed", function (e) {' + 25 | ' cb("Aurelia App composed")' + 26 | '}, false);' 27 | ).then(function(result){ 28 | console.log(result); 29 | return result; 30 | }); 31 | } 32 | 33 | function waitForHttpDone() { 34 | return browser.executeAsyncScript( 35 | 'var cb = arguments[arguments.length - 1];' + 36 | 'document.addEventListener("aurelia-http-client-requests-drained", function (e) {' + 37 | ' cb(true)' + 38 | '}, false);' 39 | ).then(function(result){ 40 | return result; 41 | }); 42 | } 43 | 44 | /* Plugin hooks */ 45 | exports.setup = function(config) { 46 | // Ignore the default Angular synchronization helpers 47 | browser.ignoreSynchronization = true; 48 | 49 | // add the aurelia specific valueBind locator 50 | addValueBindLocator(); 51 | 52 | // attach a new way to browser.get a page and wait for Aurelia to complete loading 53 | browser.loadAndWaitForAureliaPage = loadAndWaitForAureliaPage; 54 | 55 | // wait for all http requests to finish 56 | browser.waitForHttpDone = waitForHttpDone; 57 | }; 58 | 59 | exports.teardown = function(config) {}; 60 | exports.postResults = function(config) {}; 61 | -------------------------------------------------------------------------------- /build/args.js: -------------------------------------------------------------------------------- 1 | var yargs = require('yargs'); 2 | 3 | var argv = yargs.argv, 4 | validBumpTypes = "major|minor|patch|prerelease".split("|"), 5 | bump = (argv.bump || 'patch').toLowerCase(); 6 | 7 | if(validBumpTypes.indexOf(bump) === -1) { 8 | throw new Error('Unrecognized bump "' + bump + '".'); 9 | } 10 | 11 | module.exports = { 12 | bump: bump 13 | }; 14 | -------------------------------------------------------------------------------- /build/babel-options.js: -------------------------------------------------------------------------------- 1 | // documentation for these options can be 2 | // found at https://6to5.org/docs/usage/options/ 3 | module.exports = { 4 | filename: '', 5 | filenameRelative: '', 6 | blacklist: [], 7 | whitelist: [], 8 | modules: '', 9 | sourceMap: true, 10 | sourceMapName: '', 11 | sourceRoot: '', 12 | moduleRoot: '', 13 | moduleIds: false, 14 | experimental: false, 15 | format: { 16 | comments: false, 17 | compact: false, 18 | indent: { 19 | parentheses: true, 20 | adjustMultilineComment: true, 21 | style: " ", 22 | base: 0 23 | } 24 | } 25 | }; 26 | -------------------------------------------------------------------------------- /build/paths.js: -------------------------------------------------------------------------------- 1 | var path = require('path'); 2 | 3 | var appRoot = 'src/'; 4 | 5 | module.exports = { 6 | root: appRoot, 7 | source: appRoot + '**/*.js', 8 | html: appRoot + '**/*.html', 9 | style: 'styles/**/*.css', 10 | output: 'dist/', 11 | doc:'./doc', 12 | e2eSpecsSrc: 'test/e2e/src/*.js', 13 | e2eSpecsDist: 'test/e2e/dist/' 14 | }; 15 | -------------------------------------------------------------------------------- /build/tasks/build.js: -------------------------------------------------------------------------------- 1 | var gulp = require('gulp'); 2 | var runSequence = require('run-sequence'); 3 | var changed = require('gulp-changed'); 4 | var plumber = require('gulp-plumber'); 5 | var to5 = require('gulp-babel'); 6 | var sourcemaps = require('gulp-sourcemaps'); 7 | var paths = require('../paths'); 8 | var compilerOptions = require('../babel-options'); 9 | var assign = Object.assign || require('object.assign'); 10 | 11 | // transpiles changed es6 files to SystemJS format 12 | // the plumber() call prevents 'pipe breaking' caused 13 | // by errors from other gulp plugins 14 | // https://www.npmjs.com/package/gulp-plumber 15 | gulp.task('build-system', function () { 16 | return gulp.src(paths.source) 17 | .pipe(plumber()) 18 | .pipe(changed(paths.output, {extension: '.js'})) 19 | .pipe(sourcemaps.init()) 20 | .pipe(to5(assign({}, compilerOptions, {modules:'system'}))) 21 | .pipe(sourcemaps.write({includeContent: false, sourceRoot: '/' + paths.root })) 22 | .pipe(gulp.dest(paths.output)); 23 | }); 24 | 25 | // copies changed html files to the output directory 26 | gulp.task('build-html', function () { 27 | return gulp.src(paths.html) 28 | .pipe(changed(paths.output, {extension: '.html'})) 29 | .pipe(gulp.dest(paths.output)); 30 | }); 31 | 32 | // this task calls the clean task (located 33 | // in ./clean.js), then runs the build-system 34 | // and build-html tasks in parallel 35 | // https://www.npmjs.com/package/gulp-run-sequence 36 | gulp.task('build', function(callback) { 37 | return runSequence( 38 | 'clean', 39 | ['build-system', 'build-html'], 40 | callback 41 | ); 42 | }); 43 | -------------------------------------------------------------------------------- /build/tasks/clean.js: -------------------------------------------------------------------------------- 1 | var gulp = require('gulp'); 2 | var paths = require('../paths'); 3 | var del = require('del'); 4 | var vinylPaths = require('vinyl-paths'); 5 | 6 | // deletes all files in the output path 7 | gulp.task('clean', function() { 8 | return gulp.src([paths.output]) 9 | .pipe(vinylPaths(del)); 10 | }); 11 | -------------------------------------------------------------------------------- /build/tasks/dev.js: -------------------------------------------------------------------------------- 1 | var gulp = require('gulp'); 2 | var tools = require('aurelia-tools'); 3 | 4 | // source code for the tasks called in this file 5 | // is located at: https://github.com/aurelia/tools/blob/master/src/dev.js 6 | 7 | // updates dependencies in this folder 8 | // from folders in the parent directory 9 | gulp.task('update-own-deps', function(){ 10 | tools.updateOwnDependenciesFromLocalRepositories(); 11 | }); 12 | 13 | // quickly pulls in all of the aurelia 14 | // github repos, placing them up one directory 15 | // from where the command is executed, 16 | // then runs `npm install` 17 | // and `gulp build` for each repo 18 | gulp.task('build-dev-env', function () { 19 | tools.buildDevEnv(); 20 | }); 21 | -------------------------------------------------------------------------------- /build/tasks/doc.js: -------------------------------------------------------------------------------- 1 | var gulp = require('gulp'); 2 | var tools = require('aurelia-tools'); 3 | var paths = require('../paths'); 4 | var yuidoc = require('gulp-yuidoc'); 5 | 6 | // uses yui to generate documentation to doc/api.json 7 | gulp.task('doc-generate', function(){ 8 | return gulp.src(paths.source) 9 | .pipe(yuidoc.parser(null, 'api.json')) 10 | .pipe(gulp.dest(paths.doc)); 11 | }); 12 | 13 | // takes output of doc-generate task 14 | // and cleans it up for use with aurelia 15 | // documentation app 16 | gulp.task('doc', ['doc-generate'], function(){ 17 | tools.transformAPIModel(paths.doc); 18 | }); 19 | -------------------------------------------------------------------------------- /build/tasks/e2e.js: -------------------------------------------------------------------------------- 1 | var gulp = require('gulp'); 2 | var paths = require('../paths'); 3 | var to5 = require('gulp-babel'); 4 | var plumber = require('gulp-plumber'); 5 | var gulp = require('gulp'); 6 | var webdriver_update = require('gulp-protractor').webdriver_update; 7 | var protractor = require("gulp-protractor").protractor; 8 | 9 | // for full documentation of gulp-protractor, 10 | // please check https://github.com/mllrsohn/gulp-protractor 11 | gulp.task('webdriver_update', webdriver_update); 12 | 13 | // transpiles files in 14 | // /test/e2e/src/ from es6 to es5 15 | // then copies them to test/e2e/dist/ 16 | gulp.task('build-e2e', function () { 17 | return gulp.src(paths.e2eSpecsSrc) 18 | .pipe(plumber()) 19 | .pipe(to5()) 20 | .pipe(gulp.dest(paths.e2eSpecsDist)); 21 | }); 22 | 23 | // runs build-e2e task 24 | // then runs end to end tasks 25 | // using Protractor: http://angular.github.io/protractor/ 26 | gulp.task('e2e', ['webdriver_update', 'build-e2e'], function(cb) { 27 | return gulp.src(paths.e2eSpecsDist + "/*.js") 28 | .pipe(protractor({ 29 | configFile: "protractor.conf.js", 30 | args: ['--baseUrl', 'http://127.0.0.1:9000'] 31 | })) 32 | .on('error', function(e) { throw e; }); 33 | }); 34 | -------------------------------------------------------------------------------- /build/tasks/lint.js: -------------------------------------------------------------------------------- 1 | var gulp = require('gulp'); 2 | var paths = require('../paths'); 3 | var jshint = require('gulp-jshint'); 4 | var stylish = require('jshint-stylish'); 5 | 6 | // runs jshint on all .js files 7 | gulp.task('lint', function() { 8 | return gulp.src(paths.source) 9 | .pipe(jshint()) 10 | .pipe(jshint.reporter(stylish)); 11 | }); 12 | -------------------------------------------------------------------------------- /build/tasks/prepare-release.js: -------------------------------------------------------------------------------- 1 | var gulp = require('gulp'); 2 | var runSequence = require('run-sequence'); 3 | var paths = require('../paths'); 4 | var changelog = require('conventional-changelog'); 5 | var fs = require('fs'); 6 | var bump = require('gulp-bump'); 7 | var args = require('../args'); 8 | 9 | // utilizes the bump plugin to bump the 10 | // semver for the repo 11 | gulp.task('bump-version', function(){ 12 | return gulp.src(['./package.json']) 13 | .pipe(bump({type:args.bump })) //major|minor|patch|prerelease 14 | .pipe(gulp.dest('./')); 15 | }); 16 | 17 | // generates the CHANGELOG.md file based on commit 18 | // from git commit messages 19 | gulp.task('changelog', function(callback) { 20 | var pkg = JSON.parse(fs.readFileSync('./package.json', 'utf-8')); 21 | 22 | return changelog({ 23 | repository: pkg.repository.url, 24 | version: pkg.version, 25 | file: paths.doc + '/CHANGELOG.md' 26 | }, function(err, log) { 27 | fs.writeFileSync(paths.doc + '/CHANGELOG.md', log); 28 | }); 29 | }); 30 | 31 | // calls the listed sequence of tasks in order 32 | gulp.task('prepare-release', function(callback){ 33 | return runSequence( 34 | 'build', 35 | 'lint', 36 | 'bump-version', 37 | 'doc', 38 | 'changelog', 39 | callback 40 | ); 41 | }); 42 | -------------------------------------------------------------------------------- /build/tasks/serve.js: -------------------------------------------------------------------------------- 1 | var gulp = require('gulp'); 2 | var browserSync = require('browser-sync'); 3 | 4 | // this task utilizes the browsersync plugin 5 | // to create a dev server instance 6 | // at http://localhost:9000 7 | gulp.task('serve', ['build'], function(done) { 8 | browserSync({ 9 | open: false, 10 | port: 9000, 11 | server: { 12 | baseDir: ['.'], 13 | middleware: function (req, res, next) { 14 | res.setHeader('Access-Control-Allow-Origin', '*'); 15 | next(); 16 | } 17 | } 18 | }, done); 19 | }); 20 | -------------------------------------------------------------------------------- /build/tasks/test.js: -------------------------------------------------------------------------------- 1 | var gulp = require('gulp'); 2 | var karma = require('karma').server; 3 | 4 | /** 5 | * Run test once and exit 6 | */ 7 | gulp.task('test', function (done) { 8 | karma.start({ 9 | configFile: __dirname + '/../../karma.conf.js', 10 | singleRun: true 11 | }, function(e) { 12 | done(); 13 | }); 14 | }); 15 | 16 | /** 17 | * Watch for file changes and re-run tests on each change 18 | */ 19 | gulp.task('tdd', function (done) { 20 | karma.start({ 21 | configFile: __dirname + '/../../karma.conf.js' 22 | }, function(e) { 23 | done(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /build/tasks/watch.js: -------------------------------------------------------------------------------- 1 | var gulp = require('gulp'); 2 | var paths = require('../paths'); 3 | var browserSync = require('browser-sync'); 4 | 5 | // outputs changes to files to the console 6 | function reportChange(event){ 7 | console.log('File ' + event.path + ' was ' + event.type + ', running tasks...'); 8 | } 9 | 10 | // this task wil watch for changes 11 | // to js, html, and css files and call the 12 | // reportChange method. Also, by depending on the 13 | // serve task, it will instantiate a browserSync session 14 | gulp.task('watch', ['serve'], function() { 15 | gulp.watch(paths.source, ['build-system', browserSync.reload]).on('change', reportChange); 16 | gulp.watch(paths.html, ['build-html', browserSync.reload]).on('change', reportChange); 17 | gulp.watch(paths.style, browserSync.reload).on('change', reportChange); 18 | }); 19 | -------------------------------------------------------------------------------- /config.js: -------------------------------------------------------------------------------- 1 | System.config({ 2 | "paths": { 3 | "*": "dist/*.js", 4 | "github:*": "jspm_packages/github/*.js", 5 | "npm:*": "jspm_packages/npm/*.js", 6 | "aurelia-skeleton-navigation/*": "dist/*.js" 7 | } 8 | }); 9 | 10 | System.config({ 11 | "map": { 12 | "aurelia-bootstrapper": "github:aurelia/bootstrapper@0.10.0", 13 | "aurelia-dependency-injection": "github:aurelia/dependency-injection@0.5.0", 14 | "aurelia-framework": "github:aurelia/framework@0.9.0", 15 | "aurelia-http-client": "github:aurelia/http-client@0.6.0", 16 | "aurelia-router": "github:aurelia/router@0.6.0", 17 | "bootstrap": "github:twbs/bootstrap@3.3.2", 18 | "font-awesome": "npm:font-awesome@4.3.0", 19 | "github:aurelia/binding@0.4.0": { 20 | "aurelia-dependency-injection": "github:aurelia/dependency-injection@0.5.0", 21 | "aurelia-metadata": "github:aurelia/metadata@0.3.4", 22 | "aurelia-task-queue": "github:aurelia/task-queue@0.2.5" 23 | }, 24 | "github:aurelia/bootstrapper@0.10.0": { 25 | "aurelia-event-aggregator": "github:aurelia/event-aggregator@0.2.4", 26 | "aurelia-framework": "github:aurelia/framework@0.9.0", 27 | "aurelia-history": "github:aurelia/history@0.2.4", 28 | "aurelia-history-browser": "github:aurelia/history-browser@0.2.5", 29 | "aurelia-loader-default": "github:aurelia/loader-default@0.5.0", 30 | "aurelia-logging-console": "github:aurelia/logging-console@0.2.4", 31 | "aurelia-router": "github:aurelia/router@0.6.0", 32 | "aurelia-templating": "github:aurelia/templating@0.9.0", 33 | "aurelia-templating-binding": "github:aurelia/templating-binding@0.9.0", 34 | "aurelia-templating-resources": "github:aurelia/templating-resources@0.9.1", 35 | "aurelia-templating-router": "github:aurelia/templating-router@0.10.0" 36 | }, 37 | "github:aurelia/dependency-injection@0.5.0": { 38 | "aurelia-logging": "github:aurelia/logging@0.2.6", 39 | "aurelia-metadata": "github:aurelia/metadata@0.3.4", 40 | "core-js": "npm:core-js@0.4.10" 41 | }, 42 | "github:aurelia/framework@0.9.0": { 43 | "aurelia-binding": "github:aurelia/binding@0.4.0", 44 | "aurelia-dependency-injection": "github:aurelia/dependency-injection@0.5.0", 45 | "aurelia-loader": "github:aurelia/loader@0.4.0", 46 | "aurelia-logging": "github:aurelia/logging@0.2.6", 47 | "aurelia-metadata": "github:aurelia/metadata@0.3.4", 48 | "aurelia-path": "github:aurelia/path@0.4.6", 49 | "aurelia-task-queue": "github:aurelia/task-queue@0.2.5", 50 | "aurelia-templating": "github:aurelia/templating@0.9.0" 51 | }, 52 | "github:aurelia/history-browser@0.2.5": { 53 | "aurelia-history": "github:aurelia/history@0.2.4", 54 | "core-js": "npm:core-js@0.4.10" 55 | }, 56 | "github:aurelia/http-client@0.6.0": { 57 | "aurelia-path": "github:aurelia/path@0.4.6", 58 | "core-js": "npm:core-js@0.4.10" 59 | }, 60 | "github:aurelia/loader-default@0.5.0": { 61 | "aurelia-loader": "github:aurelia/loader@0.4.0", 62 | "aurelia-metadata": "github:aurelia/metadata@0.3.4" 63 | }, 64 | "github:aurelia/loader@0.4.0": { 65 | "aurelia-html-template-element": "github:aurelia/html-template-element@0.1.3", 66 | "aurelia-path": "github:aurelia/path@0.4.6", 67 | "core-js": "npm:core-js@0.4.10", 68 | "webcomponentsjs": "github:webcomponents/webcomponentsjs@0.5.5" 69 | }, 70 | "github:aurelia/router@0.6.0": { 71 | "aurelia-dependency-injection": "github:aurelia/dependency-injection@0.5.0", 72 | "aurelia-event-aggregator": "github:aurelia/event-aggregator@0.2.4", 73 | "aurelia-history": "github:aurelia/history@0.2.4", 74 | "aurelia-path": "github:aurelia/path@0.4.6", 75 | "aurelia-route-recognizer": "github:aurelia/route-recognizer@0.2.4", 76 | "core-js": "npm:core-js@0.4.10" 77 | }, 78 | "github:aurelia/templating-binding@0.9.0": { 79 | "aurelia-binding": "github:aurelia/binding@0.4.0", 80 | "aurelia-logging": "github:aurelia/logging@0.2.6", 81 | "aurelia-templating": "github:aurelia/templating@0.9.0" 82 | }, 83 | "github:aurelia/templating-resources@0.9.1": { 84 | "aurelia-binding": "github:aurelia/binding@0.4.0", 85 | "aurelia-dependency-injection": "github:aurelia/dependency-injection@0.5.0", 86 | "aurelia-logging": "github:aurelia/logging@0.2.6", 87 | "aurelia-templating": "github:aurelia/templating@0.9.0", 88 | "core-js": "npm:core-js@0.4.10" 89 | }, 90 | "github:aurelia/templating-router@0.10.0": { 91 | "aurelia-dependency-injection": "github:aurelia/dependency-injection@0.5.0", 92 | "aurelia-metadata": "github:aurelia/metadata@0.3.4", 93 | "aurelia-path": "github:aurelia/path@0.4.6", 94 | "aurelia-router": "github:aurelia/router@0.6.0", 95 | "aurelia-templating": "github:aurelia/templating@0.9.0" 96 | }, 97 | "github:aurelia/templating@0.9.0": { 98 | "aurelia-binding": "github:aurelia/binding@0.4.0", 99 | "aurelia-dependency-injection": "github:aurelia/dependency-injection@0.5.0", 100 | "aurelia-html-template-element": "github:aurelia/html-template-element@0.1.3", 101 | "aurelia-loader": "github:aurelia/loader@0.4.0", 102 | "aurelia-logging": "github:aurelia/logging@0.2.6", 103 | "aurelia-metadata": "github:aurelia/metadata@0.3.4", 104 | "aurelia-path": "github:aurelia/path@0.4.6", 105 | "aurelia-task-queue": "github:aurelia/task-queue@0.2.5", 106 | "core-js": "npm:core-js@0.4.10" 107 | }, 108 | "github:jspm/nodelibs-assert@0.1.0": { 109 | "assert": "npm:assert@1.3.0" 110 | }, 111 | "github:jspm/nodelibs-buffer@0.1.0": { 112 | "buffer": "npm:buffer@3.0.3" 113 | }, 114 | "github:jspm/nodelibs-events@0.1.0": { 115 | "events-browserify": "npm:events-browserify@0.0.1" 116 | }, 117 | "github:jspm/nodelibs-http@1.7.0": { 118 | "Base64": "npm:Base64@0.2.1", 119 | "events": "github:jspm/nodelibs-events@0.1.0", 120 | "inherits": "npm:inherits@2.0.1", 121 | "stream": "github:jspm/nodelibs-stream@0.1.0", 122 | "url": "github:jspm/nodelibs-url@0.1.0", 123 | "util": "github:jspm/nodelibs-util@0.1.0" 124 | }, 125 | "github:jspm/nodelibs-https@0.1.0": { 126 | "https-browserify": "npm:https-browserify@0.0.0" 127 | }, 128 | "github:jspm/nodelibs-os@0.1.0": { 129 | "os-browserify": "npm:os-browserify@0.1.2" 130 | }, 131 | "github:jspm/nodelibs-path@0.1.0": { 132 | "path-browserify": "npm:path-browserify@0.0.0" 133 | }, 134 | "github:jspm/nodelibs-process@0.1.1": { 135 | "process": "npm:process@0.10.1" 136 | }, 137 | "github:jspm/nodelibs-querystring@0.1.0": { 138 | "querystring": "npm:querystring@0.2.0" 139 | }, 140 | "github:jspm/nodelibs-stream@0.1.0": { 141 | "stream-browserify": "npm:stream-browserify@1.0.0" 142 | }, 143 | "github:jspm/nodelibs-url@0.1.0": { 144 | "url": "npm:url@0.10.2" 145 | }, 146 | "github:jspm/nodelibs-util@0.1.0": { 147 | "util": "npm:util@0.10.3" 148 | }, 149 | "github:systemjs/plugin-css@0.1.6": { 150 | "clean-css": "npm:clean-css@3.0.10", 151 | "fs": "github:jspm/nodelibs-fs@0.1.1", 152 | "path": "github:jspm/nodelibs-path@0.1.0" 153 | }, 154 | "github:twbs/bootstrap@3.3.2": { 155 | "css": "github:systemjs/plugin-css@0.1.6", 156 | "jquery": "github:components/jquery@2.1.3" 157 | }, 158 | "npm:amdefine@0.1.0": { 159 | "fs": "github:jspm/nodelibs-fs@0.1.1", 160 | "module": "github:jspm/nodelibs-module@0.1.0", 161 | "path": "github:jspm/nodelibs-path@0.1.0", 162 | "process": "github:jspm/nodelibs-process@0.1.1" 163 | }, 164 | "npm:assert@1.3.0": { 165 | "util": "npm:util@0.10.3" 166 | }, 167 | "npm:buffer@3.0.3": { 168 | "base64-js": "npm:base64-js@0.0.8", 169 | "ieee754": "npm:ieee754@1.1.4", 170 | "is-array": "npm:is-array@1.0.1" 171 | }, 172 | "npm:clean-css@3.0.10": { 173 | "buffer": "github:jspm/nodelibs-buffer@0.1.0", 174 | "commander": "npm:commander@2.5.1", 175 | "fs": "github:jspm/nodelibs-fs@0.1.1", 176 | "http": "github:jspm/nodelibs-http@1.7.0", 177 | "https": "github:jspm/nodelibs-https@0.1.0", 178 | "os": "github:jspm/nodelibs-os@0.1.0", 179 | "path": "github:jspm/nodelibs-path@0.1.0", 180 | "process": "github:jspm/nodelibs-process@0.1.1", 181 | "source-map": "npm:source-map@0.1.43", 182 | "url": "github:jspm/nodelibs-url@0.1.0", 183 | "util": "github:jspm/nodelibs-util@0.1.0" 184 | }, 185 | "npm:commander@2.5.1": { 186 | "child_process": "github:jspm/nodelibs-child_process@0.1.0", 187 | "events": "github:jspm/nodelibs-events@0.1.0", 188 | "path": "github:jspm/nodelibs-path@0.1.0", 189 | "process": "github:jspm/nodelibs-process@0.1.1" 190 | }, 191 | "npm:core-js@0.4.10": { 192 | "process": "github:jspm/nodelibs-process@0.1.1" 193 | }, 194 | "npm:core-util-is@1.0.1": { 195 | "buffer": "github:jspm/nodelibs-buffer@0.1.0" 196 | }, 197 | "npm:events-browserify@0.0.1": { 198 | "process": "github:jspm/nodelibs-process@0.1.1" 199 | }, 200 | "npm:https-browserify@0.0.0": { 201 | "http": "github:jspm/nodelibs-http@1.7.0" 202 | }, 203 | "npm:inherits@2.0.1": { 204 | "util": "github:jspm/nodelibs-util@0.1.0" 205 | }, 206 | "npm:os-browserify@0.1.2": { 207 | "os": "github:jspm/nodelibs-os@0.1.0" 208 | }, 209 | "npm:path-browserify@0.0.0": { 210 | "process": "github:jspm/nodelibs-process@0.1.1" 211 | }, 212 | "npm:punycode@1.3.2": { 213 | "process": "github:jspm/nodelibs-process@0.1.1" 214 | }, 215 | "npm:readable-stream@1.1.13": { 216 | "buffer": "github:jspm/nodelibs-buffer@0.1.0", 217 | "core-util-is": "npm:core-util-is@1.0.1", 218 | "events": "github:jspm/nodelibs-events@0.1.0", 219 | "inherits": "npm:inherits@2.0.1", 220 | "isarray": "npm:isarray@0.0.1", 221 | "process": "github:jspm/nodelibs-process@0.1.1", 222 | "stream": "npm:stream-browserify@1.0.0", 223 | "string_decoder": "npm:string_decoder@0.10.31", 224 | "util": "github:jspm/nodelibs-util@0.1.0" 225 | }, 226 | "npm:source-map@0.1.43": { 227 | "amdefine": "npm:amdefine@0.1.0", 228 | "fs": "github:jspm/nodelibs-fs@0.1.1", 229 | "path": "github:jspm/nodelibs-path@0.1.0", 230 | "process": "github:jspm/nodelibs-process@0.1.1" 231 | }, 232 | "npm:stream-browserify@1.0.0": { 233 | "events": "github:jspm/nodelibs-events@0.1.0", 234 | "inherits": "npm:inherits@2.0.1", 235 | "readable-stream": "npm:readable-stream@1.1.13" 236 | }, 237 | "npm:string_decoder@0.10.31": { 238 | "buffer": "github:jspm/nodelibs-buffer@0.1.0" 239 | }, 240 | "npm:url@0.10.2": { 241 | "assert": "github:jspm/nodelibs-assert@0.1.0", 242 | "punycode": "npm:punycode@1.3.2", 243 | "querystring": "github:jspm/nodelibs-querystring@0.1.0", 244 | "util": "github:jspm/nodelibs-util@0.1.0" 245 | }, 246 | "npm:util@0.10.3": { 247 | "inherits": "npm:inherits@2.0.1", 248 | "process": "github:jspm/nodelibs-process@0.1.1" 249 | } 250 | } 251 | }); 252 | -------------------------------------------------------------------------------- /dist/app.html: -------------------------------------------------------------------------------- 1 | 10 | -------------------------------------------------------------------------------- /dist/app.js: -------------------------------------------------------------------------------- 1 | System.register(["aurelia-router", "bootstrap"], function (_export) { 2 | var Router, bootstrap, _prototypeProperties, _classCallCheck, App; 3 | 4 | return { 5 | setters: [function (_aureliaRouter) { 6 | Router = _aureliaRouter.Router; 7 | }, function (_bootstrap) { 8 | bootstrap = _bootstrap["default"]; 9 | }], 10 | execute: function () { 11 | "use strict"; 12 | 13 | _prototypeProperties = function (child, staticProps, instanceProps) { if (staticProps) Object.defineProperties(child, staticProps); if (instanceProps) Object.defineProperties(child.prototype, instanceProps); }; 14 | 15 | _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }; 16 | 17 | App = _export("App", (function () { 18 | function App(router) { 19 | _classCallCheck(this, App); 20 | 21 | this.router = router; 22 | this.router.configure(function (config) { 23 | config.title = "Aurelia"; 24 | config.map([{ route: ["", "welcome"], moduleId: "./welcome", nav: true, title: "Welcome" }, { route: "flickr", moduleId: "./flickr", nav: true }, { route: "child-router", moduleId: "./child-router", nav: true, title: "Child Router" }]); 25 | }); 26 | } 27 | 28 | _prototypeProperties(App, { 29 | inject: { 30 | value: function inject() { 31 | return [Router]; 32 | }, 33 | writable: true, 34 | configurable: true 35 | } 36 | }); 37 | 38 | return App; 39 | })()); 40 | } 41 | }; 42 | }); 43 | //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImFwcC5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO01BQVEsTUFBTSxFQUNQLFNBQVMseUNBRUgsR0FBRzs7OztBQUhSLFlBQU0sa0JBQU4sTUFBTTs7QUFDUCxlQUFTOzs7Ozs7Ozs7QUFFSCxTQUFHO0FBRUgsaUJBRkEsR0FBRyxDQUVGLE1BQU07Z0NBRlAsR0FBRzs7QUFHWixjQUFJLENBQUMsTUFBTSxHQUFHLE1BQU0sQ0FBQztBQUNyQixjQUFJLENBQUMsTUFBTSxDQUFDLFNBQVMsQ0FBQyxVQUFBLE1BQU0sRUFBSTtBQUM5QixrQkFBTSxDQUFDLEtBQUssR0FBRyxTQUFTLENBQUM7QUFDekIsa0JBQU0sQ0FBQyxHQUFHLENBQUMsQ0FDVCxFQUFFLEtBQUssRUFBRSxDQUFDLEVBQUUsRUFBQyxTQUFTLENBQUMsRUFBRyxRQUFRLEVBQUUsV0FBVyxFQUFPLEdBQUcsRUFBRSxJQUFJLEVBQUUsS0FBSyxFQUFDLFNBQVMsRUFBRSxFQUNsRixFQUFFLEtBQUssRUFBRSxRQUFRLEVBQVMsUUFBUSxFQUFFLFVBQVUsRUFBUSxHQUFHLEVBQUUsSUFBSSxFQUFFLEVBQ2pFLEVBQUUsS0FBSyxFQUFFLGNBQWMsRUFBRyxRQUFRLEVBQUUsZ0JBQWdCLEVBQUUsR0FBRyxFQUFFLElBQUksRUFBRSxLQUFLLEVBQUMsY0FBYyxFQUFFLENBQ3hGLENBQUMsQ0FBQztXQUNKLENBQUMsQ0FBQztTQUNKOzs2QkFaVSxHQUFHO0FBQ1AsZ0JBQU07bUJBQUEsa0JBQUc7QUFBRSxxQkFBTyxDQUFDLE1BQU0sQ0FBQyxDQUFDO2FBQUU7Ozs7OztlQUR6QixHQUFHIiwiZmlsZSI6ImFwcC5qcyIsInNvdXJjZVJvb3QiOiIvc3JjLyJ9 -------------------------------------------------------------------------------- /dist/child-router.html: -------------------------------------------------------------------------------- 1 | 18 | -------------------------------------------------------------------------------- /dist/child-router.js: -------------------------------------------------------------------------------- 1 | System.register(["aurelia-router"], function (_export) { 2 | var Router, _prototypeProperties, _classCallCheck, ChildRouter; 3 | 4 | return { 5 | setters: [function (_aureliaRouter) { 6 | Router = _aureliaRouter.Router; 7 | }], 8 | execute: function () { 9 | "use strict"; 10 | 11 | _prototypeProperties = function (child, staticProps, instanceProps) { if (staticProps) Object.defineProperties(child, staticProps); if (instanceProps) Object.defineProperties(child.prototype, instanceProps); }; 12 | 13 | _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }; 14 | 15 | ChildRouter = _export("ChildRouter", (function () { 16 | function ChildRouter(router) { 17 | _classCallCheck(this, ChildRouter); 18 | 19 | this.heading = "Child Router"; 20 | this.router = router; 21 | router.configure(function (config) { 22 | config.map([{ route: ["", "welcome"], moduleId: "./welcome", nav: true, title: "Welcome" }, { route: "flickr", moduleId: "./flickr", nav: true }, { route: "child-router", moduleId: "./child-router", nav: true, title: "Child Router" }]); 23 | }); 24 | } 25 | 26 | _prototypeProperties(ChildRouter, { 27 | inject: { 28 | value: function inject() { 29 | return [Router]; 30 | }, 31 | writable: true, 32 | configurable: true 33 | } 34 | }); 35 | 36 | return ChildRouter; 37 | })()); 38 | } 39 | }; 40 | }); 41 | //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImNoaWxkLXJvdXRlci5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO01BQVEsTUFBTSx5Q0FFRCxXQUFXOzs7O0FBRmhCLFlBQU0sa0JBQU4sTUFBTTs7Ozs7Ozs7O0FBRUQsaUJBQVc7QUFFWCxpQkFGQSxXQUFXLENBRVYsTUFBTTtnQ0FGUCxXQUFXOztBQUdwQixjQUFJLENBQUMsT0FBTyxHQUFHLGNBQWMsQ0FBQztBQUM5QixjQUFJLENBQUMsTUFBTSxHQUFHLE1BQU0sQ0FBQztBQUNyQixnQkFBTSxDQUFDLFNBQVMsQ0FBQyxVQUFBLE1BQU0sRUFBSTtBQUN6QixrQkFBTSxDQUFDLEdBQUcsQ0FBQyxDQUNULEVBQUUsS0FBSyxFQUFFLENBQUMsRUFBRSxFQUFDLFNBQVMsQ0FBQyxFQUFHLFFBQVEsRUFBRSxXQUFXLEVBQU8sR0FBRyxFQUFFLElBQUksRUFBRSxLQUFLLEVBQUMsU0FBUyxFQUFFLEVBQ2xGLEVBQUUsS0FBSyxFQUFFLFFBQVEsRUFBUyxRQUFRLEVBQUUsVUFBVSxFQUFRLEdBQUcsRUFBRSxJQUFJLEVBQUUsRUFDakUsRUFBRSxLQUFLLEVBQUUsY0FBYyxFQUFHLFFBQVEsRUFBRSxnQkFBZ0IsRUFBRSxHQUFHLEVBQUUsSUFBSSxFQUFFLEtBQUssRUFBQyxjQUFjLEVBQUUsQ0FDeEYsQ0FBQyxDQUFDO1dBQ0osQ0FBQyxDQUFDO1NBQ0o7OzZCQVpVLFdBQVc7QUFDZixnQkFBTTttQkFBQSxrQkFBRztBQUFFLHFCQUFPLENBQUMsTUFBTSxDQUFDLENBQUM7YUFBRTs7Ozs7O2VBRHpCLFdBQVciLCJmaWxlIjoiY2hpbGQtcm91dGVyLmpzIiwic291cmNlUm9vdCI6Ii9zcmMvIn0= -------------------------------------------------------------------------------- /dist/flickr.html: -------------------------------------------------------------------------------- 1 | 13 | -------------------------------------------------------------------------------- /dist/flickr.js: -------------------------------------------------------------------------------- 1 | System.register(["aurelia-http-client"], function (_export) { 2 | var HttpClient, _prototypeProperties, _classCallCheck, url, Flickr; 3 | 4 | return { 5 | setters: [function (_aureliaHttpClient) { 6 | HttpClient = _aureliaHttpClient.HttpClient; 7 | }], 8 | execute: function () { 9 | "use strict"; 10 | 11 | _prototypeProperties = function (child, staticProps, instanceProps) { if (staticProps) Object.defineProperties(child, staticProps); if (instanceProps) Object.defineProperties(child.prototype, instanceProps); }; 12 | 13 | _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }; 14 | 15 | url = "http://api.flickr.com/services/feeds/photos_public.gne?tags=rainier&tagmode=any&format=json"; 16 | Flickr = _export("Flickr", (function () { 17 | function Flickr(http) { 18 | _classCallCheck(this, Flickr); 19 | 20 | this.heading = "Flickr"; 21 | this.images = []; 22 | this.http = http; 23 | } 24 | 25 | _prototypeProperties(Flickr, { 26 | inject: { 27 | value: function inject() { 28 | return [HttpClient]; 29 | }, 30 | writable: true, 31 | configurable: true 32 | } 33 | }, { 34 | activate: { 35 | value: function activate() { 36 | var _this = this; 37 | 38 | return this.http.jsonp(url).then(function (response) { 39 | _this.images = response.content.items; 40 | }); 41 | }, 42 | writable: true, 43 | configurable: true 44 | }, 45 | canDeactivate: { 46 | value: function canDeactivate() { 47 | return confirm("Are you sure you want to leave?"); 48 | }, 49 | writable: true, 50 | configurable: true 51 | } 52 | }); 53 | 54 | return Flickr; 55 | })()); 56 | } 57 | }; 58 | }); 59 | //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImZsaWNrci5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO01BQVEsVUFBVSx5Q0FFZCxHQUFHLEVBRU0sTUFBTTs7OztBQUpYLGdCQUFVLHNCQUFWLFVBQVU7Ozs7Ozs7OztBQUVkLFNBQUcsR0FBRyw2RkFBNkY7QUFFMUYsWUFBTTtBQUVOLGlCQUZBLE1BQU0sQ0FFTCxJQUFJO2dDQUZMLE1BQU07O0FBR2YsY0FBSSxDQUFDLE9BQU8sR0FBRyxRQUFRLENBQUM7QUFDeEIsY0FBSSxDQUFDLE1BQU0sR0FBRyxFQUFFLENBQUM7QUFDakIsY0FBSSxDQUFDLElBQUksR0FBRyxJQUFJLENBQUM7U0FDbEI7OzZCQU5VLE1BQU07QUFDVixnQkFBTTttQkFBQSxrQkFBRztBQUFFLHFCQUFPLENBQUMsVUFBVSxDQUFDLENBQUM7YUFBRTs7Ozs7QUFPeEMsa0JBQVE7bUJBQUEsb0JBQUU7OztBQUNSLHFCQUFPLElBQUksQ0FBQyxJQUFJLENBQUMsS0FBSyxDQUFDLEdBQUcsQ0FBQyxDQUFDLElBQUksQ0FBQyxVQUFBLFFBQVEsRUFBSTtBQUMzQyxzQkFBSyxNQUFNLEdBQUcsUUFBUSxDQUFDLE9BQU8sQ0FBQyxLQUFLLENBQUM7ZUFDdEMsQ0FBQyxDQUFDO2FBQ0o7Ozs7QUFFRCx1QkFBYTttQkFBQSx5QkFBRTtBQUNiLHFCQUFPLE9BQU8sQ0FBQyxpQ0FBaUMsQ0FBQyxDQUFDO2FBQ25EOzs7Ozs7ZUFoQlUsTUFBTSIsImZpbGUiOiJmbGlja3IuanMiLCJzb3VyY2VSb290IjoiL3NyYy8ifQ== -------------------------------------------------------------------------------- /dist/nav-bar.html: -------------------------------------------------------------------------------- 1 | 31 | -------------------------------------------------------------------------------- /dist/nav-bar.js: -------------------------------------------------------------------------------- 1 | System.register(["aurelia-framework"], function (_export) { 2 | var Behavior, _prototypeProperties, _classCallCheck, NavBar; 3 | 4 | return { 5 | setters: [function (_aureliaFramework) { 6 | Behavior = _aureliaFramework.Behavior; 7 | }], 8 | execute: function () { 9 | "use strict"; 10 | 11 | _prototypeProperties = function (child, staticProps, instanceProps) { if (staticProps) Object.defineProperties(child, staticProps); if (instanceProps) Object.defineProperties(child.prototype, instanceProps); }; 12 | 13 | _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }; 14 | 15 | NavBar = _export("NavBar", (function () { 16 | function NavBar() { 17 | _classCallCheck(this, NavBar); 18 | } 19 | 20 | _prototypeProperties(NavBar, { 21 | metadata: { 22 | value: function metadata() { 23 | return Behavior.withProperty("router"); 24 | }, 25 | writable: true, 26 | configurable: true 27 | } 28 | }); 29 | 30 | return NavBar; 31 | })()); 32 | } 33 | }; 34 | }); 35 | //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5hdi1iYXIuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtNQUFRLFFBQVEseUNBRUgsTUFBTTs7OztBQUZYLGNBQVEscUJBQVIsUUFBUTs7Ozs7Ozs7O0FBRUgsWUFBTTtpQkFBTixNQUFNO2dDQUFOLE1BQU07Ozs2QkFBTixNQUFNO0FBQ1Ysa0JBQVE7bUJBQUEsb0JBQUU7QUFBRSxxQkFBTyxRQUFRLENBQUMsWUFBWSxDQUFDLFFBQVEsQ0FBQyxDQUFDO2FBQUU7Ozs7OztlQURqRCxNQUFNIiwiZmlsZSI6Im5hdi1iYXIuanMiLCJzb3VyY2VSb290IjoiL3NyYy8ifQ== -------------------------------------------------------------------------------- /dist/welcome.html: -------------------------------------------------------------------------------- 1 | 22 | -------------------------------------------------------------------------------- /dist/welcome.js: -------------------------------------------------------------------------------- 1 | System.register([], function (_export) { 2 | var _prototypeProperties, _classCallCheck, Welcome, UpperValueConverter; 3 | 4 | return { 5 | setters: [], 6 | execute: function () { 7 | "use strict"; 8 | 9 | _prototypeProperties = function (child, staticProps, instanceProps) { if (staticProps) Object.defineProperties(child, staticProps); if (instanceProps) Object.defineProperties(child.prototype, instanceProps); }; 10 | 11 | _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }; 12 | 13 | Welcome = _export("Welcome", (function () { 14 | function Welcome() { 15 | _classCallCheck(this, Welcome); 16 | 17 | this.heading = "Welcome to the Aurelia Navigation App!"; 18 | this.firstName = "John"; 19 | this.lastName = "Doe"; 20 | } 21 | 22 | _prototypeProperties(Welcome, null, { 23 | fullName: { 24 | get: function () { 25 | return "" + this.firstName + " " + this.lastName; 26 | }, 27 | configurable: true 28 | }, 29 | welcome: { 30 | value: function welcome() { 31 | alert("Welcome, " + this.fullName + "!"); 32 | }, 33 | writable: true, 34 | configurable: true 35 | } 36 | }); 37 | 38 | return Welcome; 39 | })()); 40 | UpperValueConverter = _export("UpperValueConverter", (function () { 41 | function UpperValueConverter() { 42 | _classCallCheck(this, UpperValueConverter); 43 | } 44 | 45 | _prototypeProperties(UpperValueConverter, null, { 46 | toView: { 47 | value: function toView(value) { 48 | return value && value.toUpperCase(); 49 | }, 50 | writable: true, 51 | configurable: true 52 | } 53 | }); 54 | 55 | return UpperValueConverter; 56 | })()); 57 | } 58 | }; 59 | }); 60 | //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlbGNvbWUuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs2Q0FBYSxPQUFPLEVBZ0JQLG1CQUFtQjs7Ozs7Ozs7Ozs7QUFoQm5CLGFBQU87QUFDUCxpQkFEQSxPQUFPO2dDQUFQLE9BQU87O0FBRWhCLGNBQUksQ0FBQyxPQUFPLEdBQUcsd0NBQXdDLENBQUM7QUFDeEQsY0FBSSxDQUFDLFNBQVMsR0FBRyxNQUFNLENBQUM7QUFDeEIsY0FBSSxDQUFDLFFBQVEsR0FBRyxLQUFLLENBQUM7U0FDdkI7OzZCQUxVLE9BQU87QUFPZCxrQkFBUTtpQkFBQSxZQUFFO0FBQ1osMEJBQVUsSUFBSSxDQUFDLFNBQVMsU0FBSSxJQUFJLENBQUMsUUFBUSxDQUFHO2FBQzdDOzs7QUFFRCxpQkFBTzttQkFBQSxtQkFBRTtBQUNQLG1CQUFLLGVBQWEsSUFBSSxDQUFDLFFBQVEsT0FBSSxDQUFDO2FBQ3JDOzs7Ozs7ZUFiVSxPQUFPOztBQWdCUCx5QkFBbUI7aUJBQW5CLG1CQUFtQjtnQ0FBbkIsbUJBQW1COzs7NkJBQW5CLG1CQUFtQjtBQUM5QixnQkFBTTttQkFBQSxnQkFBQyxLQUFLLEVBQUM7QUFDWCxxQkFBTyxLQUFLLElBQUksS0FBSyxDQUFDLFdBQVcsRUFBRSxDQUFDO2FBQ3JDOzs7Ozs7ZUFIVSxtQkFBbUIiLCJmaWxlIjoid2VsY29tZS5qcyIsInNvdXJjZVJvb3QiOiIvc3JjLyJ9 -------------------------------------------------------------------------------- /doc/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ## 0.11.0 (2015-03-25) 2 | 3 | 4 | #### Bug Fixes 5 | 6 | * **all:** update to latest framework versions ([86378200](http://github.com/aurelia/skeleton-navigation/commit/8637820009f7bf4f4b2a08b2abaf2fae9bb2811d)) 7 | 8 | 9 | ### 0.10.2 (2015-02-28) 10 | 11 | 12 | #### Bug Fixes 13 | 14 | * **package:** update dependencies ([3a8cfc33](http://github.com/aurelia/skeleton-navigation/commit/3a8cfc33cb41e29d4199a94b43198cf62a3a1ceb)) 15 | 16 | 17 | ### 0.10.1 (2015-02-28) 18 | 19 | 20 | #### Bug Fixes 21 | 22 | * **child-router:** correct class name ([93f9bfc9](http://github.com/aurelia/skeleton-navigation/commit/93f9bfc9076a7e950d667d50c9ac75e9efb3e1f5)) 23 | * **e2e:** 24 | * remove iit in dist ([dd644b1f](http://github.com/aurelia/skeleton-navigation/commit/dd644b1f926fca5c0a59cf1a662fb246456aa9ae)) 25 | * remove iit ([340fc90d](http://github.com/aurelia/skeleton-navigation/commit/340fc90d3a558e6a5f1aed83f7d2c1080447bc33)) 26 | * **package:** update dependencies ([42b6ebbd](http://github.com/aurelia/skeleton-navigation/commit/42b6ebbd571f61d82ef7334b518dba4259559f2a)) 27 | 28 | 29 | #### Features 30 | 31 | * **e2e:** add protractor plugin, add waitMethods ([d24c5a0d](http://github.com/aurelia/skeleton-navigation/commit/d24c5a0d606c6da1c30cf54a56ca5d3e086749cb)) 32 | 33 | 34 | ## 0.10.0 (2015-02-12) 35 | 36 | 37 | #### Bug Fixes 38 | 39 | * **index:** properly load bootstrap ([c1735fdb](http://github.com/aurelia/skeleton-navigation/commit/c1735fdbd064e69567b90358dfcc5eff0fdeab37)) 40 | 41 | 42 | ### 0.9.5 (2015-02-06) 43 | 44 | 45 | #### Bug Fixes 46 | 47 | * **build:** 48 | * include root attribute on path for source maps ([e3fc2d5a](http://github.com/aurelia/skeleton-navigation/commit/e3fc2d5a26f354c2afbd2c1e1e45b96fe5d92657), closes [#26](http://github.com/aurelia/skeleton-navigation/issues/26)) 49 | * add source maps; remove sourceFileName from compiler options ([1733c4ad](http://github.com/aurelia/skeleton-navigation/commit/1733c4ad032747ecb868b420a5d6f23e9dab12ae)) 50 | * **package:** update dependencies ([025154f3](http://github.com/aurelia/skeleton-navigation/commit/025154f3c9fc9d99b6ca00bfd94d9ffc8249df5c)) 51 | * **test:** removing single it execution ([31866dc3](http://github.com/aurelia/skeleton-navigation/commit/31866dc3038fe2c1b51531620a13b88c8e3ff766)) 52 | 53 | 54 | #### Features 55 | 56 | * **e2e:** add protractor locator and e2e PO test ([2509836e](http://github.com/aurelia/skeleton-navigation/commit/2509836e8406745e55c8d3d897f8a2b7f1bb1c56)) 57 | 58 | 59 | ### 0.9.4 (2015-02-03) 60 | 61 | 62 | #### Bug Fixes 63 | 64 | * **index:** per systemjs recommendation, remove error binding ([e30cefac](http://github.com/aurelia/skeleton-navigation/commit/e30cefac419f88911a4c18085ffd59d05047e254)) 65 | * **package:** add missing depdency ([c3718827](http://github.com/aurelia/skeleton-navigation/commit/c37188278816f1c540e8b038a8dfed60dfeb0d9c)) 66 | 67 | 68 | #### Features 69 | 70 | * **gulpfile:** adds protractor configuration and gulpfile tasks for E2E-Testing ([821f4868](http://github.com/aurelia/skeleton-navigation/commit/821f4868a5d4b4ba62cc12cece943cd55ed3142f)) 71 | * **tools:** Added build-dev-env task to skeleton-navigation ([4c145095](http://github.com/aurelia/skeleton-navigation/commit/4c1450956cf1e8804ddd660beeba77546e14287f)) 72 | 73 | 74 | ### 0.9.3 (2015-01-25) 75 | 76 | 77 | #### Bug Fixes 78 | 79 | * **package:** update dependencies ([0f221d2d](http://github.com/aurelia/skeleton-navigation/commit/0f221d2d8cb79ba40b745c92d0fa64d27bfd0dbf)) 80 | 81 | 82 | ### 0.9.2 (2015-01-25) 83 | 84 | 85 | #### Bug Fixes 86 | 87 | * **gulpfile:** bug in browser sync for style content ([342a2612](http://github.com/aurelia/skeleton-navigation/commit/342a26121cf5988d73847ed02d022d13e325d5f2)) 88 | 89 | 90 | ### 0.9.1 (2015-01-24) 91 | 92 | 93 | #### Bug Fixes 94 | 95 | * **package:** 96 | * update dependencies ([d05fb6c9](http://github.com/aurelia/skeleton-navigation/commit/d05fb6c9a4148e85165e8b8594b3de9e344e85d6)) 97 | * update dependencies ([da130f4f](http://github.com/aurelia/skeleton-navigation/commit/da130f4f2919c8330f455e1b9f175d693aacf43c)) 98 | * update dependencies ([ab85bc86](http://github.com/aurelia/skeleton-navigation/commit/ab85bc865cb1607f13cb7d5b3a55f37903e61785)) 99 | 100 | 101 | #### Features 102 | 103 | * **package:** update dependencies ([86b1dd90](http://github.com/aurelia/skeleton-navigation/commit/86b1dd908206abfdca2a8f89cc246f54e761bdbd)) 104 | * **welcome:** add sample local value converter ([9a2c2aa6](http://github.com/aurelia/skeleton-navigation/commit/9a2c2aa6f7fa9f5a5666aa0c19163bf49cbcc5fc)) 105 | 106 | 107 | ## 0.9.0 (2015-01-22) 108 | 109 | 110 | #### Bug Fixes 111 | 112 | * **all:** 113 | * update dependencies and links to latest ([8863e7b7](http://github.com/aurelia/skeleton-navigation/commit/8863e7b7d07e87430b0f495cd25923e401698bc9)) 114 | * update to latest version of metadata and view import ([2467e6c8](http://github.com/aurelia/skeleton-navigation/commit/2467e6c8361fc848b45ab6d92b180edf4d4bcdb5)) 115 | * **build:** improve watch functionality ([8496a78d](http://github.com/aurelia/skeleton-navigation/commit/8496a78def478bd2c53217c9e70db1d272a935ea)) 116 | * **package:** update dependencies ([2957e94d](http://github.com/aurelia/skeleton-navigation/commit/2957e94d84988207c2553395e8e0a1c943a65a16)) 117 | 118 | 119 | #### Features 120 | 121 | * **all:** update to new fluent metadata ([18382913](http://github.com/aurelia/skeleton-navigation/commit/183829132bce3f754377bf2d720a288b71ef4b64)) 122 | * **index:** add splash screen ([88e3e6f9](http://github.com/aurelia/skeleton-navigation/commit/88e3e6f956575c18fb37e72cd51e7bfac33f6941)) 123 | 124 | 125 | ## 0.8.0 (2015-01-12) 126 | 127 | 128 | #### Bug Fixes 129 | 130 | * **package:** update Aurelia dependencies ([44083541](http://github.com/aurelia/skeleton-navigation/commit/440835418d78b5d99278ec4f2fbc04beb79ff98f)) 131 | 132 | 133 | #### Features 134 | 135 | * **build:** update watch task to include style files ([ddf6c789](http://github.com/aurelia/skeleton-navigation/commit/ddf6c789c84ac267bdf4865f19a3339d7ee66253)) 136 | 137 | 138 | ### 0.7.2 (2015-01-07) 139 | 140 | 141 | #### Bug Fixes 142 | 143 | * **welcome:** typo in the last name label ([05e72aaa](http://github.com/aurelia/skeleton-navigation/commit/05e72aaaee2a8c58943f7b9e85eb59307a85f35d)) 144 | 145 | 146 | ### 0.7.1 (2015-01-07) 147 | 148 | * updates to the readme to help clarify issues around authentication and usage on windows 149 | 150 | ## 0.7.0 (2015-01-07) 151 | 152 | 153 | #### Bug Fixes 154 | 155 | * **package:** update dependencies to latest ([c11ffa0d](http://github.com/aurelia/skeleton-navigation/commit/c11ffa0d980c6058dbff6d0a16fadd27040f7214)) 156 | 157 | 158 | ## 0.6.0 (2015-01-06) 159 | 160 | 161 | #### Features 162 | 163 | * **build:** update compiler and switch to register module format ([921d6ab8](http://github.com/aurelia/skeleton-navigation/commit/921d6ab8a523fce6a410f7333650eef9dc5e8abc)) 164 | 165 | 166 | ## 0.5.0 (2014-12-22) 167 | 168 | 169 | #### Bug Fixes 170 | 171 | * **config:** update the jspm config ([9ceaa0c2](http://github.com/aurelia/skeleton-navigation/commit/9ceaa0c2af5374461d183993036984cf048261d8)) 172 | * **package:** update dependencies to latest versions ([b5cff606](http://github.com/aurelia/skeleton-navigation/commit/b5cff606059dff0ad47e78cc6ba4325d646015a5)) 173 | 174 | 175 | #### Features 176 | 177 | * **build:** add browser sync ([fe2d2fa7](http://github.com/aurelia/skeleton-navigation/commit/fe2d2fa7c10a4748cab6c86e326465e6a8327ef4)) 178 | 179 | 180 | ### 0.4.2 (2014-12-18) 181 | 182 | 183 | #### Bug Fixes 184 | 185 | * **package:** update bootstrapper to latest version ([e1d00037](http://github.com/aurelia/skeleton-navigation/commit/e1d000377c782b1bfc9c8fce0d247afb0b8702d1)) 186 | 187 | 188 | ### 0.4.1 (2014-12-18) 189 | 190 | 191 | #### Bug Fixes 192 | 193 | * **package:** update dependencies to latest versions ([275a693d](http://github.com/aurelia/skeleton-navigation/commit/275a693dcbbeec189847f97881b40d25e3b693d4)) 194 | 195 | 196 | ## 0.4.0 (2014-12-17) 197 | 198 | 199 | #### Bug Fixes 200 | 201 | * **package:** update dependencies to latest versions ([77986163](http://github.com/aurelia/skeleton-navigation/commit/779861632b7e48152ce7bed9d0316e90fda2482d)) 202 | * **package:** update dependencies to latest versions ([4f1661dc](http://github.com/aurelia/skeleton-navigation/commit/4f1661dceafe93c8c117133bd07b9edb243b913e)) 203 | 204 | -------------------------------------------------------------------------------- /doc/api.json: -------------------------------------------------------------------------------- 1 | {"classes":[],"methods":[],"properties":[],"events":[]} -------------------------------------------------------------------------------- /gulpfile.js: -------------------------------------------------------------------------------- 1 | // all gulp tasks are located in the ./build/tasks directory 2 | // gulp configuration is in files in ./build directory 3 | require('require-dir')('build/tasks'); 4 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Aurelia 5 | 6 | 7 | 8 | 9 |
10 |
Aurelia Navigation Skeleton
11 | 12 |
13 | 14 | 15 | 16 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /karma.conf.js: -------------------------------------------------------------------------------- 1 | // Karma configuration 2 | // Generated on Fri Dec 05 2014 16:49:29 GMT-0500 (EST) 3 | 4 | module.exports = function(config) { 5 | config.set({ 6 | 7 | // base path that will be used to resolve all patterns (eg. files, exclude) 8 | basePath: '', 9 | 10 | 11 | // frameworks to use 12 | // available frameworks: https://npmjs.org/browse/keyword/karma-adapter 13 | frameworks: ['jspm', 'jasmine'], 14 | 15 | jspm: { 16 | // Edit this to your needs 17 | loadFiles: ['src/**/*.js', 'test/unit/**/*.js'] 18 | }, 19 | 20 | 21 | // list of files / patterns to load in the browser 22 | files: [], 23 | 24 | 25 | // list of files to exclude 26 | exclude: [ 27 | ], 28 | 29 | 30 | // preprocess matching files before serving them to the browser 31 | // available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor 32 | preprocessors: { 33 | 'test/**/*.js': ['babel'], 34 | 'src/**/*.js': ['babel'] 35 | }, 36 | 'babelPreprocessor': { 37 | options: { 38 | sourceMap: 'inline', 39 | modules: 'system', 40 | moduleIds: false 41 | } 42 | }, 43 | 44 | // test results reporter to use 45 | // possible values: 'dots', 'progress' 46 | // available reporters: https://npmjs.org/browse/keyword/karma-reporter 47 | reporters: ['progress'], 48 | 49 | 50 | // web server port 51 | port: 9876, 52 | 53 | 54 | // enable / disable colors in the output (reporters and logs) 55 | colors: true, 56 | 57 | 58 | // level of logging 59 | // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG 60 | logLevel: config.LOG_INFO, 61 | 62 | 63 | // enable / disable watching file and executing tests whenever any file changes 64 | autoWatch: true, 65 | 66 | 67 | // start these browsers 68 | // available browser launchers: https://npmjs.org/browse/keyword/karma-launcher 69 | browsers: ['Chrome'], 70 | 71 | 72 | // Continuous Integration mode 73 | // if true, Karma captures browsers, runs the tests and exits 74 | singleRun: false 75 | }); 76 | }; 77 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "aurelia-skeleton-navigation", 3 | "version": "0.11.0", 4 | "description": "A starter kit for building a standard navigation-style app with Aurelia.", 5 | "keywords": [ 6 | "aurelia", 7 | "navigation", 8 | "skeleton" 9 | ], 10 | "homepage": "http://aurelia.io", 11 | "bugs": { 12 | "url": "https://github.com/aurelia/skeleton-navigation/issues" 13 | }, 14 | "license": "MIT", 15 | "author": "Rob Eisenberg (http://robeisenberg.com/)", 16 | "main": "dist/commonjs/index.js", 17 | "repository": { 18 | "type": "git", 19 | "url": "http://github.com/aurelia/skeleton-navigation" 20 | }, 21 | "devDependencies": { 22 | "aurelia-tools": "^0.1.0", 23 | "browser-sync": "^1.8.1", 24 | "conventional-changelog": "0.0.11", 25 | "del": "^1.1.0", 26 | "gulp": "^3.8.10", 27 | "gulp-babel": "^4.0.0", 28 | "gulp-bump": "^0.1.11", 29 | "gulp-changed": "^1.1.0", 30 | "gulp-jshint": "^1.9.0", 31 | "gulp-plumber": "^0.6.6", 32 | "gulp-protractor": "^0.0.12", 33 | "gulp-sourcemaps": "^1.3.0", 34 | "gulp-yuidoc": "^0.1.2", 35 | "jasmine-core": "^2.1.3", 36 | "jshint-stylish": "^1.0.0", 37 | "karma": "^0.12.28", 38 | "karma-babel-preprocessor": "^4.0.0", 39 | "karma-chrome-launcher": "^0.1.7", 40 | "karma-jasmine": "^0.3.5", 41 | "karma-jspm": "^1.0.1", 42 | "object.assign": "^1.0.3", 43 | "require-dir": "^0.1.0", 44 | "run-sequence": "^1.0.2", 45 | "vinyl-paths": "^1.0.0", 46 | "yargs": "^2.1.1" 47 | }, 48 | "jspm": { 49 | "dependencies": { 50 | "aurelia-bootstrapper": "github:aurelia/bootstrapper@^0.10.0", 51 | "aurelia-dependency-injection": "github:aurelia/dependency-injection@^0.5.0", 52 | "aurelia-framework": "github:aurelia/framework@^0.9.0", 53 | "aurelia-http-client": "github:aurelia/http-client@^0.6.0", 54 | "aurelia-router": "github:aurelia/router@^0.6.0", 55 | "bootstrap": "github:twbs/bootstrap@^3.3.1", 56 | "font-awesome": "npm:font-awesome@^4.3.0" 57 | } 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /protractor.conf.js: -------------------------------------------------------------------------------- 1 | // An example configuration file. 2 | exports.config = { 3 | directConnect: true, 4 | 5 | // Capabilities to be passed to the webdriver instance. 6 | capabilities: { 7 | 'browserName': 'chrome' 8 | }, 9 | 10 | //seleniumAddress: 'http://0.0.0.0:4444', 11 | // add proper version number 12 | seleniumServerJar: './node_modules/gulp-protractor/node_modules/protractor/selenium/selenium-server-standalone-2.44.0.jar', 13 | specs: ['specs/e2e/dist/*.js'], 14 | 15 | plugins: [{ 16 | path: 'aurelia.protractor.js' 17 | }], 18 | 19 | 20 | // Options to be passed to Jasmine-node. 21 | jasmineNodeOpts: { 22 | showColors: true, 23 | defaultTimeoutInterval: 30000 24 | } 25 | }; 26 | -------------------------------------------------------------------------------- /src/app.html: -------------------------------------------------------------------------------- 1 | 10 | -------------------------------------------------------------------------------- /src/app.js: -------------------------------------------------------------------------------- 1 | import {Router} from 'aurelia-router'; 2 | import bootstrap from 'bootstrap'; 3 | 4 | export class App { 5 | static inject() { return [Router]; } 6 | constructor(router) { 7 | this.router = router; 8 | this.router.configure(config => { 9 | config.title = 'Aurelia'; 10 | config.map([ 11 | { route: ['','welcome'], moduleId: './welcome', nav: true, title:'Welcome' }, 12 | { route: 'flickr', moduleId: './flickr', nav: true }, 13 | { route: 'child-router', moduleId: './child-router', nav: true, title:'Child Router' } 14 | ]); 15 | }); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/child-router.html: -------------------------------------------------------------------------------- 1 | 18 | -------------------------------------------------------------------------------- /src/child-router.js: -------------------------------------------------------------------------------- 1 | import {Router} from 'aurelia-router'; 2 | 3 | export class ChildRouter{ 4 | static inject() { return [Router]; } 5 | constructor(router){ 6 | this.heading = 'Child Router'; 7 | this.router = router; 8 | router.configure(config => { 9 | config.map([ 10 | { route: ['','welcome'], moduleId: './welcome', nav: true, title:'Welcome' }, 11 | { route: 'flickr', moduleId: './flickr', nav: true }, 12 | { route: 'child-router', moduleId: './child-router', nav: true, title:'Child Router' } 13 | ]); 14 | }); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/flickr.html: -------------------------------------------------------------------------------- 1 | 13 | -------------------------------------------------------------------------------- /src/flickr.js: -------------------------------------------------------------------------------- 1 | import {HttpClient} from 'aurelia-http-client'; 2 | 3 | var url = 'http://api.flickr.com/services/feeds/photos_public.gne?tags=rainier&tagmode=any&format=json'; 4 | 5 | export class Flickr{ 6 | static inject() { return [HttpClient]; } 7 | constructor(http){ 8 | this.heading = 'Flickr'; 9 | this.images = []; 10 | this.http = http; 11 | } 12 | 13 | activate(){ 14 | return this.http.jsonp(url).then(response => { 15 | this.images = response.content.items; 16 | }); 17 | } 18 | 19 | canDeactivate(){ 20 | return confirm('Are you sure you want to leave?'); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/nav-bar.html: -------------------------------------------------------------------------------- 1 | 31 | -------------------------------------------------------------------------------- /src/nav-bar.js: -------------------------------------------------------------------------------- 1 | import {Behavior} from 'aurelia-framework'; 2 | 3 | export class NavBar { 4 | static metadata(){ return Behavior.withProperty('router'); } 5 | } 6 | -------------------------------------------------------------------------------- /src/welcome.html: -------------------------------------------------------------------------------- 1 | 22 | -------------------------------------------------------------------------------- /src/welcome.js: -------------------------------------------------------------------------------- 1 | export class Welcome{ 2 | constructor(){ 3 | this.heading = 'Welcome to the Aurelia Navigation App!'; 4 | this.firstName = 'John'; 5 | this.lastName = 'Doe'; 6 | } 7 | 8 | get fullName(){ 9 | return `${this.firstName} ${this.lastName}`; 10 | } 11 | 12 | welcome(){ 13 | alert(`Welcome, ${this.fullName}!`); 14 | } 15 | } 16 | 17 | export class UpperValueConverter { 18 | toView(value){ 19 | return value && value.toUpperCase(); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /styles/styles.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin: 0; 3 | } 4 | 5 | .splash { 6 | text-align: center; 7 | margin: 10% 0 0 0; 8 | box-sizing: border-box; 9 | } 10 | 11 | .splash .message { 12 | font-size: 72px; 13 | line-height: 72px; 14 | text-shadow: rgba(0, 0, 0, 0.5) 0 0 15px; 15 | text-transform: uppercase; 16 | font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; 17 | } 18 | 19 | .splash .fa-spinner { 20 | text-align: center; 21 | display: inline-block; 22 | font-size: 72px; 23 | margin-top: 50px; 24 | } 25 | 26 | .page-host { 27 | position: absolute; 28 | left: 0; 29 | right: 0; 30 | top: 50px; 31 | bottom: 0; 32 | overflow-x: hidden; 33 | overflow-y: auto; 34 | } 35 | 36 | section { 37 | margin: 0 20px; 38 | } 39 | 40 | .navbar-nav li.loader { 41 | margin: 12px 24px 0 6px; 42 | } 43 | 44 | .pictureDetail { 45 | max-width: 425px; 46 | } 47 | -------------------------------------------------------------------------------- /test/e2e/dist/demo.spec.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | var PageObject_Welcome = require("./welcome.po.js").PageObject_Welcome; 4 | 5 | var PageObject_Skeleton = require("./skeleton.po.js").PageObject_Skeleton; 6 | 7 | describe("aurelia skeleton app", function () { 8 | var po_welcome, po_skeleton; 9 | 10 | beforeEach(function () { 11 | po_skeleton = new PageObject_Skeleton(); 12 | po_welcome = new PageObject_Welcome(); 13 | 14 | browser.loadAndWaitForAureliaPage("http://localhost:9000"); 15 | }); 16 | 17 | it("should load the page and display the initial page title", function () { 18 | expect(po_skeleton.getCurrentPageTitle()).toBe("Welcome | Aurelia"); 19 | }); 20 | 21 | it("should display greeting", function () { 22 | expect(po_welcome.getGreeting()).toBe("Welcome to the Aurelia Navigation App!"); 23 | }); 24 | 25 | it("should automatically write down the fullname", function () { 26 | po_welcome.setFirstname("Rob"); 27 | po_welcome.setLastname("Eisenberg"); 28 | 29 | // For now there is a timing issue with the binding. 30 | // Until resolved we will use a short sleep to overcome the issue. 31 | browser.sleep(200); 32 | expect(po_welcome.getFullname()).toBe("ROB EISENBERG"); 33 | }); 34 | 35 | it("should show alert message when clicking submit button", function () { 36 | expect(po_welcome.openAlertDialog()).toBe(true); 37 | }); 38 | 39 | it("should navigate to flickr page", function () { 40 | po_skeleton.navigateTo("#/flickr"); 41 | expect(po_skeleton.getCurrentPageTitle()).toBe("Flickr | Aurelia"); 42 | }); 43 | }); -------------------------------------------------------------------------------- /test/e2e/dist/skeleton.po.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | var _prototypeProperties = function (child, staticProps, instanceProps) { if (staticProps) Object.defineProperties(child, staticProps); if (instanceProps) Object.defineProperties(child.prototype, instanceProps); }; 4 | 5 | var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }; 6 | 7 | var PageObject_Skeleton = exports.PageObject_Skeleton = (function () { 8 | function PageObject_Skeleton() { 9 | _classCallCheck(this, PageObject_Skeleton); 10 | } 11 | 12 | _prototypeProperties(PageObject_Skeleton, null, { 13 | getCurrentPageTitle: { 14 | value: function getCurrentPageTitle() { 15 | return browser.getTitle(); 16 | }, 17 | writable: true, 18 | configurable: true 19 | }, 20 | navigateTo: { 21 | value: function navigateTo(href) { 22 | element(by.css("a[href=\"" + href + "\"]")).click(); 23 | return browser.waitForHttpDone(); 24 | }, 25 | writable: true, 26 | configurable: true 27 | } 28 | }); 29 | 30 | return PageObject_Skeleton; 31 | })(); 32 | 33 | Object.defineProperty(exports, "__esModule", { 34 | value: true 35 | }); -------------------------------------------------------------------------------- /test/e2e/dist/welcome.po.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | var _prototypeProperties = function (child, staticProps, instanceProps) { if (staticProps) Object.defineProperties(child, staticProps); if (instanceProps) Object.defineProperties(child.prototype, instanceProps); }; 4 | 5 | var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }; 6 | 7 | var PageObject_Welcome = exports.PageObject_Welcome = (function () { 8 | function PageObject_Welcome() { 9 | _classCallCheck(this, PageObject_Welcome); 10 | } 11 | 12 | _prototypeProperties(PageObject_Welcome, null, { 13 | getGreeting: { 14 | value: function getGreeting() { 15 | return element(by.tagName("h2")).getText(); 16 | }, 17 | writable: true, 18 | configurable: true 19 | }, 20 | setFirstname: { 21 | value: function setFirstname(value) { 22 | return element(by.valueBind("firstName")).clear().sendKeys(value); 23 | }, 24 | writable: true, 25 | configurable: true 26 | }, 27 | setLastname: { 28 | value: function setLastname(value) { 29 | return element(by.valueBind("lastName")).clear().sendKeys(value); 30 | }, 31 | writable: true, 32 | configurable: true 33 | }, 34 | getFullname: { 35 | value: function getFullname() { 36 | return element(by.css(".help-block")).getText(); 37 | }, 38 | writable: true, 39 | configurable: true 40 | }, 41 | pressSubmitButton: { 42 | value: function pressSubmitButton() { 43 | return element(by.css("button[type=\"submit\"]")).click(); 44 | }, 45 | writable: true, 46 | configurable: true 47 | }, 48 | openAlertDialog: { 49 | value: function openAlertDialog() { 50 | var _this = this; 51 | 52 | return browser.wait(function () { 53 | _this.pressSubmitButton(); 54 | 55 | return browser.switchTo().alert().then( 56 | // use alert.accept instead of alert.dismiss which results in a browser crash 57 | function (alert) { 58 | alert.accept();return true; 59 | }, function () { 60 | return false; 61 | }); 62 | }); 63 | }, 64 | writable: true, 65 | configurable: true 66 | } 67 | }); 68 | 69 | return PageObject_Welcome; 70 | })(); 71 | 72 | Object.defineProperty(exports, "__esModule", { 73 | value: true 74 | }); -------------------------------------------------------------------------------- /test/e2e/src/demo.spec.js: -------------------------------------------------------------------------------- 1 | import {PageObject_Welcome} from './welcome.po.js'; 2 | import {PageObject_Skeleton} from './skeleton.po.js'; 3 | 4 | describe('aurelia skeleton app', function() { 5 | var po_welcome, 6 | po_skeleton; 7 | 8 | beforeEach( () => { 9 | po_skeleton = new PageObject_Skeleton(); 10 | po_welcome = new PageObject_Welcome(); 11 | 12 | browser.loadAndWaitForAureliaPage("http://localhost:9000"); 13 | }); 14 | 15 | it('should load the page and display the initial page title', () => { 16 | expect(po_skeleton.getCurrentPageTitle()).toBe('Welcome | Aurelia'); 17 | }); 18 | 19 | it('should display greeting', () => { 20 | expect(po_welcome.getGreeting()).toBe('Welcome to the Aurelia Navigation App!'); 21 | }); 22 | 23 | it('should automatically write down the fullname', () => { 24 | po_welcome.setFirstname('Rob'); 25 | po_welcome.setLastname('Eisenberg'); 26 | 27 | // For now there is a timing issue with the binding. 28 | // Until resolved we will use a short sleep to overcome the issue. 29 | browser.sleep(200); 30 | expect(po_welcome.getFullname()).toBe('ROB EISENBERG'); 31 | }); 32 | 33 | it('should show alert message when clicking submit button', () => { 34 | expect(po_welcome.openAlertDialog()).toBe(true); 35 | }); 36 | 37 | it('should navigate to flickr page', () => { 38 | po_skeleton.navigateTo('#/flickr'); 39 | expect(po_skeleton.getCurrentPageTitle()).toBe('Flickr | Aurelia'); 40 | }); 41 | }); 42 | -------------------------------------------------------------------------------- /test/e2e/src/skeleton.po.js: -------------------------------------------------------------------------------- 1 | export class PageObject_Skeleton { 2 | 3 | constructor() { 4 | 5 | } 6 | 7 | getCurrentPageTitle() { 8 | return browser.getTitle(); 9 | } 10 | 11 | navigateTo(href) { 12 | element(by.css('a[href="' + href + '"]')).click(); 13 | return browser.waitForHttpDone(); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /test/e2e/src/welcome.po.js: -------------------------------------------------------------------------------- 1 | export class PageObject_Welcome { 2 | 3 | constructor() { 4 | 5 | } 6 | 7 | getGreeting() { 8 | return element(by.tagName('h2')).getText(); 9 | } 10 | 11 | setFirstname(value) { 12 | return element(by.valueBind('firstName')).clear().sendKeys(value); 13 | } 14 | 15 | setLastname(value) { 16 | return element(by.valueBind('lastName')).clear().sendKeys(value); 17 | } 18 | 19 | getFullname() { 20 | return element(by.css('.help-block')).getText(); 21 | } 22 | 23 | pressSubmitButton() { 24 | return element(by.css('button[type="submit"]')).click(); 25 | } 26 | 27 | openAlertDialog() { 28 | return browser.wait(() => { 29 | this.pressSubmitButton(); 30 | 31 | return browser.switchTo().alert().then( 32 | // use alert.accept instead of alert.dismiss which results in a browser crash 33 | function(alert) { alert.accept(); return true; }, 34 | function() { return false; } 35 | ); 36 | }); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /test/unit/app.spec.js: -------------------------------------------------------------------------------- 1 | import {App} from '../../src/app'; 2 | 3 | class RouterStub { 4 | configure(handler) { 5 | handler(this); 6 | } 7 | map(routes) { 8 | this.routes = routes; 9 | } 10 | } 11 | 12 | describe('the App module', () => { 13 | var sut; 14 | beforeEach(() => { sut = new App(new RouterStub()); }); 15 | 16 | it('contains a router property', () => { 17 | expect(sut.router).toBeDefined(); 18 | }); 19 | 20 | it('configures the router title', () => { 21 | expect(sut.router.title).toEqual('Aurelia'); 22 | }); 23 | 24 | it('should have a welcome route', () => { 25 | expect(sut.router.routes).toContain({ route: ['','welcome'], moduleId: 'welcome', nav: true, title:'Welcome' }); 26 | }); 27 | 28 | it('should have a flickr route', () => { 29 | expect(sut.router.routes).toContain({ route: 'flickr', moduleId: 'flickr', nav: true }); 30 | }); 31 | 32 | it('should have a child router route', () => { 33 | expect(sut.router.routes).toContain({ route: 'child-router', moduleId: 'child-router', nav: true, title:'Child Router' }); 34 | }); 35 | }); 36 | -------------------------------------------------------------------------------- /test/unit/child-router.spec.js: -------------------------------------------------------------------------------- 1 | import {ChildRouter} from '../../src/child-router'; 2 | 3 | class RouterStub { 4 | configure(handler) { 5 | handler(this); 6 | } 7 | map(routes) { 8 | this.routes = routes; 9 | } 10 | } 11 | 12 | describe('the Child Router module', () => { 13 | var sut; 14 | beforeEach(() => { sut = new ChildRouter(new RouterStub()); }); 15 | 16 | it('contains a router property', () => { 17 | expect(sut.router).toBeDefined(); 18 | }); 19 | 20 | it('configures the heading', () => { 21 | expect(sut.heading).toEqual('Child Router'); 22 | }); 23 | 24 | it('should have a welcome route', () => { 25 | expect(sut.router.routes).toContain({ route: ['','welcome'], moduleId: 'welcome', nav: true, title:'Welcome' }); 26 | }); 27 | 28 | it('should have a flickr route', () => { 29 | expect(sut.router.routes).toContain({ route: 'flickr', moduleId: 'flickr', nav: true }); 30 | }); 31 | 32 | it('should have a child router route', () => { 33 | expect(sut.router.routes).toContain({ route: 'child-router', moduleId: 'child-router', nav: true, title:'Child Router' }); 34 | }); 35 | }); 36 | -------------------------------------------------------------------------------- /test/unit/flickr.spec.js: -------------------------------------------------------------------------------- 1 | import {Flickr} from '../../src/flickr'; 2 | 3 | class HttpStub { 4 | jsonp(url) { 5 | var response = this.itemStub; 6 | this.url = url; 7 | return new Promise((resolve) => { 8 | resolve({ content: { items: response } }); 9 | }) 10 | } 11 | } 12 | 13 | describe('the Flickr module', () => { 14 | 15 | it('sets jsonp response to images', (done) => { 16 | var http = new HttpStub(), 17 | sut = new Flickr(http), 18 | itemStubs = [1], 19 | itemFake = [2]; 20 | 21 | http.itemStub = itemStubs; 22 | sut.activate().then(() => { 23 | expect(sut.images).toBe(itemStubs); 24 | expect(sut.images).not.toBe(itemFake); 25 | done(); 26 | }); 27 | }); 28 | 29 | it('calls confirm on canDeactivate', () => { 30 | var sut = new Flickr(), 31 | global = jasmine.getGlobal(); 32 | spyOn(global, "confirm"); 33 | sut.canDeactivate(); 34 | expect(global.confirm).toHaveBeenCalled(); 35 | }); 36 | }); 37 | --------------------------------------------------------------------------------