Skip to content

Commit

Permalink
Build 1.6.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Frank Ludwig committed Oct 17, 2019
1 parent 8fa4a67 commit 559fcfd
Show file tree
Hide file tree
Showing 52 changed files with 3,992 additions and 180 deletions.
95 changes: 74 additions & 21 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
module.exports = function (grunt) {
"use strict";

var assets = require('postcss-assets');

grunt.initConfig({

pkg: grunt.file.readJSON('package.json'),
Expand All @@ -11,8 +13,6 @@ module.exports = function (grunt) {
' *\n' +
' * Copyright (c) 2010 - <%= grunt.template.today("yyyy") %> <%= pkg.author.name %>\n' +
' * Licensed under the <%= pkg.license %> License.\n' +
' * https://raw.github.com/worseisbetter/galleria/master/LICENSE\n' +
' *\n' +
' */\n\n',

clean: {
Expand All @@ -28,28 +28,24 @@ module.exports = function (grunt) {
'dist/<%= pkg.name %>.min.js': ['src/<%= pkg.name %>.js'],
'dist/plugins/flickr/<%= pkg.name %>.flickr.min.js': ['src/plugins/flickr/<%= pkg.name %>.flickr.js'],
'dist/plugins/history/<%= pkg.name %>.history.min.js': ['src/plugins/history/<%= pkg.name %>.history.js'],
'dist/themes/classic/<%= pkg.name %>.classic.min.js': ['src/themes/classic/<%= pkg.name %>.classic.js'],
'dist/themes/fullscreen/<%= pkg.name %>.fullscreen.min.js': ['src/themes/fullscreen/<%= pkg.name %>.fullscreen.js']
}
}
},

cssmin: {
dist: {
files: {
'dist/themes/classic/<%= pkg.name %>.classic.min.css': ['src/themes/classic/<%= pkg.name %>.classic.css'],
'dist/themes/fullscreen/<%= pkg.name %>.fullscreen.min.css': ['src/themes/fullscreen/<%= pkg.name %>.fullscreen.css']
}
}
},

replace: {
dist: {
src: ['src/themes/*/demo-cdn.html', 'README.rst'],
overwrite: true,
replacements: [{
from: /\/libs\/galleria\/[0-9]{1,2}\.[0-9]{1,2}\.[0-9]{1,2}\//g,
to: '\/libs/galleria/<%= pkg.version %>/'
options: {
patterns: [
{
match: /\/libs\/galleria\/[0-9]{1,2}\.[0-9]{1,2}\.[0-9]{1,2}\//g,
replacement: '\/libs/galleria/<%= pkg.version %>/'
}
],
usePrefix: false,
},
files: [{
expand: true,
src: ['src/themes/*/demo-cdn.html', 'README.rst']
}]
}
},
Expand All @@ -59,21 +55,78 @@ module.exports = function (grunt) {
files: [{
expand: true,
cwd: 'src/',
src: ['**/*'],
src: ['**/*.html', '**/*.js'],
dest: 'dist'
}]
}
}

});

grunt.loadNpmTasks('grunt-text-replace');
var themes = ['azur', 'folio', 'fullscreen', 'miniml', 'twelve', 'classic'];
themes.forEach(function(name) {

grunt.config(['uglify', name], {
options: {
banner: '<%= banner %>'
},

files: [{
src: 'src/themes/' + name + '/galleria.' + name + '.js',
dest: 'dist/themes/' + name + '/galleria.' + name + '.min.js'
}]
});

grunt.config(['postcss', name], {
options: {
processors: [
assets()
]
},
files: [{
src: 'src/themes/' + name + '/galleria-inline.' + name + '.css',
dest: 'dist/themes/' + name + '/galleria.' + name + '.css'
}]
});

grunt.config(['cssmin', name], {
files: [{
src: 'dist/themes/' + name + '/galleria.' + name + '.css',
dest: 'dist/themes/' + name + '/galleria.' + name + '.min.css'
}]
});

});

grunt.config(['replace', 'inline'], {
options: {
patterns: [
{
match: 'url(',
replacement: 'inline('
}
],
usePrefix: false,
},
files: [{
expand: true,
cwd: 'src/',
src: ['themes/*/galleria.*.css'],
dest: 'src/',
rename: function(destBase, destPath) {
return destBase+destPath.replace('galleria.', 'galleria-inline.');
}
}]
});

grunt.loadNpmTasks('grunt-replace');
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-cssmin');
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-postcss');

// Default task(s).
grunt.registerTask('default', ['clean', 'uglify', 'cssmin', 'replace', 'copy']);
grunt.registerTask('default', ['clean', 'replace', 'uglify', 'postcss', 'cssmin', 'copy']);

};
6 changes: 3 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ Info, demos, docs and everything else: https://galleria.io
Documentation
=============

https://docs.galleria.io
https://galleria.io/docs


FAQ
=============

https://docs.galleria.io/references/faq.html
https://galleria.io/docs/references/faq.html


Installation
Expand Down Expand Up @@ -46,6 +46,6 @@ CDN
---
::

<script src="https://cdnjs.cloudflare.com/ajax/libs/galleria/1.6.0/galleria.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/galleria/1.6.1/galleria.min.js"></script>

https://cdnjs.com/libraries/galleria
8 changes: 3 additions & 5 deletions dist/galleria.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
/**
* Galleria v1.6.0 2019-10-13
* http://galleria.io
* Galleria v1.6.1
*
* Copyright (c) 2010 - 2019 worse is better UG
* Licensed under the MIT license
* https://raw.github.com/worseisbetter/galleria/master/LICENSE
*
*/

Expand Down Expand Up @@ -40,7 +38,7 @@ var doc = window.document,
protoArray = Array.prototype,

// internal constants
VERSION = 1.60,
VERSION = 1.61,
DEBUG = true,
TIMEOUT = 30000,
DUMMY = false,
Expand Down Expand Up @@ -904,7 +902,7 @@ var doc = window.document,
// If failed, tell the dev to download the latest theme
Galleria.raise( 'Theme CSS could not load after 20 sec. ' + ( Galleria.QUIRK ?
'Your browser is in Quirks Mode, please add a correct doctype.' :
'Please download the latest theme at http://galleria.io/customer/.' ), true );
'Please download the latest theme.' ), true );
},
timeout: 5000
});
Expand Down
12 changes: 5 additions & 7 deletions dist/galleria.min.js

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions dist/plugins/flickr/demo.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@ <h1>Galleria Flickr Plugin Demo</h1>

