-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
292 additions
and
145 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# EditorConfig helps developers define and maintain consistent | ||
# coding styles between different editors and IDEs | ||
# editorconfig.org | ||
|
||
root = true | ||
|
||
# Due to a bug in the EditorConfig for SublimeText, we set tab indentation for | ||
# all files and we set exceptions for all files with an extension | ||
|
||
[*] | ||
end_of_line = lf | ||
charset = utf-8 | ||
|
||
[*.html] | ||
indent_style = space | ||
indent_size = 2 | ||
|
||
[*.{css,sass}] | ||
indent_style = space | ||
indent_size = 2 | ||
|
||
[*.js] | ||
indent_style = space | ||
indent_size = 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
.DS_Store | ||
.idea/ | ||
node_modules/ | ||
dist/ | ||
tmp/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,121 @@ | ||
'use strict'; | ||
|
||
module.exports = function (grunt) { | ||
// Load grunt tasks automatically | ||
require('load-grunt-tasks')(grunt); | ||
|
||
// Time how long tasks take. Can help when optimizing build times | ||
require('time-grunt')(grunt); | ||
|
||
var _ = require('lodash'); | ||
|
||
var now = new Date(); | ||
var pkg = grunt.file.readJSON('package.json'); | ||
pkg = _.assign( | ||
pkg, | ||
{ | ||
src: './src', | ||
dist: './dist', | ||
demo: './demo' | ||
} | ||
); | ||
|
||
var license = grunt.file.read('./license-header.txt'); | ||
license = grunt.template.process(license, { | ||
data: { | ||
buildYear: now.getFullYear(), | ||
version: pkg.version | ||
} | ||
}); | ||
|
||
//noinspection JSUnusedGlobalSymbols,JSUnresolvedFunction | ||
grunt.initConfig({ | ||
pkg: _.assign( | ||
pkg, | ||
{ | ||
src: './src', | ||
dist: './dist', | ||
demo: './demo' | ||
} | ||
), | ||
|
||
clean: { | ||
dist: { | ||
src: ['<%= pkg.dist %>'] | ||
} | ||
}, | ||
|
||
concat: { | ||
options: { | ||
banner: license | ||
}, | ||
dist: { | ||
files: { | ||
'<%= pkg.dist %>/jquery.ui.potato.menu.css': '<%= pkg.src %>/jquery.ui.potato.menu.css', | ||
'<%= pkg.dist %>/jquery.ui.potato.menu.js': '<%= pkg.src %>/jquery.ui.potato.menu.js' | ||
} | ||
} | ||
}, | ||
|
||
cssmin: { | ||
options: { | ||
keepSpecialComments: 1 | ||
}, | ||
dist: { | ||
files: { | ||
'<%= pkg.dist %>/jquery.ui.potato.menu.min.css': '<%= pkg.dist %>/jquery.ui.potato.menu.css' | ||
} | ||
} | ||
}, | ||
|
||
uglify: { | ||
options: { | ||
preserveComments: 'some' | ||
}, | ||
dist: { | ||
files: { | ||
'<%= pkg.dist %>/jquery.ui.potato.menu.min.js': '<%= pkg.dist %>/jquery.ui.potato.menu.js' | ||
} | ||
} | ||
}, | ||
|
||
/* jshint ignore:start */ | ||
notify_hooks: { | ||
options: { | ||
enabled: true, | ||
success: false, | ||
duration: 3 | ||
} | ||
} | ||
, | ||
/* jshint ignore:end */ | ||
|
||
browserSync: { | ||
demo: { | ||
bsFiles: { | ||
src: '<%= pkg.demo %>/*.html' | ||
} | ||
, | ||
options: { | ||
server: ['./'], | ||
startPath: '<%= pkg.demo %>/index.html' | ||
} | ||
} | ||
} | ||
}); | ||
|
||
grunt.registerTask('debug', function (/*target*/) { | ||
grunt.task.run([ | ||
'browserSync' | ||
]); | ||
}); | ||
|
||
grunt.registerTask('build', function (/*target*/) { | ||
grunt.task.run([ | ||
'clean', | ||
'concat', | ||
'uglify', | ||
'cssmin' | ||
]); | ||
}); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
/*! | ||
* jquery.ui.potato.menu | ||
* | ||
* Copyright (c) 2009-<%= buildYear %> makoto_kw, https://makotokw.com | ||
* | ||
* @author makoto_kw | ||
* @version <%= version %> | ||
* @license MIT | ||
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,43 @@ | ||
/** | ||
* jquery.ui.potato.menu | ||
* | ||
* Copyright (c) 2009-2016 makoto_kw, http://makotokw.com | ||
* | ||
* @author makoto_kw | ||
* @version 1.2.1 | ||
* @license MIT | ||
*/ | ||
.potato-menu { | ||
margin:0; | ||
padding:0; | ||
width:auto; | ||
list-style:none; | ||
} | ||
.potato-menu:after { | ||
content: " "; | ||
display: block; | ||
visibility: hidden; | ||
clear: both; | ||
height: 0.1px; | ||
font-size: 0.1em; | ||
line-height: 0; | ||
} | ||
.potato-menu .potato-menu-item { | ||
padding:0; | ||
position:relative; | ||
list-style:none; | ||
list-style-position:outside; | ||
display:inline; | ||
margin:0; | ||
float:left; | ||
} | ||
.potato-menu .potato-menu-item a { | ||
display:block; | ||
text-decoration:none; | ||
white-space:nowrap; | ||
outline:0; | ||
} | ||
.potato-menu .potato-menu-group { | ||
margin:0; | ||
padding:0; | ||
-webkit-padding-start:0; | ||
-webkit-padding-end:0; | ||
position:absolute; | ||
display:none; | ||
z-index:1000; | ||
.potato-menu { | ||
margin: 0; | ||
padding: 0; | ||
width: auto; | ||
list-style: none; | ||
} | ||
|
||
.potato-menu:after { | ||
content: " "; | ||
display: block; | ||
visibility: hidden; | ||
clear: both; | ||
height: 0.1px; | ||
font-size: 0.1em; | ||
line-height: 0; | ||
} | ||
|
||
.potato-menu .potato-menu-item { | ||
padding: 0; | ||
position: relative; | ||
list-style: none; | ||
list-style-position: outside; | ||
display: inline; | ||
margin: 0; | ||
float: left; | ||
} | ||
|
||
.potato-menu .potato-menu-item a { | ||
display: block; | ||
text-decoration: none; | ||
white-space: nowrap; | ||
outline: 0; | ||
} | ||
|
||
.potato-menu .potato-menu-group { | ||
margin: 0; | ||
padding: 0; | ||
-webkit-padding-start: 0; | ||
-webkit-padding-end: 0; | ||
position: absolute; | ||
display: none; | ||
z-index: 1000; | ||
} |
Oops, something went wrong.