mirror of
https://github.com/mdbootstrap/mdb-ui-kit.git
synced 2025-07-27 08:29:53 +03:00
Merge 82aae6fbf0
into b2ddb5230e
This commit is contained in:
commit
21a023faea
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -7,3 +7,4 @@
|
|||
Thumbs.db
|
||||
.DS_Store
|
||||
/node_modules/
|
||||
.grunt/
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
{
|
||||
"bitwise": true,
|
||||
"camelcase": true,
|
||||
"curly": true,
|
||||
"eqeqeq": false,
|
||||
"es3": false,
|
||||
|
@ -15,7 +14,6 @@
|
|||
"nonbsp": true,
|
||||
"nonew": true,
|
||||
"plusplus": false,
|
||||
"quotmark": "double",
|
||||
"undef": true,
|
||||
"unused": true,
|
||||
"strict": false,
|
||||
|
|
172
Gruntfile.js
Normal file
172
Gruntfile.js
Normal file
|
@ -0,0 +1,172 @@
|
|||
module.exports = function(grunt) {
|
||||
"use strict";
|
||||
|
||||
require("load-grunt-tasks")(grunt);
|
||||
|
||||
grunt.initConfig({
|
||||
|
||||
less: {
|
||||
production: {
|
||||
options: {
|
||||
paths: ["less"]
|
||||
},
|
||||
files: {
|
||||
"css-compiled/material.css": "less/material.less",
|
||||
"css-compiled/material-wfont.css": "less/material-wfont.less",
|
||||
"css-compiled/ripples.css": "less/ripples.less"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
sass: {
|
||||
production: {
|
||||
files: {
|
||||
"css-compiled/material.css": "sass/material.scss",
|
||||
"css-compiled/material-wfont.css": "sass/material-wfont.scss",
|
||||
"css-compiled/ripples.css": "sass/ripples.scss"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
autoprefixer: {
|
||||
options: {
|
||||
browsers: ["last 3 versions", "ie 8", "ie 9", "ie 10", "ie 11"]
|
||||
},
|
||||
dist: {
|
||||
files: {
|
||||
"css-compiled/material.css": "css-compiled/material.css",
|
||||
"css-compiled/material-wfont.css": "css-compiled/material-wfont.css",
|
||||
"css-compiled/ripples.css": "css-compiled/ripples.css"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
cssmin: {
|
||||
minify: {
|
||||
expand: true,
|
||||
cwd: "css-compiled/",
|
||||
src: ["*.css", "!*.min.css"],
|
||||
dest: "css-compiled/",
|
||||
ext: ".min.css"
|
||||
}
|
||||
},
|
||||
|
||||
copy: {
|
||||
css: {
|
||||
src: "css-compiled/*.min.css",
|
||||
dest: "template/material/"
|
||||
},
|
||||
js: {
|
||||
src: "scripts/*.js",
|
||||
dest: "template/material/"
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
connect: {
|
||||
options: {
|
||||
port: 8040,
|
||||
hostname: "localhost",
|
||||
livereload: 35740,
|
||||
keepalive: true
|
||||
|
||||
},
|
||||
livereload: {
|
||||
options: {
|
||||
open: true,
|
||||
base: "."
|
||||
}
|
||||
},
|
||||
test: {
|
||||
options: {
|
||||
port: 8041,
|
||||
open: "http://localhost:8041/_SpecRunner.html",
|
||||
base: "."
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
jasmine: {
|
||||
scripts: "scripts/**/*.js",
|
||||
options: {
|
||||
build: true,
|
||||
specs: "test/*Spec.js",
|
||||
helpers: "test/*Helper.js",
|
||||
vendor: [
|
||||
"https://code.jquery.com/jquery-1.10.2.min.js",
|
||||
"https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"
|
||||
]
|
||||
}
|
||||
},
|
||||
|
||||
jshint: {
|
||||
options: {
|
||||
jshintrc: ".jshintrc",
|
||||
reporter: require("jshint-stylish")
|
||||
},
|
||||
all: [
|
||||
"Gruntfile.js",
|
||||
"scripts/**/*.js",
|
||||
"template/**/*.js"
|
||||
],
|
||||
test: {
|
||||
options: {
|
||||
jshintrc: "test/.jshintrc",
|
||||
src: ["test/**/*.js"]
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
watch: {
|
||||
js: {
|
||||
files: ["Gruntfile.js", "scripts/**/*.js", "template/**/*.js"],
|
||||
tasks: ["newer:jshint:all"]
|
||||
},
|
||||
jsTest: {
|
||||
files: ["test/**/*.js"],
|
||||
tasks: ["newer:jshint:test", "jasmine"]
|
||||
},
|
||||
livereload: {
|
||||
options: {
|
||||
livereload: "<%= connect.options.livereload %>"
|
||||
},
|
||||
files: [
|
||||
"index.html",
|
||||
"css-compiled/**/*.css",
|
||||
"**/*.{png,jpg,jpeg,gif,webp,svg}"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
grunt.registerTask("default", ["less", "autoprefixer", "cssmin", "copy"]);
|
||||
|
||||
grunt.registerTask("scss", ["sass", "autoprefixer", "cssmin", "copy"]);
|
||||
|
||||
grunt.registerTask("build", function(target) {
|
||||
var buildType = "default";
|
||||
if (target && target === "scss") {
|
||||
buildType = "scss";
|
||||
}
|
||||
|
||||
grunt.task.run(["newer:jshint", "jasmine:scripts", buildType]);
|
||||
});
|
||||
|
||||
grunt.registerTask("test", [
|
||||
"jasmine:scripts:build",
|
||||
"connect:test"
|
||||
]);
|
||||
|
||||
grunt.registerTask("serve", function(target){
|
||||
var buildTarget = "default";
|
||||
if(target && target === "scss") {
|
||||
buildTarget = "scss";
|
||||
}
|
||||
grunt.task.run([
|
||||
"build:"+ buildTarget,
|
||||
"connect:livereload",
|
||||
"watch"
|
||||
]);
|
||||
});
|
||||
};
|
2
css-compiled/material-wfont.min.css
vendored
2
css-compiled/material-wfont.min.css
vendored
File diff suppressed because one or more lines are too long
2
css-compiled/material.min.css
vendored
2
css-compiled/material.min.css
vendored
File diff suppressed because one or more lines are too long
73
gruntfile.js
73
gruntfile.js
|
@ -1,73 +0,0 @@
|
|||
module.exports = function(grunt) {
|
||||
|
||||
"use strict";
|
||||
|
||||
grunt.initConfig({
|
||||
|
||||
less: {
|
||||
production: {
|
||||
options: {
|
||||
paths: ["less"]
|
||||
},
|
||||
files: {
|
||||
"css-compiled/material.css": "less/material.less",
|
||||
"css-compiled/material-wfont.css": "less/material-wfont.less",
|
||||
"css-compiled/ripples.css": "less/ripples.less"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
sass: {
|
||||
production: {
|
||||
files: {
|
||||
"css-compiled/material.css": "sass/material.scss",
|
||||
"css-compiled/material-wfont.css": "sass/material-wfont.scss",
|
||||
"css-compiled/ripples.css": "sass/ripples.scss"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
autoprefixer: {
|
||||
options: {
|
||||
browsers: ["last 3 versions", "ie 8", "ie 9", "ie 10", "ie 11"]
|
||||
},
|
||||
dist: {
|
||||
files: {
|
||||
"css-compiled/material.css": "css-compiled/material.css",
|
||||
"css-compiled/material-wfont.css": "css-compiled/material-wfont.css",
|
||||
"css-compiled/ripples.css": "css-compiled/ripples.css"
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
cssmin: {
|
||||
minify: {
|
||||
expand: true,
|
||||
cwd: "css-compiled/",
|
||||
src: ["*.css", "!*.min.css"],
|
||||
dest: "css-compiled/",
|
||||
ext: ".min.css"
|
||||
}
|
||||
},
|
||||
|
||||
copy: {
|
||||
css: {
|
||||
src: "css-compiled/*.min.css",
|
||||
dest: "template/material/"
|
||||
},
|
||||
js: {
|
||||
src: "scripts/*.js",
|
||||
dest: "template/material/"
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
grunt.loadNpmTasks("grunt-contrib-less");
|
||||
grunt.loadNpmTasks("grunt-contrib-sass");
|
||||
grunt.loadNpmTasks("grunt-autoprefixer");
|
||||
grunt.loadNpmTasks("grunt-contrib-cssmin");
|
||||
grunt.loadNpmTasks("grunt-contrib-copy");
|
||||
grunt.registerTask("default", ["less", "autoprefixer", "cssmin", "copy"]);
|
||||
grunt.registerTask("scss", ["sass", "autoprefixer", "cssmin", "copy"]);
|
||||
};
|
|
@ -19,9 +19,16 @@
|
|||
"devDependencies": {
|
||||
"grunt": "^0.4.5",
|
||||
"grunt-autoprefixer": "^1.0.1",
|
||||
"grunt-contrib-connect": "^0.8.0",
|
||||
"grunt-contrib-copy": "^0.6.0",
|
||||
"grunt-contrib-cssmin": "^0.10.0",
|
||||
"grunt-contrib-jasmine": "^0.8.0",
|
||||
"grunt-contrib-jshint": "^0.10.0",
|
||||
"grunt-contrib-less": "^0.11.4",
|
||||
"grunt-contrib-sass": "^0.8.1"
|
||||
"grunt-contrib-sass": "^0.8.1",
|
||||
"grunt-contrib-watch": "^0.6.1",
|
||||
"grunt-newer": "^0.7.0",
|
||||
"jshint-stylish": "^1.0.0",
|
||||
"load-grunt-tasks": "^0.6.0"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,13 +1,15 @@
|
|||
/* Copyright 2014+, Federico Zivolo, LICENSE at https://github.com/FezVrasta/bootstrap-material-design/blob/master/LICENSE.md */
|
||||
/* globals CustomEvent */
|
||||
|
||||
var ripples = {
|
||||
window.ripples = {
|
||||
init : function(withRipple) {
|
||||
"use strict";
|
||||
|
||||
// Cross browser matches function
|
||||
function matchesSelector(dom_element, selector) {
|
||||
var matches = dom_element.matches || dom_element.matchesSelector || dom_element.webkitMatchesSelector || dom_element.mozMatchesSelector || dom_element.msMatchesSelector || dom_element.oMatchesSelector;
|
||||
var matches = dom_element.matches || dom_element.matchesSelector || dom_element.webkitMatchesSelector ||
|
||||
dom_element.mozMatchesSelector ||
|
||||
dom_element.msMatchesSelector || dom_element.oMatchesSelector;
|
||||
return matches.call(dom_element, selector);
|
||||
}
|
||||
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1,13 +1,15 @@
|
|||
/* Copyright 2014+, Federico Zivolo, LICENSE at https://github.com/FezVrasta/bootstrap-material-design/blob/master/LICENSE.md */
|
||||
/* globals CustomEvent */
|
||||
|
||||
var ripples = {
|
||||
window.ripples = {
|
||||
init : function(withRipple) {
|
||||
"use strict";
|
||||
|
||||
// Cross browser matches function
|
||||
function matchesSelector(dom_element, selector) {
|
||||
var matches = dom_element.matches || dom_element.matchesSelector || dom_element.webkitMatchesSelector || dom_element.mozMatchesSelector || dom_element.msMatchesSelector || dom_element.oMatchesSelector;
|
||||
var matches = dom_element.matches || dom_element.matchesSelector || dom_element.webkitMatchesSelector ||
|
||||
dom_element.mozMatchesSelector ||
|
||||
dom_element.msMatchesSelector || dom_element.oMatchesSelector;
|
||||
return matches.call(dom_element, selector);
|
||||
}
|
||||
|
||||
|
|
47
test/.jshintrc
Normal file
47
test/.jshintrc
Normal file
|
@ -0,0 +1,47 @@
|
|||
{
|
||||
"bitwise": true,
|
||||
"camelcase": true,
|
||||
"curly": true,
|
||||
"eqeqeq": false,
|
||||
"es3": false,
|
||||
"forin": true,
|
||||
"freeze": false,
|
||||
"immed": true,
|
||||
"indent": 4,
|
||||
"latedef": true,
|
||||
"newcap": true,
|
||||
"noarg": true,
|
||||
"noempty": true,
|
||||
"nonbsp": true,
|
||||
"nonew": true,
|
||||
"plusplus": false,
|
||||
"quotmark": "double",
|
||||
"undef": true,
|
||||
"unused": true,
|
||||
"strict": false,
|
||||
"trailing": true,
|
||||
"maxparams": 5,
|
||||
"maxdepth": 5,
|
||||
"maxstatements": 50,
|
||||
"maxlen": 150,
|
||||
|
||||
"eqnull": true,
|
||||
|
||||
"browser": false,
|
||||
"devel": false,
|
||||
"node": true,
|
||||
|
||||
"white": true,
|
||||
|
||||
"globals": {
|
||||
"$": true,
|
||||
"document": true,
|
||||
"brackets": true,
|
||||
"define": true,
|
||||
"Mustache": true,
|
||||
"window": true,
|
||||
"expect": true,
|
||||
"describe": true,
|
||||
"it": true
|
||||
}
|
||||
}
|
9
test/materialSpec.js
Normal file
9
test/materialSpec.js
Normal file
|
@ -0,0 +1,9 @@
|
|||
'use strict';
|
||||
|
||||
describe('Material', function (){
|
||||
|
||||
//Dummy test just to ensure tests are accurately configured
|
||||
it('jquery should be loaded', function () {
|
||||
expect($).toBeDefined();
|
||||
});
|
||||
});
|
0
test/ripplesSpec.js
Normal file
0
test/ripplesSpec.js
Normal file
Loading…
Reference in New Issue
Block a user