Skip to content

Commit 559fcfd

Browse files
author
Frank Ludwig
committed
Build 1.6.1
1 parent 8fa4a67 commit 559fcfd

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+3992
-180
lines changed

Gruntfile.js

Lines changed: 74 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
module.exports = function (grunt) {
22
"use strict";
33

4+
var assets = require('postcss-assets');
5+
46
grunt.initConfig({
57

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

1818
clean: {
@@ -28,28 +28,24 @@ module.exports = function (grunt) {
2828
'dist/<%= pkg.name %>.min.js': ['src/<%= pkg.name %>.js'],
2929
'dist/plugins/flickr/<%= pkg.name %>.flickr.min.js': ['src/plugins/flickr/<%= pkg.name %>.flickr.js'],
3030
'dist/plugins/history/<%= pkg.name %>.history.min.js': ['src/plugins/history/<%= pkg.name %>.history.js'],
31-
'dist/themes/classic/<%= pkg.name %>.classic.min.js': ['src/themes/classic/<%= pkg.name %>.classic.js'],
32-
'dist/themes/fullscreen/<%= pkg.name %>.fullscreen.min.js': ['src/themes/fullscreen/<%= pkg.name %>.fullscreen.js']
33-
}
34-
}
35-
},
36-
37-
cssmin: {
38-
dist: {
39-
files: {
40-
'dist/themes/classic/<%= pkg.name %>.classic.min.css': ['src/themes/classic/<%= pkg.name %>.classic.css'],
41-
'dist/themes/fullscreen/<%= pkg.name %>.fullscreen.min.css': ['src/themes/fullscreen/<%= pkg.name %>.fullscreen.css']
4231
}
4332
}
4433
},
4534

4635
replace: {
4736
dist: {
48-
src: ['src/themes/*/demo-cdn.html', 'README.rst'],
49-
overwrite: true,
50-
replacements: [{
51-
from: /\/libs\/galleria\/[0-9]{1,2}\.[0-9]{1,2}\.[0-9]{1,2}\//g,
52-
to: '\/libs/galleria/<%= pkg.version %>/'
37+
options: {
38+
patterns: [
39+
{
40+
match: /\/libs\/galleria\/[0-9]{1,2}\.[0-9]{1,2}\.[0-9]{1,2}\//g,
41+
replacement: '\/libs/galleria/<%= pkg.version %>/'
42+
}
43+
],
44+
usePrefix: false,
45+
},
46+
files: [{
47+
expand: true,
48+
src: ['src/themes/*/demo-cdn.html', 'README.rst']
5349
}]
5450
}
5551
},
@@ -59,21 +55,78 @@ module.exports = function (grunt) {
5955
files: [{
6056
expand: true,
6157
cwd: 'src/',
62-
src: ['**/*'],
58+
src: ['**/*.html', '**/*.js'],
6359
dest: 'dist'
6460
}]
6561
}
6662
}
6763

6864
});
6965

70-
grunt.loadNpmTasks('grunt-text-replace');
66+
var themes = ['azur', 'folio', 'fullscreen', 'miniml', 'twelve', 'classic'];
67+
themes.forEach(function(name) {
68+
69+
grunt.config(['uglify', name], {
70+
options: {
71+
banner: '<%= banner %>'
72+
},
73+
74+
files: [{
75+
src: 'src/themes/' + name + '/galleria.' + name + '.js',
76+
dest: 'dist/themes/' + name + '/galleria.' + name + '.min.js'
77+
}]
78+
});
79+
80+
grunt.config(['postcss', name], {
81+
options: {
82+
processors: [
83+
assets()
84+
]
85+
},
86+
files: [{
87+
src: 'src/themes/' + name + '/galleria-inline.' + name + '.css',
88+
dest: 'dist/themes/' + name + '/galleria.' + name + '.css'
89+
}]
90+
});
91+
92+
grunt.config(['cssmin', name], {
93+
files: [{
94+
src: 'dist/themes/' + name + '/galleria.' + name + '.css',
95+
dest: 'dist/themes/' + name + '/galleria.' + name + '.min.css'
96+
}]
97+
});
98+
99+
});
100+
101+
grunt.config(['replace', 'inline'], {
102+
options: {
103+
patterns: [
104+
{
105+
match: 'url(',
106+
replacement: 'inline('
107+
}
108+
],
109+
usePrefix: false,
110+
},
111+
files: [{
112+
expand: true,
113+
cwd: 'src/',
114+
src: ['themes/*/galleria.*.css'],
115+
dest: 'src/',
116+
rename: function(destBase, destPath) {
117+
return destBase+destPath.replace('galleria.', 'galleria-inline.');
118+
}
119+
}]
120+
});
121+
122+
grunt.loadNpmTasks('grunt-replace');
71123
grunt.loadNpmTasks('grunt-contrib-clean');
72124
grunt.loadNpmTasks('grunt-contrib-uglify');
73125
grunt.loadNpmTasks('grunt-contrib-cssmin');
74126
grunt.loadNpmTasks('grunt-contrib-copy');
127+
grunt.loadNpmTasks('grunt-postcss');
75128

76129
// Default task(s).
77-
grunt.registerTask('default', ['clean', 'uglify', 'cssmin', 'replace', 'copy']);
130+
grunt.registerTask('default', ['clean', 'replace', 'uglify', 'postcss', 'cssmin', 'copy']);
78131

79132
};

