Skip to content

Commit

Permalink
Updates to version 5.0
Browse files Browse the repository at this point in the history
Adds compatibility for Bootstrap 4.
Fixes unit tests.
Updates npm packages.
Moves source file to /src directory.
Extracts locales to separate file.
Adds centerVertical option.
Adds new input types for prompt.
Adds multiple option to select input type.
Refactors prompt to use same factory as alert and confirm.
  • Loading branch information
tiesont committed Feb 27, 2019
1 parent cdf3206 commit 924c3b4
Show file tree
Hide file tree
Showing 16 changed files with 5,950 additions and 596 deletions.
2 changes: 1 addition & 1 deletion .jshintrc
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"trailing": true,
"quotmark": "single",
"browser": true,

"node": true,
"globals": {
"beforeEach": true,
"afterEach": true,
Expand Down
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
language: node_js
node_js:
- "6"
- "node"
14 changes: 10 additions & 4 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
module.exports = function (grunt) {
'use strict';
grunt.initConfig({
uglify: {
options: {
mangle: false,
banner: grunt.file.read('header.txt')
compress: true,
mangle: true,
banner: grunt.file.read('header.txt'),
output:{
quote_style: 3
}
},
my_target: {
files: {
Expand All @@ -16,7 +21,8 @@ module.exports = function (grunt) {

jshint: {
options: {
jshintrc: '.jshintrc'
jshintrc: '.jshintrc',
force: true
},
all: ['src/bootbox.js']
},
Expand All @@ -32,5 +38,5 @@ module.exports = function (grunt) {
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-karma');

grunt.registerTask('default', ['jshint', 'karma']);
grunt.registerTask('default', ['uglify', 'jshint', 'karma']);
};
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ Much more dependency information can be found [on the Bootbox website](http://bo
- Adds prompt input constraints for `min`, `max`, `step`, `maxlength`, `pattern`, and `required`
- Adds `pattern` option for prompt inputs
- Allows `message` option for prompt
- Allows `multiple` option for prompt (when using the `select` input type)
- Refactors prompt function to use the same dialog factory as alert and confirm.

#### Dialog options
Expand All @@ -65,7 +66,7 @@ For a full list of releases and changes please see [the changelog](https://githu

(The MIT License)

Copyright (C) 2011-2018 by Nick Payne <nick@kurai.co.uk>
Copyright (C) 2011-2019 by Nick Payne <nick@kurai.co.uk>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion build/calculate-size
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env zsh

SRC="bootbox.js"
SRC="src/bootbox.js"
MIN="/tmp/bootbox.min.js"

uglifyjs $SRC -c -m > $MIN
Expand Down
4 changes: 2 additions & 2 deletions header.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* bootbox.js v5.0.0
* bootbox.js 5.0.0
*
* http://bootboxjs.com/license.txt
*/
*/
9 changes: 1 addition & 8 deletions karma-base.conf.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
module.exports = function(params) {

'use strict';

console.log('Vendor files: ' + params.vendor.join(', '));

return function(config) {

return config.set({
Expand All @@ -17,14 +13,11 @@ module.exports = function(params) {

params.vendor,

params.src || 'bootbox.js',
params.src || 'src/bootbox.js',

['tests/**/*.test.js']
),
exclude: [],
preprocessors: {
'src/bootbox.js': ['coverage']
},
reporters: ['dots', 'coverage', 'junit'],
port: 9876,
colors: true,
Expand Down
Loading

0 comments on commit 924c3b4

Please sign in to comment.