Skip to content

Commit

Permalink
Version 2.8.7
Browse files Browse the repository at this point in the history
  • Loading branch information
jshjohnson committed Jul 5, 2017
1 parent 2fefb90 commit 011be23
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 18 deletions.
6 changes: 3 additions & 3 deletions assets/scripts/dist/choices.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion assets/scripts/dist/choices.js.map

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions assets/scripts/dist/choices.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "choices.js",
"version": "2.8.6",
"version": "2.8.7",
"description": "A vanilla JS customisable text input/select box plugin",
"main": [
"./assets/scripts/dist/choices.js",
Expand Down
6 changes: 3 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,16 @@
<meta name="theme-color" content="#ffffff">

<!-- 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 -->

<!-- Optional includes -->
<script src="https://cdn.polyfill.io/v2/polyfill.js?features=es5,fetch,Element.prototype.classList,requestAnimationFrame,Node.insertBefore,Node.firstChild,Object.assign"></script>
<!-- End optional includes -->

<!-- Choices includes -->
<link rel="stylesheet" href="assets/styles/css/choices.min.css?version=2.8.6">
<script src="assets/scripts/dist/choices.min.js?version=2.8.6"></script>
<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.7"></script>
<!-- End Choices includes -->

<!--[if lt IE 9]>
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "choices.js",
"version": "2.8.6",
"version": "2.8.7",
"description": "A vanilla JS customisable text input/select box plugin",
"main": "./assets/scripts/dist/choices.min.js",
"scripts": {
Expand Down
18 changes: 12 additions & 6 deletions version.js
Original file line number Diff line number Diff line change
@@ -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'),
path = require('path'),
config = {
files: ['bower.json', 'package.json', 'index.html']
};
const fs = require('fs');
const path = require('path');
const config = {
files: ['bower.json', 'package.json', 'index.html', 'version.js']
};

/**
* Convert node arguments into an object
Expand All @@ -30,11 +30,17 @@ const argvToObject = () => {
return args;
};

/**
* Loop through files updating the current version
* @param {Object} config
*/
const updateVersion = (config) => {
const args = argvToObject();
const currentVersion = args.current;
const newVersion = args.new;

console.log(`Updating version from ${currentVersion} to ${newVersion}`);

config.files.forEach((file) => {
const filePath = path.join(__dirname, file);
const regex = new RegExp(currentVersion, 'g');
Expand Down

0 comments on commit 011be23

Please sign in to comment.