Skip to content

Commit

Permalink
Add build process and new version of files
Browse files Browse the repository at this point in the history
  • Loading branch information
niksy committed Nov 3, 2013
1 parent 872fd0c commit 2208d66
Show file tree
Hide file tree
Showing 6 changed files with 73 additions and 21 deletions.
9 changes: 1 addition & 8 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1 @@
# Build and Release Folders
bin/
bin-debug/
bin-release/

# Other files and folders
.settings/
.DS_Store
node_modules
3 changes: 0 additions & 3 deletions .gitmodules

This file was deleted.

42 changes: 42 additions & 0 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
module.exports = function (grunt) {

grunt.initConfig({

pkg: grunt.file.readJSON('package.json'),
meta: {
banner: '<%= pkg.name %> v<%= pkg.version %> - <%= pkg.description %>. Authors & copyright (c) <%= grunt.template.today("yyyy") %>: WebLinc, <%= pkg.author %>. Forked & modified by <%= pkg.contributors[0] %>',
defaultBanner: '/* <%= meta.banner %> */\n',
unstrippedBanner: '/*! <%= meta.banner %> */\n'
},

concat: {
options: {
stripBanners: true,
banner: '<%= meta.defaultBanner %>'
},
dist: {
src: ['picture.js'],
dest: 'picture.js'
}
},

uglify: {
options: {
banner: '<%= meta.unstrippedBanner %>'
},
dist: {
files: {
'picture.min.js': ['picture.js']
}
}
}

});

grunt.loadNpmTasks( 'grunt-contrib-concat' );
grunt.loadNpmTasks( 'grunt-contrib-uglify' );

grunt.registerTask( 'default', ['concat:dist', 'uglify:dist'] );

};

27 changes: 27 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"name": "Picture",
"version": "2.3.0",
"description": "Picture element polyfill for responsive images",
"main": "picture.js",
"directories": {
"test": "test"
},
"repository": {
"type": "git",
"url": "git://github.com/niksy/picture.git"
},
"author": "David Knight",
"contributors": [
"Ivan Nikolić"
],
"license": "MIT",
"bugs": {
"url": "https://github.com/niksy/picture/issues"
},
"dependencies": {},
"devDependencies": {
"grunt": "~0.4.1",
"grunt-contrib-uglify": "~0.2.5",
"grunt-contrib-concat": "~0.3.0"
}
}
4 changes: 1 addition & 3 deletions picture.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
/* Picture v2.2.0 - Picture element polyfill for responsive images. Authors & copyright (c) 2013: WebLinc, David Knight. */

// Picture
/* Picture v2.3.0 - Picture element polyfill for responsive images. Authors & copyright (c) 2013: WebLinc, David Knight. Forked & modified by Ivan Nikolić */
('HTMLPictureElement' in window) || (function(win) {
'use strict';

Expand Down
9 changes: 2 additions & 7 deletions picture.min.js

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

0 comments on commit 2208d66

Please sign in to comment.