Skip to content

Commit

Permalink
v1.8.0
Browse files Browse the repository at this point in the history
  • Loading branch information
FrDH committed Mar 9, 2016
1 parent a3968f1 commit ec24d45
Show file tree
Hide file tree
Showing 10 changed files with 100 additions and 35 deletions.
9 changes: 8 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,9 @@
# Ignore Mac system files.
._*
._*

# Ignore sass-cache files.
*.sass-cache*
*.scssc

# Ignore Gulp modules
node_modules
11 changes: 0 additions & 11 deletions Guardfile

This file was deleted.

4 changes: 2 additions & 2 deletions bower.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "jQuery.dotdotdot",
"main": "src/js/jquery.dotdotdot.js",
"version": "1.7.5",
"main": "src/jquery.dotdotdot.min.umd.js",
"version": "1.8.0",
"homepage": "http://dotdotdot.frebsite.nl/",
"authors": [
"Fred Heusschen <[email protected]>"
Expand Down
2 changes: 1 addition & 1 deletion dotdotdot.jquery.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "dotdotdot",
"version": "1.7.5",
"version": "1.8.0",
"title": "jQuery dotdotdot",
"description": "A jQuery plugin for advanced cross-browser ellipsis on multiple line content.",
"homepage": "http://dotdotdot.frebsite.nl",
Expand Down
46 changes: 46 additions & 0 deletions gulpfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
// npm install gulp-uglify gulp-rename gulp-umd --save-dev

var gulp = require( 'gulp' ),
uglify = require( 'gulp-uglify' ),
rename = require( 'gulp-rename' ),
umd = require( 'gulp-umd' );



// Default task 'gulp': Runs JS tasks
gulp.task( 'default', function() {
gulp.start( 'js' );
});



// Watch task 'gulp watch': Starts a watch on JS tasks
gulp.task( 'watch', function() {
gulp.watch( 'src/*.js', [ 'js' ] );
});



// JS task 'gulp js': Runs all JS tasks
gulp.task( 'js', function() {
return gulp.src( 'src/jquery.dotdotdot.js' )
// .pipe( jshint('.jshintrc') )
// .pipe( jshint.reporter( 'default' ) )
.pipe( uglify({ preserveComments: 'license' }) )
.pipe( rename({ suffix: '.min' }) )
.pipe( gulp.dest( 'src' ) )
.pipe( umd({
dependencies: function() { return [ 'jQuery' ]; },
exports: function() { return true; },
namespace: sanitizeNamespaceForUmd
}))
.pipe( rename({ suffix: '.umd' }) )
.pipe( gulp.dest( 'src' ) );
});

function sanitizeNamespaceForUmd( file ) {
path = file.path.split( '\\' ).join( '/' ).split( '/' );
path = path[ path.length - 1 ];
return path.split( '.' ).join( '_' );
}

4 changes: 2 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<title>dotdotdot, advanced cross-browser ellipsis for multiple line content.</title>

<script type="text/javascript" src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script type="text/javascript" language="javascript" src="src/js/jquery.dotdotdot.js"></script>
<script type="text/javascript" language="javascript" src="src/jquery.dotdotdot.js"></script>
<script type="text/javascript" language="javascript">
$(function() {
$('#dot1').dotdotdot();
Expand Down Expand Up @@ -85,7 +85,7 @@
text-decoration: underline;
}
a:hover {
color: #9E1F63;
color: blue;
}


Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"name": "jquery.dotdotdot",
"main": "src/js/jquery.dotdotdot.js",
"version": "1.7.5",
"main": "src/jquery.dotdotdot.min.umd.js",
"version": "1.8.0",
"homepage": "http://dotdotdot.frebsite.nl/",
"repository": {
"type": "git",
"url": "https://github.com/BeSite/jQuery.dotdotdot.git"
"url": "https://github.com/FrDH/jQuery.dotdotdot.git"
},
"author": "Fred Heusschen <[email protected]>",
"description": "A jQuery plugin for advanced cross-browser ellipsis on multiple line content.",
Expand Down
5 changes: 2 additions & 3 deletions src/js/jquery.dotdotdot.js → src/jquery.dotdotdot.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* jQuery dotdotdot 1.7.5
* jQuery dotdotdot 1.8.0
*
* Copyright (c) Fred Heusschen
* www.frebsite.nl
Expand All @@ -10,7 +10,6 @@
* Licensed under the MIT license.
* http://en.wikipedia.org/wiki/MIT_License
*/
var jQuery = jQuery || require && require('jquery');

(function( $, undef )
{
Expand Down Expand Up @@ -182,7 +181,7 @@ var jQuery = jQuery || require && require('jquery');
.end()
.append( orgContent )
.attr( 'style', $dot.data( 'dotdotdot-style' ) || '' )
.removeClass('is-truncated')
.removeClass( 'is-truncated' )
.data( 'dotdotdot', false );
}
);
Expand Down
24 changes: 12 additions & 12 deletions src/js/jquery.dotdotdot.min.js → src/jquery.dotdotdot.min.js

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

Loading

0 comments on commit ec24d45

Please sign in to comment.