mirror of
https://github.com/mdbootstrap/mdb-ui-kit.git
synced 2025-07-29 17:39:57 +03:00
Merge 5e0ac669d0
into b2ddb5230e
This commit is contained in:
commit
a8f8abdd74
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -7,3 +7,4 @@
|
||||||
Thumbs.db
|
Thumbs.db
|
||||||
.DS_Store
|
.DS_Store
|
||||||
/node_modules/
|
/node_modules/
|
||||||
|
.grunt/
|
||||||
|
|
173
Gruntfile.js
Normal file
173
Gruntfile.js
Normal file
|
@ -0,0 +1,173 @@
|
||||||
|
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/**/*.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"
|
||||||
|
])
|
||||||
|
});
|
||||||
|
};
|
43
_SpecRunner.html
Normal file
43
_SpecRunner.html
Normal file
|
@ -0,0 +1,43 @@
|
||||||
|
<!doctype html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<title>Jasmine Spec Runner</title>
|
||||||
|
<link rel="shortcut icon" type="image/png" href=".grunt/grunt-contrib-jasmine/jasmine_favicon.png">
|
||||||
|
|
||||||
|
<link rel="stylesheet" type="text/css" href=".grunt/grunt-contrib-jasmine/jasmine.css">
|
||||||
|
|
||||||
|
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
|
||||||
|
<script src=".grunt/grunt-contrib-jasmine/es5-shim.js"></script>
|
||||||
|
|
||||||
|
<script src=".grunt/grunt-contrib-jasmine/jasmine.js"></script>
|
||||||
|
|
||||||
|
<script src=".grunt/grunt-contrib-jasmine/jasmine-html.js"></script>
|
||||||
|
|
||||||
|
<script src=".grunt/grunt-contrib-jasmine/json2.js"></script>
|
||||||
|
|
||||||
|
<script src=".grunt/grunt-contrib-jasmine/boot.js"></script>
|
||||||
|
|
||||||
|
<script src="https://code.jquery.com/jquery-1.10.2.min.js"></script>
|
||||||
|
|
||||||
|
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>
|
||||||
|
|
||||||
|
<script src="test/*Helper.js"></script>
|
||||||
|
|
||||||
|
<script src="scripts/material.js"></script>
|
||||||
|
|
||||||
|
<script src="scripts/ripples.js"></script>
|
||||||
|
|
||||||
|
<script src="test/materialSpec.js"></script>
|
||||||
|
|
||||||
|
<script src="test/ripplesSpec.js"></script>
|
||||||
|
|
||||||
|
<script src=".grunt/grunt-contrib-jasmine/reporter.js"></script>
|
||||||
|
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
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,15 @@
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"grunt": "^0.4.5",
|
"grunt": "^0.4.5",
|
||||||
"grunt-autoprefixer": "^1.0.1",
|
"grunt-autoprefixer": "^1.0.1",
|
||||||
|
"grunt-contrib-connect": "^0.8.0",
|
||||||
"grunt-contrib-copy": "^0.6.0",
|
"grunt-contrib-copy": "^0.6.0",
|
||||||
"grunt-contrib-cssmin": "^0.10.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-less": "^0.11.4",
|
||||||
"grunt-contrib-sass": "^0.8.1"
|
"grunt-contrib-sass": "^0.8.1",
|
||||||
|
"grunt-contrib-watch": "^0.6.1",
|
||||||
|
"jshint-stylish": "^1.0.0",
|
||||||
|
"load-grunt-tasks": "^0.6.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
44
test/.jshintrc
Normal file
44
test/.jshintrc
Normal file
|
@ -0,0 +1,44 @@
|
||||||
|
{
|
||||||
|
"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
|
||||||
|
}
|
||||||
|
}
|
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