README.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@ Info, demos, docs and everything else: https://galleria.io
1212
Documentation
1313
=============
1414

15-
https://docs.galleria.io
15+
https://galleria.io/docs
1616

1717

1818
FAQ
1919
=============
2020

21-
https://docs.galleria.io/references/faq.html
21+
https://galleria.io/docs/references/faq.html
2222

2323

2424
Installation
@@ -46,6 +46,6 @@ CDN
4646
---
4747
::
4848

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

5151
https://cdnjs.com/libraries/galleria

dist/galleria.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
/**
2-
* Galleria v1.6.0 2019-10-13
3-
* http://galleria.io
2+
* Galleria v1.6.1
43
*
54
* Copyright (c) 2010 - 2019 worse is better UG
65
* Licensed under the MIT license
7-
* https://raw.github.com/worseisbetter/galleria/master/LICENSE
86
*
97
*/
108

@@ -40,7 +38,7 @@ var doc = window.document,
4038
protoArray = Array.prototype,
4139

4240
// internal constants
43-
VERSION = 1.60,
41+
VERSION = 1.61,
4442
DEBUG = true,
4543
TIMEOUT = 30000,
4644
DUMMY = false,
@@ -904,7 +902,7 @@ var doc = window.document,
904902
// If failed, tell the dev to download the latest theme
905903
Galleria.raise( 'Theme CSS could not load after 20 sec. ' + ( Galleria.QUIRK ?
906904
'Your browser is in Quirks Mode, please add a correct doctype.' :
907-
'Please download the latest theme at http://galleria.io/customer/.' ), true );
905+
'Please download the latest theme.' ), true );
908906
},
909907
timeout: 5000
910908
});

dist/galleria.min.js

Lines changed: 5 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/plugins/flickr/demo.html

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,7 @@ <h1>Galleria Flickr Plugin Demo</h1>
3838

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

41-
<p class="cred">Made by <a href="http://galleria.io">Galleria</a>.</p>
42-
<a href="#" id="close">cloase</a>
41+
<a href="#" id="close">close</a>
4342
</div>
4443
<script>
4544
$(function() {

dist/plugins/flickr/galleria.flickr.js

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
11
/**
2-
* Galleria Flickr Plugin 2019-10-13
3-
* http://galleria.io
2+
* Galleria Flickr Plugin
43
*
5-
* Copyright (c) 2010 - 2019 worse is better UG
6-
* Licensed under the MIT license
7-
* https://raw.github.com/worseisbetter/galleria/master/LICENSE
84
*
5+
* Copyright (c) 2010 - 2019 worse is better UG
6+
* Licensed under the MIT License.
97
*/
108

11-
129
( function( window, factory ) {
1310
if ( typeof define == 'function' && define.amd ) {
1411
define( ['../galleria', 'jquery' ], function( Galleria, jQuery ) {
@@ -43,8 +40,6 @@ var PATH = Galleria.utils.getScriptPath();
4340
4441
@example var flickr = new Galleria.Flickr();
4542
46-
@author http://galleria.io
47-
4843
@requires jQuery
4944
@requires Galleria
5045

dist/plugins/flickr/galleria.flickr.min.js

Lines changed: 2 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/plugins/history/demo.html

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,6 @@ <h1>Galleria History Plugin</h1>
8383
<img src="http://upload.wikimedia.org/wikipedia/commons/thumb/e/e6/Antennae%2C_Hubble_images.jpg/100px-Antennae%2C_Hubble_images.jpg">
8484
</a>
8585
</div>
86-
87-
<p class="cred">Made by <a href="http://galleria.io">Galleria</a>.</p>
8886
</div>
8987

9088
<script>

dist/plugins/history/galleria.history.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
/**
2-
* Galleria History Plugin 2019-10-13
3-
* http://galleria.io
2+
* Galleria History Plugin
43
*
5-
* Copyright (c) 2010 - 2019 worse is better UG
6-
* Licensed under the MIT license
7-
* https://raw.github.com/worseisbetter/galleria/master/LICENSE
84
*
5+
* Copyright (c) 2010 - 2019 worse is better UG
6+
* Licensed under the MIT License.
97
*/
108

119
( function( window, factory ) {

dist/plugins/history/galleria.history.min.js

Lines changed: 2 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)