diff --git a/.gitignore b/.gitignore deleted file mode 100644 index e90b997..0000000 --- a/.gitignore +++ /dev/null @@ -1,6 +0,0 @@ -*.DS_Store -*.sublime-project -*.sublime-workspace -*bower_components* -*node_modules* - diff --git a/Gruntfile.js b/Gruntfile.js deleted file mode 100644 index 72e7505..0000000 --- a/Gruntfile.js +++ /dev/null @@ -1,82 +0,0 @@ -module.exports = function(grunt){ - - // Load Grunt tasks - require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks); - - grunt.initConfig({ - watch: { - karma: { - files: ['angular-simple-slideshow.js', 'test/{,**/}*.js'], - tasks: ['karma:unit'] - } - }, - - bump: { - options: { - commitMessage: 'chore: release v%VERSION%', - commitFiles: ['package.json', 'bower.json', 'angular-simple-slideshow.min.js'], - files: ['package.json', 'bower.json'], - pushTo: 'origin' - } - }, - - karma: { - unit: { - configFile: 'karma.conf.js', - singleRun: true - }, - }, - - jshint: { - all: ['Gruntfile.js', 'angular-simple-slideshow.js', 'test/angular-simple-slideshow.spec.js'] - }, - - ngmin: { - dist: { - files: { - 'angular-simple-slideshow.min.js': ['angular-simple-slideshow.js'] - } - } - }, - - 'npm-contributors': { - options: { - commitMessage: 'chore: update contributors' - } - }, - - uglify: { - options: { - mangle: false - }, - dist: { - files: { - 'angular-simple-slideshow.min.js': ['angular-simple-slideshow.min.js'] - } - } - }, - - copy: { - example: { - src: ['angular-simple-slideshow.js', 'angular-simple-slideshow.css'], - dest: 'example/', - } - } - - }); - - grunt.registerTask('test', [ - 'jshint:all', - 'karma:unit' - ]); - - grunt.registerTask('build', [ - 'jshint:all', - 'ngmin', - 'uglify', - 'copy:example' - ]); - - // Default task - grunt.registerTask('default', ['watch']); -}; \ No newline at end of file diff --git a/LICENSE b/LICENSE deleted file mode 100644 index d2a1876..0000000 --- a/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014 Paul Barry. https://github.com/DevLab2425/angular-simple-slideshow - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. \ No newline at end of file diff --git a/README.md b/README.md deleted file mode 100644 index c1521ee..0000000 --- a/README.md +++ /dev/null @@ -1,61 +0,0 @@ -# angular-simple-slideshow -[![NPM version](https://badge.fury.io/js/angular-simple-slideshow.svg)](http://badge.fury.io/js/angular-simple-slideshow) -[![Bower version](https://badge.fury.io/bo/angular-simple-slideshow.svg)](http://badge.fury.io/bo/angular-simple-slideshow) -[![Github version](https://badge.fury.io/gh/angular-simple-slideshow.svg)](http://badge.fury.io/gh/angular-simple-slideshow) - -A simple set of directives that creates a customizable slideshow. - -## Demo -[http://devlab2425.github.io/angular-simple-slideshow/example/slideshow-example.html](http://devlab2425.github.io/angular-simple-slideshow/example/slideshow-example.html) - -## Installation - -Download [angular-simple-slideshow.js](https://raw.githubusercontent.com/DevLab2425/angular-simple-slideshow/master/angular-simple-slideshow.js) or install with bower - -```BASH -$ bower install angular-simple-slideshow --save -``` - -Load `angular-simple-slideshow.js`, then add the `simple-slideshow` module to your application. - -```javascript -angular.module('yourApp', ['simple-slideshow']); -``` - -## Usage -### HTML -```html - -
-
-
-
-
- -``` - -### JavaScript -```javascript -angular.module('slideShowExample', ['simple-slideshow']) - .controller('slideShowCtrl', ['$scope', function($scope){ - $scope.slides = [ - {name: 'Not my cat.', url: 'https://farm2.staticflickr.com/1318/5114665665_e55b2c2169_n.jpg'}, - {name: 'Again, not my cat.', url: 'https://farm2.staticflickr.com/1079/901626554_8bc51ec160_n.jpg'} - ]; - }]); -``` - -## Development - -Testing is done using Karma Test Runner. - -```BASH -$ grunt test -``` - -## Build -Will validate then minimize the JS, as well as copy to the example directory. - -```BASH -$ grunt build -``` diff --git a/angular-simple-slideshow.css b/angular-simple-slideshow.css deleted file mode 100644 index 1084926..0000000 --- a/angular-simple-slideshow.css +++ /dev/null @@ -1,12 +0,0 @@ -/* SLIDESHOW */ -#slideshow-wrap {} -#slideshow-wrap .slide-container {width:40%; float:left;} -#slideshow-wrap .slide-container img {width:100%;} -#slideshow-wrap .slides-wrap {float:right;} -#slideshow-wrap .slides-wrap ul {list-style-type: none; margin: 0; padding: 0; width:210px;} -#slideshow-wrap li {margin:0 10px 10px 0; float:left; width:60px;} -#slideshow-wrap li img {width:100%;} - -.picture-slides-fade-container.ng-hide-add, -.picture-slides-fade-container.ng-hide-remove {-webkit-transition:0.5s linear all; transition:0.5s linear all; } -.picture-slides-fade-container.ng-hide { height:0; opacity: 0} \ No newline at end of file diff --git a/angular-simple-slideshow.js b/angular-simple-slideshow.js deleted file mode 100644 index d1e3663..0000000 --- a/angular-simple-slideshow.js +++ /dev/null @@ -1,70 +0,0 @@ -var SlideShow = angular.module('simple-slideshow', ['template/slideshow.html', 'template/slide.html']); - -SlideShow.directive('slideshow', function(){ - return { - scope: { - - }, - controller: function($scope, $element, $attrs, $transclude) { - var ctrl = this, - slides = ctrl.slides = $scope.slides = []; - - ctrl.addSlide = function addSlide(slide){ - slides.push(slide); - }; - - ctrl.select = function(slide){ - $scope.currentslide = slide; - }; - }, - controllerAs: 'slideshowCtrl', - restrict: 'AE', - templateUrl: 'template/slideshow.html', - transclude: true, - link: function($scope, iElm, tAttrs){ - - } - }; -}); - -SlideShow.directive('slide', ['$parse', function($parse){ - return { - require: '^slideshow', - restrict: 'AE', - templateUrl: 'template/slide.html', - transclude: true, - replace: true, - compile: function(elm, attrs, transclude){ - return { - pre: function preLink(scope, elm, attrs, slideshowCtrl){ - elm.on('click', function(elm){ - scope.$apply(scope.select(scope.slide)); - }); - scope.select = function(slide){ - slideshowCtrl.select(slide); - }; - - slideshowCtrl.addSlide(scope.slide); - }, - post: function postLink(scope, elm, attrs, slideshowCtrl){ - slideshowCtrl.select(slideshowCtrl.slides[0]); - } - }; - } - }; -}]); - -angular.module("template/slideshow.html", []).run(["$templateCache", function($templateCache) { - $templateCache.put("template/slideshow.html", - '
' + - '
{{currentslide.name}}

{{currentslide.name}}

' + - '
' + - '
' - ); -}]); - -angular.module("template/slide.html", []).run(["$templateCache", function($templateCache) { - $templateCache.put("template/slide.html", - '
  • ' - ); -}]); \ No newline at end of file diff --git a/angular-simple-slideshow.min.js b/angular-simple-slideshow.min.js deleted file mode 100644 index ebd5dc9..0000000 --- a/angular-simple-slideshow.min.js +++ /dev/null @@ -1 +0,0 @@ -var SlideShow=angular.module("simple-slideshow",["template/slideshow.html","template/slide.html"]);SlideShow.directive("slideshow",function(){return{scope:{},controller:["$scope","$element","$attrs","$transclude",function($scope){var ctrl=this,slides=ctrl.slides=$scope.slides=[];ctrl.addSlide=function(slide){slides.push(slide)},ctrl.select=function(slide){$scope.currentslide=slide}}],controllerAs:"slideshowCtrl",restrict:"AE",templateUrl:"template/slideshow.html",transclude:!0,link:function(){}}}),SlideShow.directive("slide",["$parse",function(){return{require:"^slideshow",restrict:"AE",templateUrl:"template/slide.html",transclude:!0,replace:!0,compile:function(){return{pre:function(scope,elm,attrs,slideshowCtrl){elm.on("click",function(){scope.$apply(scope.select(scope.slide))}),scope.select=function(slide){slideshowCtrl.select(slide)},slideshowCtrl.addSlide(scope.slide)},post:function(scope,elm,attrs,slideshowCtrl){slideshowCtrl.select(slideshowCtrl.slides[0])}}}}}]),angular.module("template/slideshow.html",[]).run(["$templateCache",function($templateCache){$templateCache.put("template/slideshow.html",'
    {{currentslide.name}}

    {{currentslide.name}}

    ')}]),angular.module("template/slide.html",[]).run(["$templateCache",function($templateCache){$templateCache.put("template/slide.html",'
  • ')}]); \ No newline at end of file diff --git a/bower.json b/bower.json deleted file mode 100644 index 27bc950..0000000 --- a/bower.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "name": "angular-simple-slideshow", - "version": "0.0.3", - "homepage": "https://github.com/DevLab2425/angular-simple-slideshow", - "description": "A simple set of directives that creates a customizable slideshow.", - "authors": [ - "DevLab2425" - ], - "main": [ - "angular-simple-slideshow.js", - "angular-simple-slideshow.css" - ], - "keywords": [ - "angular", - "angularjs", - "angular.js", - "slideshow", - "slide show", - "angular slideshow", - "angular slide show" - ], - "license": "MIT", - "ignore": [ - "**/.*", - "node_modules", - "bower_components", - "test", - "tests" - ], - "dependencies": { - "angular": "~1.2.21", - "angular-animate": "~1.2.21" - } -} diff --git a/karma.conf.js b/karma.conf.js deleted file mode 100644 index a93a8ae..0000000 --- a/karma.conf.js +++ /dev/null @@ -1,61 +0,0 @@ -// Karma configuration - -module.exports = function(config){ - - config.set({ - // base path, that will be used to resolve files and exclude - basePath: '', - - // frameworks to use - frameworks: ['jasmine'], - - // list of files / patterns to load in the browser - files: [ - 'bower_components/angular/angular.js', - 'bower_components/angular-animate/angular-animate.js', - 'angular-simple-slideshow.js', - 'test/*.js' - ], - - // list of files to exclude - exclude: [], - - // test results reporter to use - // possible values: dots || progress || growl - reporters: ['progress'], - - // web server port - port: 9876, - - // cli runner port - runnerPort: 9100, - - // enable / disable colors in the output (reporters and logs) - colors: true, - - // level of logging - // possible values: LOG_DISABLE || LOG_ERROR || LOG_WARN || LOG_INFO || LOG_DEBUG - logLevel: config.LOG_INFO, - - // enable / disable watching file and executing tests whenever any file changes - autoWatch: false, - - // Start these browsers, currently available: - // - Chrome - // - ChromeCanary - // - Firefox - // - Opera - // - Safari (only Mac) - // - PhantomJS - // - IE (only Windows) - browsers: ['Chrome', 'Firefox', 'Safari'], - - // If browser does not capture in given timeout [ms], kill it - captureTimeout: 5000, - - // Continuous Integration mode - // if true, it capture browsers, run tests and exit - singleRun: false - - }); -} \ No newline at end of file diff --git a/package.json b/package.json deleted file mode 100644 index d119cd1..0000000 --- a/package.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "name": "angular-simple-slideshow", - "version": "0.0.3", - "title": "Angular Simple Slideshow", - "description": "A simple set of directives that creates a customizable slideshow.", - "main": "angular-simple-slideshow.js", - "directories": { - "test": "test" - }, - "scripts": { - "test": "grunt" - }, - "repository": { - "type": "git", - "url": "https://github.com/DevLab2425/angular-simple-slideshow.git" - }, - "keywords": [ - "angular", - "angularjs", - "angular.js", - "slideshow", - "slide show", - "angular slideshow", - "angular slide show" - ], - "author": { - "name": "DevLab2425", - "email": "devlab2425@gmail.com" - }, - "licenses": [ - { - "type": "MIT", - "url": "http://www.opensource.org/licenses/mit-license" - } - ], - "bugs": { - "url": "https://github.com/DevLab2425/angular-simple-slideshow/issues" - }, - "homepage": "https://github.com/DevLab2425/angular-simple-slideshow", - "dependencies": {}, - "devDependencies": { - "bower": "^1.3.9", - "grunt-cli": "^0.1.13", - "grunt": "^0.4.5", - "grunt-ngmin": "0.0.3", - "grunt-contrib-uglify": "^0.5.1", - "grunt-contrib-watch": "^0.6.1", - "karma": "^0.12.21", - "grunt-karma": "^0.8.3", - "grunt-contrib-jshint": "^0.10.0", - "grunt-bump": "0.0.15", - "matchdep": "^0.3.0", - "karma-jasmine": "^0.1.5", - "karma-chrome-launcher": "^0.1.4", - "karma-firefox-launcher": "^0.1.3", - "karma-safari-launcher": "^0.1.1", - "grunt-contrib-copy": "^0.5.0" - } -} diff --git a/test/angular-simple-slideshow.spec.js b/test/angular-simple-slideshow.spec.js deleted file mode 100644 index 6b647d2..0000000 --- a/test/angular-simple-slideshow.spec.js +++ /dev/null @@ -1,5 +0,0 @@ -describe('Simple Slideshow', function(){ - it('should return true', function(){ - expect(true).toBe(true); - }); -}); \ No newline at end of file