mirror of
https://github.com/mdbootstrap/mdb-ui-kit.git
synced 2024-11-13 13:17:03 +03:00
Merge pull request #709 from krzystof/master
Fix Main file in package.json
This commit is contained in:
commit
81f25a7629
|
@ -14,15 +14,17 @@ Package.describe({
|
||||||
});
|
});
|
||||||
|
|
||||||
Package.onUse(function (api) {
|
Package.onUse(function (api) {
|
||||||
api.versionsFrom(['METEOR@0.9.0', 'METEOR@1.0']);
|
api.versionsFrom('METEOR@1.2');
|
||||||
api.use('twbs:bootstrap@3.3.1');
|
api.use('twbs:bootstrap@3.3.1');
|
||||||
api.use('jquery');
|
api.use('jquery');
|
||||||
api.addFiles([
|
api.addAssets([
|
||||||
// we bundle all font files, but the client will request only one of them via the CSS @font-face rule
|
// we bundle all font files, but the client will request only one of them via the CSS @font-face rule
|
||||||
'dist/fonts/Material-Design-Icons.eot', // IE8 or older
|
'dist/fonts/Material-Design-Icons.eot', // IE8 or older
|
||||||
'dist/fonts/Material-Design-Icons.svg', // SVG fallback for iOS < 5 - http://caniuse.com/#feat=svg-fonts, http://stackoverflow.com/a/11002874/126903
|
'dist/fonts/Material-Design-Icons.svg', // SVG fallback for iOS < 5 - http://caniuse.com/#feat=svg-fonts, http://stackoverflow.com/a/11002874/126903
|
||||||
'dist/fonts/Material-Design-Icons.ttf', // Android Browers 4.1, 4.3 - http://caniuse.com/#feat=ttf
|
'dist/fonts/Material-Design-Icons.ttf', // Android Browers 4.1, 4.3 - http://caniuse.com/#feat=ttf
|
||||||
'dist/fonts/Material-Design-Icons.woff', // Supported by all modern browsers
|
'dist/fonts/Material-Design-Icons.woff', // Supported by all modern browsers
|
||||||
|
], where);
|
||||||
|
api.addFiles([
|
||||||
'dist/css/material.css',
|
'dist/css/material.css',
|
||||||
'dist/css/ripples.css',
|
'dist/css/ripples.css',
|
||||||
'dist/js/material.js',
|
'dist/js/material.js',
|
||||||
|
|
101
meteor/test.js
101
meteor/test.js
|
@ -44,60 +44,63 @@ var packageName; // there seems to be no official way of finding out the name o
|
||||||
|
|
||||||
var plugins = ['affix', 'alert', 'button', 'carousel', 'collapse', 'dropdown', 'modal', 'popover', 'scrollspy', 'tab', 'tooltip'];
|
var plugins = ['affix', 'alert', 'button', 'carousel', 'collapse', 'dropdown', 'modal', 'popover', 'scrollspy', 'tab', 'tooltip'];
|
||||||
|
|
||||||
// test plugins
|
document.addEventListener('DOMContentLoaded', function() {
|
||||||
plugins.forEach(function (plugin) {
|
// test plugins
|
||||||
Tinytest.add('Plugin - ' + plugin, function (test) {
|
plugins.forEach(function (plugin) {
|
||||||
test.instanceOf($(document.body)[plugin], Function, 'instantiated correctly');
|
Tinytest.add('Plugin - ' + plugin, function (test) {
|
||||||
});
|
test.instanceOf($(document.body)[plugin], Function, 'instantiated correctly');
|
||||||
});
|
});
|
||||||
|
|
||||||
// visual check
|
|
||||||
plugins.forEach(function (plugin) {
|
|
||||||
|
|
||||||
Tinytest.addAsync('Visual check - ' + plugin, function (test, done) {
|
|
||||||
var bootstrapDropZone = document.createElement('div');
|
|
||||||
document.body.appendChild(bootstrapDropZone);
|
|
||||||
|
|
||||||
|
|
||||||
HTTP.get('http://rawgit.com/twbs/bootstrap/master/js/tests/visual/' + plugin + '.html', function callback(error, result) {
|
|
||||||
if (error) {
|
|
||||||
test.fail('Error getting the test file. Do we have an Internet connection to rawgit.com?');
|
|
||||||
} else {
|
|
||||||
// [^] matches across newlines. Stay within the container div, or else the fragment will attempt to load resources on its own.
|
|
||||||
bootstrapDropZone.innerHTML = result.content.match(/<div[^]+<\/div>/);
|
|
||||||
test.ok({message: 'Test passed if the display looks OK *and* clicking dropdowns/popovers/tooltips works.'});
|
|
||||||
}
|
|
||||||
|
|
||||||
done();
|
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
// visual check
|
||||||
|
plugins.forEach(function (plugin) {
|
||||||
|
|
||||||
});
|
Tinytest.addAsync('Visual check - ' + plugin, function (test, done) {
|
||||||
|
var bootstrapDropZone = document.createElement('div');
|
||||||
|
document.body.appendChild(bootstrapDropZone);
|
||||||
|
|
||||||
|
|
||||||
Tinytest.addAsync('Visual check - Material Design', function (test, done) {
|
HTTP.get('http://rawgit.com/twbs/bootstrap/master/js/tests/visual/' + plugin + '.html', function callback(error, result) {
|
||||||
var bootstrapDropZone = document.createElement('div');
|
if (error) {
|
||||||
document.body.appendChild(bootstrapDropZone);
|
test.fail('Error getting the test file. Do we have an Internet connection to rawgit.com?');
|
||||||
|
} else {
|
||||||
|
// [^] matches across newlines. Stay within the container div, or else the fragment will attempt to load resources on its own.
|
||||||
|
bootstrapDropZone.innerHTML = result.content.match(/<div[^]+<\/div>/);
|
||||||
|
test.ok({message: 'Test passed if the display looks OK *and* clicking dropdowns/popovers/tooltips works.'});
|
||||||
|
}
|
||||||
|
|
||||||
HTTP.get('http://rawgit.com/FezVrasta/bootstrap-material-design/master/bootstrap-elements.html', function callback(error, result) {
|
done();
|
||||||
if (error) {
|
});
|
||||||
test.fail('Error getting the FezVrasta test file. Do we have an Internet connection to rawgit.com?');
|
|
||||||
} else {
|
|
||||||
// [^] matches across newlines. Stay within the container div, or else the fragment will attempt to load resources on its own.
|
|
||||||
bootstrapDropZone.innerHTML = result.content.match(/<meta name="viewport"[^]+<script src=/);
|
|
||||||
test.ok({message: 'Test passed if the display looks OK *and* clicking dropdowns/popovers/tooltips works.'});
|
|
||||||
// only does anything after loading the 'dropdown' plugin test
|
|
||||||
$('[data-toggle="dropdown"]').dropdown();
|
|
||||||
// only does anything after loading the 'popover' plugin test
|
|
||||||
$('[data-toggle="popover"]').popover();
|
|
||||||
// only does anything after loading the 'tooltip' plugin test
|
|
||||||
$('[data-toggle="tooltip"]').tooltip();
|
|
||||||
// don't initialize the modals because that messes up the Tinytest runner HTML
|
|
||||||
$.material.init();
|
|
||||||
}
|
|
||||||
|
|
||||||
done();
|
});
|
||||||
});
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
Tinytest.addAsync('Visual check - Material Design', function (test, done) {
|
||||||
|
var bootstrapDropZone = document.createElement('div');
|
||||||
|
document.body.appendChild(bootstrapDropZone);
|
||||||
|
|
||||||
|
HTTP.get('http://rawgit.com/FezVrasta/bootstrap-material-design/master/bootstrap-elements.html', function callback(error, result) {
|
||||||
|
if (error) {
|
||||||
|
test.fail('Error getting the FezVrasta test file. Do we have an Internet connection to rawgit.com?');
|
||||||
|
} else {
|
||||||
|
// [^] matches across newlines. Stay within the container div, or else the fragment will attempt to load resources on its own.
|
||||||
|
bootstrapDropZone.innerHTML = result.content.match(/<meta name="viewport"[^]+<script src=/);
|
||||||
|
test.ok({message: 'Test passed if the display looks OK *and* clicking dropdowns/popovers/tooltips works.'});
|
||||||
|
// only does anything after loading the 'dropdown' plugin test
|
||||||
|
$('[data-toggle="dropdown"]').dropdown();
|
||||||
|
// only does anything after loading the 'popover' plugin test
|
||||||
|
$('[data-toggle="popover"]').popover();
|
||||||
|
// only does anything after loading the 'tooltip' plugin test
|
||||||
|
$('[data-toggle="tooltip"]').tooltip();
|
||||||
|
// don't initialize the modals because that messes up the Tinytest runner HTML
|
||||||
|
$.material.init();
|
||||||
|
}
|
||||||
|
|
||||||
|
done();
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
|
@ -14,15 +14,17 @@ Package.describe({
|
||||||
});
|
});
|
||||||
|
|
||||||
Package.onUse(function (api) {
|
Package.onUse(function (api) {
|
||||||
api.versionsFrom(['METEOR@0.9.0', 'METEOR@1.0']);
|
api.versionsFrom('METEOR@1.2');
|
||||||
api.use('twbs:bootstrap@3.3.1');
|
api.use('twbs:bootstrap@3.3.1');
|
||||||
api.use('jquery');
|
api.use('jquery');
|
||||||
api.addFiles([
|
api.addAssets([
|
||||||
// we bundle all font files, but the client will request only one of them via the CSS @font-face rule
|
// we bundle all font files, but the client will request only one of them via the CSS @font-face rule
|
||||||
'dist/fonts/Material-Design-Icons.eot', // IE8 or older
|
'dist/fonts/Material-Design-Icons.eot', // IE8 or older
|
||||||
'dist/fonts/Material-Design-Icons.svg', // SVG fallback for iOS < 5 - http://caniuse.com/#feat=svg-fonts, http://stackoverflow.com/a/11002874/126903
|
'dist/fonts/Material-Design-Icons.svg', // SVG fallback for iOS < 5 - http://caniuse.com/#feat=svg-fonts, http://stackoverflow.com/a/11002874/126903
|
||||||
'dist/fonts/Material-Design-Icons.ttf', // Android Browers 4.1, 4.3 - http://caniuse.com/#feat=ttf
|
'dist/fonts/Material-Design-Icons.ttf', // Android Browers 4.1, 4.3 - http://caniuse.com/#feat=ttf
|
||||||
'dist/fonts/Material-Design-Icons.woff', // Supported by all modern browsers
|
'dist/fonts/Material-Design-Icons.woff', // Supported by all modern browsers
|
||||||
|
], where);
|
||||||
|
api.addFiles([
|
||||||
'dist/css/material.css',
|
'dist/css/material.css',
|
||||||
'dist/css/ripples.css',
|
'dist/css/ripples.css',
|
||||||
'dist/js/material.js',
|
'dist/js/material.js',
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
"name": "bootstrap-material-design",
|
"name": "bootstrap-material-design",
|
||||||
"version": "0.3.1-dev",
|
"version": "0.3.1-dev",
|
||||||
"description": "Material Design for Bootstrap 3",
|
"description": "Material Design for Bootstrap 3",
|
||||||
"main": "index.js",
|
"main": "scripts/index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "echo \"Error: no test specified\" && exit 1"
|
"test": "echo \"Error: no test specified\" && exit 1"
|
||||||
},
|
},
|
||||||
|
|
2
scripts/index.js
Normal file
2
scripts/index.js
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
require("./material.js");
|
||||||
|
require("./ripples.js");
|
Loading…
Reference in New Issue
Block a user