-
Notifications
You must be signed in to change notification settings - Fork 10
Bunny widget PR for Dan Stineback #3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
dstineback
wants to merge
12
commits into
sea-401d5-javascript:master
Choose a base branch
from
dstineback:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
9daed43
init file set up
dstineback 2728788
added controllers to the directive index
dstineback e1e36a2
added thumbnail controller
dstineback d4533a9
added thumbnail directive
dstineback 1ffa8b6
renamed the template html
dstineback 0c37af5
added directives to index.html
dstineback 5d30866
added stuff to .eslint and took out test folder, also took out depend…
dstineback 481bd0a
first test of app and it was not working
dstineback a062160
was able to fix all the path bugs and finally had pictures displaying…
dstineback 16e2f08
hacked way at a few different things but will need to make another ht…
dstineback fbd2603
Took out 2 controllers. Found out we needed just one controller for t…
dstineback 2013837
Merge pull request #1 from dstineback/bunny
dstineback File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| **/node_modules/* | ||
| **/vendor/* | ||
| **/*.min.js | ||
| /*.md | ||
| /package.json | ||
| /npm-debug.log | ||
| /procfile | ||
| /build/* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| { | ||
| "rules": { | ||
| "no-console": 0, | ||
| "indent": [ | ||
| 2, | ||
| 2 | ||
| ], | ||
| "quotes": [ | ||
| 2, | ||
| "single" | ||
| ], | ||
| "linebreak-style": [ | ||
| 2, | ||
| "unix" | ||
| ], | ||
| "semi": [ | ||
| 2, | ||
| "always" | ||
| ] | ||
| }, | ||
| "env": { | ||
| "es6": true, | ||
| "node": true, | ||
| "browser": true, | ||
| "mocha": true, | ||
| "jasmine": true | ||
| }, | ||
| "globals": { | ||
| "describe": false, | ||
| "it": false, | ||
| "beforeEach": false, | ||
| "afterEach": false, | ||
| "before": false, | ||
| "after": false | ||
| }, | ||
| "ecmaFeatures": { | ||
| "modules": true, | ||
| "experimentalObjectRestSpread": true, | ||
| "impliedStrict": true | ||
| }, | ||
| "extends": "eslint:recommended" | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,86 @@ | ||
| # application specific | ||
| build/* | ||
| db/ | ||
|
|
||
| # Created by https://www.gitignore.io/api/node,osx,vim | ||
|
|
||
| ### Node ### | ||
| # Logs | ||
| logs | ||
| *.log | ||
| npm-debug.log* | ||
|
|
||
| # Runtime data | ||
| pids | ||
| *.pid | ||
| *.seed | ||
|
|
||
| # Directory for instrumented libs generated by jscoverage/JSCover | ||
| lib-cov | ||
|
|
||
| # Coverage directory used by tools like istanbul | ||
| coverage | ||
|
|
||
| # nyc test coverage | ||
| .nyc_output | ||
|
|
||
| # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) | ||
| .grunt | ||
|
|
||
| # node-waf configuration | ||
| .lock-wscript | ||
|
|
||
| # Compiled binary addons (http://nodejs.org/api/addons.html) | ||
| build/Release | ||
|
|
||
| # Dependency directories | ||
| node_modules | ||
| jspm_packages | ||
|
|
||
| # Optional npm cache directory | ||
| .npm | ||
|
|
||
| # Optional REPL history | ||
| .node_repl_history | ||
|
|
||
|
|
||
| ### OSX ### | ||
| *.DS_Store | ||
| .AppleDouble | ||
| .LSOverride | ||
|
|
||
| # Icon must end with two \r | ||
| Icon | ||
|
|
||
|
|
||
| # Thumbnails | ||
| ._* | ||
|
|
||
| # Files that might appear in the root of a volume | ||
| .DocumentRevisions-V100 | ||
| .fseventsd | ||
| .Spotlight-V100 | ||
| .TemporaryItems | ||
| .Trashes | ||
| .VolumeIcon.icns | ||
| .com.apple.timemachine.donotpresent | ||
|
|
||
| # Directories potentially created on remote AFP share | ||
| .AppleDB | ||
| .AppleDesktop | ||
| Network Trash Folder | ||
| Temporary Items | ||
| .apdisk | ||
|
|
||
|
|
||
| ### Vim ### | ||
| # swap | ||
| [._]*.s[a-w][a-z] | ||
| [._]s[a-w][a-z] | ||
| # session | ||
| Session.vim | ||
| # temporary | ||
| .netrwhist | ||
| *~ | ||
| # auto-generated tag files | ||
| tags |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| <!DOCTYPE html> | ||
| <html> | ||
| <head> | ||
| <meta charset="utf-8"> | ||
| <title>Bunny App</title> | ||
| </head> | ||
| <body data-ng-app="BunnyApp"> | ||
| <main ng-cloak ng-controller="imageController as settings"> | ||
|
|
||
| <title-directive title="{{settings.title}}" url="{{settings.url}}" description="{{settings.description}}"></title-directive> | ||
|
|
||
| <thumbnail-display url="{{settings.url}}"></thumbnail-display> | ||
|
|
||
| <image-display url="{{settings.url}}" height="{{settings.height}}" width="{{settings.width}}" title="{{settings.title}}" big="{{settings.big}}"></image-display> | ||
|
|
||
| </main> | ||
| <script src="bundle.js"></script> | ||
| </body> | ||
| </html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| 'use strict'; | ||
|
|
||
| const angular = require('angular'); | ||
|
|
||
| var BunnyApp = angular.module('BunnyApp', []); | ||
| require('./first')(BunnyApp); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| 'use strict'; | ||
| module.exports = function(app) { | ||
| app.controller('imageController', ['$scope', function() { | ||
| this.url = 'http://f.cl.ly/items/3g3J1G0w122M360w380O/3726490195_f7cc75d377_o.jpg'; | ||
| this.height = 400; | ||
| this.width = 400; | ||
| this.title = 'Bunny Picture'; | ||
| this.description = 'A Cute picture of a bunny.'; | ||
| this.big = 'A BIG Cute Bunny Picture'; | ||
|
|
||
| }]); | ||
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| 'use strict'; | ||
|
|
||
| module.exports = function(app) { | ||
| require('./imageController')(app); | ||
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| 'use strict'; | ||
| module.exports = function(app){ | ||
| app.directive('imageDisplay', function(){ | ||
| return{ | ||
| restrict: 'AEC', | ||
| templateUrl: './templates/firstApp/image.html', | ||
| scope: { | ||
| url: '@', | ||
| height: '@', | ||
| width: '@', | ||
| title: '@', | ||
| description: '@', | ||
| big: '@' | ||
| } | ||
| }; | ||
| }); | ||
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| 'use strict'; | ||
| module.exports =function(app) { | ||
| require('./thumbnailDirective')(app); | ||
| require('./imageDirective')(app); | ||
| require('./titleDirective')(app); | ||
| }; |
14 changes: 14 additions & 0 deletions
14
dan-stineback/app/js/first/directives/thumbnailDirective.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| 'use strict'; | ||
| module.exports = function(app){ | ||
| app.directive('thumbnailDisplay', function(){ | ||
| return{ | ||
| restrict: 'AEC', | ||
| templateUrl: './templates/firstApp/thumbnail.html', | ||
| scope: { | ||
| url: '@', | ||
| height: '@', | ||
| width: '@' | ||
| } | ||
| }; | ||
| }); | ||
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| 'use strict'; | ||
| module.exports = function(app) { | ||
| app.directive('titleDirective', function() { | ||
| return { | ||
| templateUrl: './templates/firstApp/bunnyApp.html', | ||
| restrict: 'AEC', | ||
| scope: { | ||
| title: '@', | ||
| description: '@', | ||
| url: '@' | ||
| } | ||
| }; | ||
|
|
||
| }); | ||
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| module.exports = function(app) { | ||
| require('./controllers')(app); | ||
| require('./directives')(app); | ||
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| <div> | ||
| Title: {{title}}<br> | ||
| url: {{url}}<br> | ||
| description: {{description}} | ||
| </div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| <div> | ||
| <img src="{{url}}" height="{{height}}" width="{{width}}"><br> | ||
| Title: {{title}}<br> | ||
| description: {{big}} | ||
| </div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| <div> | ||
| <img src="{{url}}" height="100px" width="100px"> | ||
| </div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,54 @@ | ||
| 'use strict'; | ||
|
|
||
| const gulp = require('gulp'); | ||
| const webpack = require('webpack-stream'); | ||
| const clean = require('gulp-clean'); | ||
|
|
||
| const paths = { | ||
| js: __dirname + '/app/**/*.js', | ||
| html: __dirname + '/app/**/*.html' | ||
| // css: __dirname + '/app/**/*.css' | ||
| }; | ||
|
|
||
| gulp.task('clean', ()=>{ | ||
| return gulp.src('./build/*', {read:false}) | ||
| .pipe(clean()); | ||
| }); | ||
|
|
||
| gulp.task('copy-html', ['clean'], ()=>{ | ||
| return gulp.src(paths.html) | ||
| .pipe(gulp.dest('./build')); | ||
| }); | ||
|
|
||
| // gulp.task('copy-css', ['clean'], ()=>{ | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. remove if not used |
||
| // return gulp.src(paths.css) | ||
| // .pipe(gulp.dest('./build')); | ||
| // }); | ||
|
|
||
| gulp.task('bundle', ['clean'], ()=>{ | ||
| return gulp.src(paths.js) | ||
| .pipe(webpack({ | ||
| output: { | ||
| filename: 'bundle.js' | ||
| } | ||
| })) | ||
| .pipe(gulp.dest('./build')); | ||
| }); | ||
|
|
||
| gulp.task('bundle:test', () => { | ||
| return gulp.src(__dirname + '/test/*_test.js') | ||
| .pipe(webpack({ | ||
| output: { | ||
| filename: 'test_bundle.js' | ||
| } | ||
| })) | ||
| .pipe(gulp.dest(__dirname + '/test')); | ||
| }); | ||
|
|
||
| gulp.task('watch', ()=>{ | ||
| gulp.watch('./app/*', ['build']); | ||
| }); | ||
|
|
||
| gulp.task('build', ['clean', 'copy-html', 'bundle']); | ||
|
|
||
| gulp.task('default', ['build']); | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,69 @@ | ||
| // Karma configuration | ||
| // Generated on Wed Jun 15 2016 14:20:45 GMT-0700 (PDT) | ||
|
|
||
| module.exports = function(config) { | ||
| config.set({ | ||
|
|
||
| // base path that will be used to resolve all patterns (eg. files, exclude) | ||
| basePath: '', | ||
|
|
||
|
|
||
| // frameworks to use | ||
| // available frameworks: https://npmjs.org/browse/keyword/karma-adapter | ||
| frameworks: ['jasmine'], | ||
|
|
||
|
|
||
| // list of files / patterns to load in the browser | ||
| files: [ | ||
| 'test/test_bundle.js' | ||
| ], | ||
|
|
||
|
|
||
| // list of files to exclude | ||
| exclude: [ | ||
| ], | ||
|
|
||
|
|
||
| // preprocess matching files before serving them to the browser | ||
| // available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor | ||
| preprocessors: { | ||
| }, | ||
|
|
||
|
|
||
| // test results reporter to use | ||
| // possible values: 'dots', 'progress' | ||
| // available reporters: https://npmjs.org/browse/keyword/karma-reporter | ||
| reporters: ['progress'], | ||
|
|
||
|
|
||
| // web server port | ||
| port: 9876, | ||
|
|
||
|
|
||
| // enable / disable colors in the output (reporters and logs) | ||
| colors: true, | ||
|
|
||
|
|
||
| // level of logging | ||
| // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG | ||
| logLevel: config.LOG_INFO, | ||
|
|
||
|
|
||
| // enable / disable watching file and executing tests whenever any file changes | ||
| autoWatch: false, | ||
|
|
||
|
|
||
| // start these browsers | ||
| // available browser launchers: https://npmjs.org/browse/keyword/karma-launcher | ||
| browsers: ['Chrome'], | ||
|
|
||
|
|
||
| // Continuous Integration mode | ||
| // if true, Karma captures browsers, runs the tests and exits | ||
| singleRun: true, | ||
|
|
||
| // Concurrency level | ||
| // how many browser should be started simultaneous | ||
| concurrency: Infinity | ||
| }); | ||
| }; |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove if not used