Skip to content

Commit c54b13e

Browse files
committed
Automate version bumping
1 parent 6a67ac0 commit c54b13e

File tree

6 files changed

+112
-10
lines changed

6 files changed

+112
-10
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,10 @@ npm test
169169
* Run `npm test` to make sure tests pass before touching the code.
170170
* Modify, test again, push, and send a PR!
171171

172+
## Bumping the version
173+
174+
Version bumping is automated. Just use [`npm version`](https://docs.npmjs.com/cli/version) command and all files will be updated with the new version.
175+
172176
## License
173177

174178
MIT

dist/jsonpatcherproxy.js

Lines changed: 82 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,82 @@
1-
'use strict';
1+
/*! JSONPatcherProxy version: 0.0.8 */
2+
var JSONPatcherProxy =
3+
/******/ (function(modules) { // webpackBootstrap
4+
/******/ // The module cache
5+
/******/ var installedModules = {};
6+
/******/
7+
/******/ // The require function
8+
/******/ function __webpack_require__(moduleId) {
9+
/******/
10+
/******/ // Check if module is in cache
11+
/******/ if(installedModules[moduleId]) {
12+
/******/ return installedModules[moduleId].exports;
13+
/******/ }
14+
/******/ // Create a new module (and put it into the cache)
15+
/******/ var module = installedModules[moduleId] = {
16+
/******/ i: moduleId,
17+
/******/ l: false,
18+
/******/ exports: {}
19+
/******/ };
20+
/******/
21+
/******/ // Execute the module function
22+
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
23+
/******/
24+
/******/ // Flag the module as loaded
25+
/******/ module.l = true;
26+
/******/
27+
/******/ // Return the exports of the module
28+
/******/ return module.exports;
29+
/******/ }
30+
/******/
31+
/******/
32+
/******/ // expose the modules object (__webpack_modules__)
33+
/******/ __webpack_require__.m = modules;
34+
/******/
35+
/******/ // expose the module cache
36+
/******/ __webpack_require__.c = installedModules;
37+
/******/
38+
/******/ // identity function for calling harmony imports with the correct context
39+
/******/ __webpack_require__.i = function(value) { return value; };
40+
/******/
41+
/******/ // define getter function for harmony exports
42+
/******/ __webpack_require__.d = function(exports, name, getter) {
43+
/******/ if(!__webpack_require__.o(exports, name)) {
44+
/******/ Object.defineProperty(exports, name, {
45+
/******/ configurable: false,
46+
/******/ enumerable: true,
47+
/******/ get: getter
48+
/******/ });
49+
/******/ }
50+
/******/ };
51+
/******/
52+
/******/ // getDefaultExport function for compatibility with non-harmony modules
53+
/******/ __webpack_require__.n = function(module) {
54+
/******/ var getter = module && module.__esModule ?
55+
/******/ function getDefault() { return module['default']; } :
56+
/******/ function getModuleExports() { return module; };
57+
/******/ __webpack_require__.d(getter, 'a', getter);
58+
/******/ return getter;
59+
/******/ };
60+
/******/
61+
/******/ // Object.prototype.hasOwnProperty.call
62+
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
63+
/******/
64+
/******/ // __webpack_public_path__
65+
/******/ __webpack_require__.p = "";
66+
/******/
67+
/******/ // Load entry module and return exports
68+
/******/ return __webpack_require__(__webpack_require__.s = 0);
69+
/******/ })
70+
/************************************************************************/
71+
/******/ ([
72+
/* 0 */
73+
/***/ (function(module, exports, __webpack_require__) {
74+
75+
"use strict";
76+
77+
278
/*!
379
* https://github.com/Palindrom/JSONPatcherProxy
4-
* JSONPatcherProxy version: 0.0.8
580
* (c) 2017 Starcounter
681
* MIT license
782
*/
@@ -385,7 +460,11 @@ const JSONPatcherProxy = (function() {
385460
return JSONPatcherProxy;
386461
})();
387462

388-
if (typeof module !== 'undefined') {
463+
if (true) {
389464
module.exports = JSONPatcherProxy;
390465
module.exports.default = JSONPatcherProxy;
391466
}
467+
468+
469+
/***/ })
470+
/******/ ]);

dist/jsonpatcherproxy.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
"scripts": {
88
"build": "webpack",
99
"bench": "node test/spec/proxyBenchmark.js",
10-
"test": "jasmine DUPLEX=proxy JASMINE_CONFIG_PATH=test/jasmine.json"
10+
"test": "jasmine DUPLEX=proxy JASMINE_CONFIG_PATH=test/jasmine.json",
11+
"version": "webpack && git add -A"
1112
},
1213
"keywords": [
1314
"proxy",

src/jsonpatcherproxy.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
'use strict';
2+
23
/*!
34
* https://github.com/Palindrom/JSONPatcherProxy
4-
* JSONPatcherProxy version: 0.0.8
55
* (c) 2017 Starcounter
66
* MIT license
77
*/

webpack.config.js

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
const webpack = require('webpack');
22
const MinifyPlugin = require('babel-minify-webpack-plugin');
33
const CopyWebpackPlugin = require('copy-webpack-plugin');
4+
const version = require('./package.json').version;
5+
6+
const banner = `JSONPatcherProxy version: ${version}`
47

58
module.exports = [
69
{
@@ -12,10 +15,25 @@ module.exports = [
1215
},
1316
plugins: [
1417
new MinifyPlugin(),
15-
// src file can be used in production everywhere
16-
new CopyWebpackPlugin([
17-
{ from: './src/jsonpatcherproxy.js', to: './dist/jsonpatcherproxy.js' }
18-
])
18+
new webpack.BannerPlugin({
19+
banner
20+
})
21+
],
22+
resolve: {
23+
extensions: ['.js']
24+
}
25+
},
26+
{
27+
entry: './src/jsonpatcherproxy.js',
28+
output: {
29+
filename: 'dist/jsonpatcherproxy.js',
30+
library: 'JSONPatcherProxy',
31+
libraryTarget: 'var'
32+
},
33+
plugins: [
34+
new webpack.BannerPlugin({
35+
banner
36+
})
1937
],
2038
resolve: {
2139
extensions: ['.js']

0 commit comments

Comments
 (0)