<div id="galleria"></div>

<p class="cred">Made by <a href="http://galleria.io">Galleria</a>.</p>
<a href="#" id="close">cloase</a>
<a href="#" id="close">close</a>
</div>
<script>
$(function() {
Expand Down
11 changes: 3 additions & 8 deletions dist/plugins/flickr/galleria.flickr.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
/**
* Galleria Flickr Plugin 2019-10-13
* http://galleria.io
* Galleria Flickr Plugin
*
* Copyright (c) 2010 - 2019 worse is better UG
* Licensed under the MIT license
* https://raw.github.com/worseisbetter/galleria/master/LICENSE
*
* Copyright (c) 2010 - 2019 worse is better UG
* Licensed under the MIT License.
*/


( function( window, factory ) {
if ( typeof define == 'function' && define.amd ) {
define( ['../galleria', 'jquery' ], function( Galleria, jQuery ) {
Expand Down Expand Up @@ -43,8 +40,6 @@ var PATH = Galleria.utils.getScriptPath();
@example var flickr = new Galleria.Flickr();
@author http://galleria.io
@requires jQuery
@requires Galleria
Expand Down
6 changes: 2 additions & 4 deletions dist/plugins/flickr/galleria.flickr.min.js

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

2 changes: 0 additions & 2 deletions dist/plugins/history/demo.html
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,6 @@ <h1>Galleria History Plugin</h1>
<img src="http://upload.wikimedia.org/wikipedia/commons/thumb/e/e6/Antennae%2C_Hubble_images.jpg/100px-Antennae%2C_Hubble_images.jpg">
</a>
</div>

<p class="cred">Made by <a href="http://galleria.io">Galleria</a>.</p>
</div>

<script>
Expand Down
8 changes: 3 additions & 5 deletions dist/plugins/history/galleria.history.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
/**
* Galleria History Plugin 2019-10-13
* http://galleria.io
* Galleria History Plugin
*
* Copyright (c) 2010 - 2019 worse is better UG
* Licensed under the MIT license
* https://raw.github.com/worseisbetter/galleria/master/LICENSE
*
* Copyright (c) 2010 - 2019 worse is better UG
* Licensed under the MIT License.
*/

( function( window, factory ) {
Expand Down
6 changes: 2 additions & 4 deletions dist/plugins/history/galleria.history.min.js

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

Loading

0 comments on commit 559fcfd

Please sign in to comment.