Skip to content

Commit

Permalink
src dist structure
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolas-t committed Jul 19, 2015
1 parent 97d0e89 commit c22c0e0
Show file tree
Hide file tree
Showing 30 changed files with 981 additions and 45 deletions.
4 changes: 2 additions & 2 deletions bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"name": "chocolat",
"version": "0.4.7",
"main": [
"css/chocolat.css",
"js/jquery.chocolat.js"
"dist/css/chocolat.css",
"dist/js/jquery.chocolat.js"
],
"license": "CC-BY-2.0",
"dependencies": {
Expand Down
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
28 changes: 14 additions & 14 deletions index.html → dist/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
<html>
<head>
<meta charset="utf-8" />
<link rel="stylesheet" href="css/chocolat.css" />
<link rel="stylesheet" href="./css/chocolat.css" />
<script type="text/javascript" src="http://code.jquery.com/jquery-1.10.2.min.js"></script>
<script type="text/javascript" src="js/jquery.chocolat.js"></script>
<script type="text/javascript" src="./js/jquery.chocolat.js"></script>
<style>
body {
text-align: center;
Expand Down Expand Up @@ -145,65 +145,65 @@ <h2>
$('.api-open').on('click', function(e) {
e.preventDefault()

console.debug('open start');
console.log('open start');
var def = instance.api().open()

def.done(function(){
console.debug('open done');
console.log('open done');
})
})
$('.api-close').on('click', function(e) {
e.preventDefault()

console.debug('close start');
console.log('close start');
var def = instance.api().close()

def.done(function(){
console.debug('close done');
console.log('close done');
})
})
$('.api-prev').on('click', function(e) {
e.preventDefault()

console.debug('prev start');
console.log('prev start');
var def = instance.api().prev()

def.done(function(){
console.debug('prev done');
console.log('prev done');
})
})
$('.api-next').on('click', function(e) {
e.preventDefault()

console.debug('next start');
console.log('next start');
var def = instance.api().next()

def.done(function(){
console.debug('next done');
console.log('next done');
})
})

$('.api-cover').on('click', function(e) {
e.preventDefault()

console.debug('cover mode start')
console.log('cover mode start')
instance.api().set('fullWindow', 'cover')
var def = instance.api().place()

def.done(function(){
console.debug('cover mode done')
console.log('cover mode done')
})
})

$('.api-contain').on('click', function(e) {
e.preventDefault()

console.debug('contain mode start')
console.log('contain mode start')
instance.api().set('fullWindow', 'contain')
var def = instance.api().place()

def.done(function(){
console.debug('contain mode done')
console.log('contain mode done')
})
})
});
Expand Down
7 changes: 0 additions & 7 deletions js/jquery.chocolat.js → dist/js/jquery.chocolat.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
/*
** @author : Nicolas Turlais : nicolas-at-insipi.de
** @version : V0.4.6 - 4th of July 2015
** @license : Licensed under CCAttribution-ShareAlike
** @website : http://chocolat.insipi.de
*/

; (function($, window, document, undefined) {
var calls = 0;
var defaults = {
Expand Down
1 change: 1 addition & 0 deletions dist/js/jquery.chocolat.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

45 changes: 35 additions & 10 deletions gulpfile.coffee
Original file line number Diff line number Diff line change
@@ -1,33 +1,58 @@
gulp = require 'gulp'
gutil = require 'gulp-util'
rename = require('gulp-rename');
uglify = require 'gulp-uglify'
coffee = require 'gulp-coffee'
bump = require 'gulp-bump'
mochaPhantomJS = require('gulp-mocha-phantomjs')
mochaPhantomJS = require 'gulp-mocha-phantomjs'

gulp.task 'compile-coffee', ->
gulp.src './test/src/*.coffee'
gulp.src './test/*.coffee'
.pipe coffee({bare: true}).on('error', gutil.log)
.pipe gulp.dest './test/'

gulp.task 'watch',->
gulp.watch(['./test/src/*.coffee'], ['compile-coffee', 'testing'])

gulp.task 'testing', ->
gulp.src('./test/index.html')
.pipe(mochaPhantomJS());

gulp.task 'default', [
'compile-coffee'
'watch'
]
gulp.task 'build-js', ->
gulp.src('./src/js/jquery.chocolat.js')
.pipe gulp.dest('./dist/js/')
.pipe(rename('jquery.chocolat.min.js'))
.pipe(uglify())
.pipe gulp.dest('./dist/js/')

gulp.task 'build-css', ->
gulp.src('./src/css/chocolat.css')
.pipe gulp.dest('./dist/css/')

gulp.task 'build-images', ->
gulp.src('./src/images/*')
.pipe gulp.dest('./dist/images/')

gulp.task 'bump', ->
gulp.src(['./package.json', './bower.json'])
.pipe(bump())
.pipe gulp.dest('./')

gulp.task 'watch-test',->
gulp.watch(['./test/*.coffee', './src/js/*.js', './src/css/*.css'], ['build', 'compile-coffee', 'testing'])

gulp.task 'watch-src',->
gulp.watch(['./src/js/*.js', './src/css/*.css'], ['build-js', 'build-css'])

gulp.task 'test', [
'build'
'compile-coffee'
'testing'
'watch'
'watch-test'
]
gulp.task 'build', [
'build-js'
'build-css'
'build-images'
]
gulp.task 'default', [
'build'
'watch-src'
]
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
"gulp-bump": "^0.3.1",
"gulp-coffee": "^2.3.1",
"gulp-mocha-phantomjs": "^0.6.1",
"gulp-rename": "^1.2.2",
"gulp-uglify": "^1.2.0",
"gulp-util": "^3.0.6"
},
"scripts": {
Expand Down
3 changes: 2 additions & 1 deletion readme.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
##Chocolat [![Build Status](https://travis-ci.org/nicolas-t/Chocolat.svg?branch=master)](https://travis-ci.org/nicolas-t/Chocolat)
-----------
Chocolat is a responsive jQuery lightbox plugin
Chocolat is a responsive jQuery lightbox plugin
What you are looking for is in the `/dist/` folder`.

#### Dependencies

Expand Down
Loading

0 comments on commit c22c0e0

Please sign in to comment.