Permalink
Browse files

Updates

  • Loading branch information...
stefangabos committed Jun 11, 2017
1 parent a02b1ec commit c0e6440ddb16b0511534bff55f87befbaa688592
Showing with 168 additions and 49 deletions.
  1. +1 −2 .gitignore
  2. +9 −2 .npmignore
  3. +131 −24 Gruntfile.js
  4. +9 −6 bower.json
  5. +18 −15 package.json
View
@@ -1,3 +1,2 @@
todo.txt
node_modules/*
.gitattributes
node_modules/*
View
@@ -1,6 +1,13 @@
todo.txt
examples/README.md
examples/screenshot.png
examples/screenshot-flat.png
node_modules/*
src/*
.gitattributes
.gitignore
.npmignore
bower.json
Gruntfile.js
eslint.json
Gruntfile.js
package.json
todo.txt
View
@@ -1,52 +1,159 @@
'use strict';
module.exports = function(grunt) {
var source_files = ['public/javascript/zebra_datepicker.src.js'];
// show time spent on each task
require('time-grunt')(grunt);
grunt.initConfig({
// load packages.json
pkg: grunt.file.readJSON('package.json'),
// configure plugins
/***************************************************************************************************************
* NOTIFY
* https://github.com/dylang/grunt-notify
**************************************************************************************************************/
'notify': {
done: {
options: {
title: 'Grunt ',
message: 'All tasks were successfully completed!'
}
}
},
/***************************************************************************************************************
* SASS
* https://www.npmjs.org/package/grunt-sass
**************************************************************************************************************/
'sass': {
expanded: {
options: {
outputStyle: 'expanded',
indentWidth: 4
},
files: {
'dist/css/default/zebra_datepicker.css': 'src/css/default/zebra_datepicker.scss',
'dist/css/flat/zebra_datepicker.css': 'src/css/flat/zebra_datepicker.scss'
}
},
minified: {
options: {
outputStyle: 'compressed'
},
files: {
'dist/css/default/zebra_datepicker.min.css': 'src/css/default/zebra_datepicker.scss',
'dist/css/flat/zebra_datepicker.min.css': 'src/css/flat/zebra_datepicker.scss'
}
}
},
/***************************************************************************************************************
* ESLINT
* http://eslint.org/docs/rules/
**************************************************************************************************************/
'eslint' : {
options: {
configFile: 'eslint.json'
},
src: ['src/zebra_datepicker.src.js']
},
/***************************************************************************************************************
* JSHINT
* https://npmjs.org/package/grunt-contrib-jshint
**************************************************************************************************************/
'jshint': {
options: {
strict: false, // requires all functions to run in ECMAScript 5's strict mode
asi: true, // suppresses warnings about missing semicolons
globals: { // white list of global variables that are not formally defined in the source code
'$': true,
'alert': true,
'console': true,
'jQuery': true
},
browser: true, // defines globals exposed by modern browsers (like `document` and `navigator`)
bitwise: true, // prohibits the use of bitwise operators such as ^ (XOR), | (OR) and others
curly: false, // whether to always put curly braces around blocks in loops and conditionals
eqeqeq: true, // this options prohibits the use of == and != in favor of === and !==
freeze: true, // this options prohibits overwriting prototypes of native objects such as Array, Date and so on
scripturl: true, // allow use of scripts
nonew: true, // this option prohibits the use of constructor functions without assigning them to a variable
loopfunc: true, // allow functions to be defined inside loops
undef: true // this option prohibits the use of explicitly undeclared variables
},
src: ['src/zebra_datepicker.src.js']
},
/***************************************************************************************************************
* UGLIFY
* https://npmjs.org/package/grunt-contrib-uglify
**************************************************************************************************************/
'uglify': {
options: {
compress: true,
mangle: true,
beautify: false
},
build: {
src: source_files,
dest: 'public/javascript/zebra_datepicker.js'
src: 'src/zebra_datepicker.src.js',
dest: 'dist/zebra_datepicker.min.js'
}
},
'jshint': {
files: source_files,
options: {
browser: true,
indent: false,
quotmark: 'single',
strict: true,
trailing: true,
loopfunc: true,
scripturl: true,
boss: true,
sub: true
/***************************************************************************************************************
* COPY
* https://github.com/gruntjs/grunt-contrib-copy
**************************************************************************************************************/
'copy': {
all: {
files: [
{ src: 'src/zebra_datepicker.src.js', dest: 'dist/zebra_datepicker.src.js' },
// { expand: true, flatten: true, src: 'src/css/default/*.png', dest: 'dist/css/default/', filter: 'isFile' },
// { expand: true, flatten: true, src: 'src/css/default/*.gif', dest: 'dist/css/default/', filter: 'isFile' },
// { expand: true, flatten: true, src: 'src/css/default/*.txt', dest: 'dist/css/default/', filter: 'isFile' },
// { expand: true, flatten: true, src: 'src/css/flat/*.png', dest: 'dist/css/flat/', filter: 'isFile' },
// { expand: true, flatten: true, src: 'src/css/flat/*.gif', dest: 'dist/css/flat/', filter: 'isFile' },
// { expand: true, flatten: true, src: 'src/css/flat/*.txt', dest: 'dist/css/flat/', filter: 'isFile' }
]
}
},
/***************************************************************************************************************
* WATCH
* https://npmjs.org/package/grunt-contrib-watch
**************************************************************************************************************/
'watch': {
files: source_files,
tasks: ['uglify']
js: {
files: ['src/zebra_datepicker.src.js'],
tasks: ['newer:eslint', 'newer:jshint', 'newer:uglify', 'copy', 'notify:done'],
options: {
livereload: true
}
},
css: {
files: ['src/**/*.scss'],
tasks: ['newer:sass', 'notify:done'],
options: {
livereload: true
}
}
}
});
// register plugins
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-eslint');
grunt.loadNpmTasks('grunt-newer');
grunt.loadNpmTasks('grunt-notify');
grunt.loadNpmTasks('grunt-sass');
// register tasks
grunt.registerTask('default', ['uglify', 'watch']);
grunt.registerTask('default', ['sass', 'eslint', 'jshint', 'uglify', 'copy', 'watch']);
};
View
@@ -1,7 +1,6 @@
{
"name": "zebra_datepicker",
"version": "1.9.5",
"main": "public/javascript/zebra_datepicker.js",
"main": "dist/zebra_datepicker.min.js",
"homepage": "https://github.com/stefangabos/Zebra_Datepicker",
"authors": [
"Stefan Gabos <contact@stefangabos.ro>"
@@ -16,16 +15,20 @@
"ui"
],
"dependencies": {
"jquery": ">=1.5.2 <2.x"
"jquery": ">=1.7.0"
},
"license": "LGPL",
"ignore": [
"examples/README.md",
"examples/screenshot.png",
"examples/screenshot-flat.png",
"src/*",
".gitattributes",
".gitignore",
".npmignore",
"bower.json",
"eslint.json",
"Gruntfile.js",
"package.json",
"README.md",
"bower.json"
"package.json"
]
}
View
@@ -1,40 +1,43 @@
{
"name": "zebra_datepicker",
"version": "1.9.5",
"main": "public/javascript/zebra_datepicker.js",
"homepage": "http://www.stefangabos.ro/jquery/zebra-datepicker/",
"description": "A super-lightweight, highly configurable, cross-browser date picker jQuery plugin",
"author": {
"name": "Stefan Gabos",
"email": "contact@stefangabos.ro"
},
"description": "A super-lightweight, highly configurable, cross-browser date picker jQuery plugin",
"homepage": "https://github.com/stefangabos/Zebra_Datepicker",
"main": "dist/zebra_datepicker.min.js",
"repository": {
"type": "git",
"url": "https://github.com/stefangabos/Zebra_Datepicker.git"
},
"bugs": {
"url": "http://github.com/stefangabos/Zebra_Datepicker/issues",
"email": "contact@stefangabos.ro"
},
"license": "LGPL-3.0",
"version": "1.9.5",
"keywords": [
"jquery-plugin",
"ecosystem:jquery",
"calendar",
"date",
"datepicker",
"form",
"iso-8601",
"ui"
],
"licenses": [
{
"type": "LGPL",
"url": "https://www.gnu.org/licenses/lgpl-3.0.txt"
}
],
"bugs": {
"url": "https://github.com/stefangabos/Zebra_Datepicker/issues",
"email": "contact@stefangabos.ro"
},
"devDependencies": {
"grunt": "*",
"grunt-cli": "*",
"grunt-contrib-copy": "*",
"grunt-contrib-jshint": "*",
"grunt-contrib-uglify": "*",
"grunt-contrib-watch": "*"
"grunt-contrib-watch": "*",
"grunt-eslint": "*",
"grunt-newer": "*",
"grunt-notify": "*",
"grunt-sass": "*",
"time-grunt": "*"
}
}

0 comments on commit c0e6440

Please sign in to comment.