Skip to content

Commit

Permalink
Add Grunt and dist files, correct copyright.
Browse files Browse the repository at this point in the history
  • Loading branch information
Frank Ludwig committed Sep 7, 2016
1 parent 8b18694 commit 5c67146
Show file tree
Hide file tree
Showing 32 changed files with 8,616 additions and 11 deletions.
3 changes: 3 additions & 0 deletions .gitignore
@@ -1,6 +1,9 @@
.idea
.DS_Store
._*
_build
*.swp
*.swo
docs/jsdoc/html
node_modules/
bower_components/
65 changes: 65 additions & 0 deletions Gruntfile.js
@@ -0,0 +1,65 @@
module.exports = function (grunt) {
"use strict";

grunt.initConfig({

pkg: grunt.file.readJSON('package.json'),

banner: '/**\n' +
' * Galleria - v<%= pkg.version %> <%= grunt.template.today("yyyy-mm-dd") %>\n' +
' * <%= pkg.homepage %>\n' +
' *\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: {
files: ['dist']
},

uglify: {
options: {
banner: '<%= banner %>'
},
dist: {
files: {
'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/plugins/picasa/<%= pkg.name %>.picasa.min.js': ['src/plugins/picasa/<%= pkg.name %>.picasa.js'],
'dist/themes/classic/<%= pkg.name %>.classic.min.js': ['src/themes/classic/<%= pkg.name %>.classic.js']
}
}
},

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

copy: {
main: {
files: [{
expand: true,
cwd: 'src/',
src: ['**/*'],
dest: 'dist'
}]
}
}
});

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

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

};
2 changes: 1 addition & 1 deletion LICENSE
@@ -1,6 +1,6 @@
The MIT License

Copyright (c) 2016 worse is better http://wib.io
Copyright (c) 2016 worse is better UG http://wib.io

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion bower.json
Expand Up @@ -8,7 +8,7 @@
"Frank Ludwig <frank@wib.io> (http://wib.io)"
],
"main": [
"src/galleria.js"
"dist/galleria.js"
],
"dependencies": {
"jquery": ">= 1.9.0"
Expand Down

0 comments on commit 5c67146

Please sign in to comment.