Version 2.8.7

This commit is contained in:
Josh Johnson 2017-07-05 09:03:10 +01:00
parent 2fefb904a3
commit 011be2306d
7 changed files with 24 additions and 18 deletions

View file

@ -1,4 +1,4 @@
/*! choices.js v2.8.6 | (c) 2017 Josh Johnson | https://github.com/jshjohnson/Choices#readme */ /*! choices.js v2.8.7 | (c) 2017 Josh Johnson | https://github.com/jshjohnson/Choices#readme */
(function webpackUniversalModuleDefinition(root, factory) { (function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object') if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory(); module.exports = factory();
@ -2405,7 +2405,7 @@ return /******/ (function(modules) { // webpackBootstrap
this.store.dispatch((0, _index3.addChoice)(value, choiceLabel, choiceId, groupId, isDisabled, choiceElementId, customProperties)); this.store.dispatch((0, _index3.addChoice)(value, choiceLabel, choiceId, groupId, isDisabled, choiceElementId, customProperties));
if (isSelected) { if (isSelected) {
this._addItem(value, choiceLabel, choiceId, undefined, undefined, customProperties); this._addItem(value, choiceLabel, choiceId, undefined, customProperties);
} }
} }
@ -2450,7 +2450,7 @@ return /******/ (function(modules) { // webpackBootstrap
var isOptDisabled = option.disabled || option.parentNode && option.parentNode.disabled; var isOptDisabled = option.disabled || option.parentNode && option.parentNode.disabled;
var label = (0, _utils.isType)('Object', option) ? option[labelKey] : option.innerHTML; var label = (0, _utils.isType)('Object', option) ? option[labelKey] : option.innerHTML;
_this22._addChoice(option[valueKey], label, option.selected, isOptDisabled, groupId); _this22._addChoice(option[valueKey], label, option.selected, isOptDisabled, groupId, option.customProperties);
}); });
} else { } else {
this.store.dispatch((0, _index3.addGroup)(group.label, group.id, false, group.disabled)); this.store.dispatch((0, _index3.addGroup)(group.label, group.id, false, group.disabled));

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -1,6 +1,6 @@
{ {
"name": "choices.js", "name": "choices.js",
"version": "2.8.6", "version": "2.8.7",
"description": "A vanilla JS customisable text input/select box plugin", "description": "A vanilla JS customisable text input/select box plugin",
"main": [ "main": [
"./assets/scripts/dist/choices.js", "./assets/scripts/dist/choices.js",

View file

@ -15,7 +15,7 @@
<meta name="theme-color" content="#ffffff"> <meta name="theme-color" content="#ffffff">
<!-- Ignore these --> <!-- Ignore these -->
<link rel="stylesheet" href="assets/styles/css/base.min.css?version=2.8.6"> <link rel="stylesheet" href="assets/styles/css/base.min.css?version=2.8.7">
<!-- End ignore these --> <!-- End ignore these -->
<!-- Optional includes --> <!-- Optional includes -->
@ -23,8 +23,8 @@
<!-- End optional includes --> <!-- End optional includes -->
<!-- Choices includes --> <!-- Choices includes -->
<link rel="stylesheet" href="assets/styles/css/choices.min.css?version=2.8.6"> <link rel="stylesheet" href="assets/styles/css/choices.min.css?version=2.8.7">
<script src="assets/scripts/dist/choices.min.js?version=2.8.6"></script> <script src="assets/scripts/dist/choices.min.js?version=2.8.7"></script>
<!-- End Choices includes --> <!-- End Choices includes -->
<!--[if lt IE 9]> <!--[if lt IE 9]>

View file

@ -1,6 +1,6 @@
{ {
"name": "choices.js", "name": "choices.js",
"version": "2.8.6", "version": "2.8.7",
"description": "A vanilla JS customisable text input/select box plugin", "description": "A vanilla JS customisable text input/select box plugin",
"main": "./assets/scripts/dist/choices.min.js", "main": "./assets/scripts/dist/choices.min.js",
"scripts": { "scripts": {

View file

@ -1,10 +1,10 @@
// Example usage: npm --newVersion=2.7.2 run version // Example usage: npm --newVersion=2.8.7 run version
const fs = require('fs'), const fs = require('fs');
path = require('path'), const path = require('path');
config = { const config = {
files: ['bower.json', 'package.json', 'index.html'] files: ['bower.json', 'package.json', 'index.html', 'version.js']
}; };
/** /**
* Convert node arguments into an object * Convert node arguments into an object
@ -30,11 +30,17 @@ const argvToObject = () => {
return args; return args;
}; };
/**
* Loop through files updating the current version
* @param {Object} config
*/
const updateVersion = (config) => { const updateVersion = (config) => {
const args = argvToObject(); const args = argvToObject();
const currentVersion = args.current; const currentVersion = args.current;
const newVersion = args.new; const newVersion = args.new;
console.log(`Updating version from ${currentVersion} to ${newVersion}`); console.log(`Updating version from ${currentVersion} to ${newVersion}`);
config.files.forEach((file) => { config.files.forEach((file) => {
const filePath = path.join(__dirname, file); const filePath = path.join(__dirname, file);
const regex = new RegExp(currentVersion, 'g'); const regex = new RegExp(currentVersion, 'g');