Skip to content

Commit

Permalink
Automate version bumping
Browse files Browse the repository at this point in the history
  • Loading branch information
alshakero committed Nov 8, 2017
1 parent 6a67ac0 commit c54b13e
Show file tree
Hide file tree
Showing 6 changed files with 112 additions and 10 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,10 @@ npm test
* Run `npm test` to make sure tests pass before touching the code.
* Modify, test again, push, and send a PR!

## Bumping the version

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.

## License

MIT
85 changes: 82 additions & 3 deletions dist/jsonpatcherproxy.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,82 @@
'use strict';
/*! JSONPatcherProxy version: 0.0.8 */
var JSONPatcherProxy =
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId]) {
/******/ return installedModules[moduleId].exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules[moduleId] = {
/******/ i: moduleId,
/******/ l: false,
/******/ exports: {}
/******/ };
/******/
/******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ // Flag the module as loaded
/******/ module.l = true;
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/******/
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = modules;
/******/
/******/ // expose the module cache
/******/ __webpack_require__.c = installedModules;
/******/
/******/ // identity function for calling harmony imports with the correct context
/******/ __webpack_require__.i = function(value) { return value; };
/******/
/******/ // define getter function for harmony exports
/******/ __webpack_require__.d = function(exports, name, getter) {
/******/ if(!__webpack_require__.o(exports, name)) {
/******/ Object.defineProperty(exports, name, {
/******/ configurable: false,
/******/ enumerable: true,
/******/ get: getter
/******/ });
/******/ }
/******/ };
/******/
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ __webpack_require__.n = function(module) {
/******/ var getter = module && module.__esModule ?
/******/ function getDefault() { return module['default']; } :
/******/ function getModuleExports() { return module; };
/******/ __webpack_require__.d(getter, 'a', getter);
/******/ return getter;
/******/ };
/******/
/******/ // Object.prototype.hasOwnProperty.call
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/ // __webpack_public_path__
/******/ __webpack_require__.p = "";
/******/
/******/ // Load entry module and return exports
/******/ return __webpack_require__(__webpack_require__.s = 0);
/******/ })
/************************************************************************/
/******/ ([
/* 0 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


/*!
* https://github.com/Palindrom/JSONPatcherProxy
* JSONPatcherProxy version: 0.0.8
* (c) 2017 Starcounter
* MIT license
*/
Expand Down Expand Up @@ -385,7 +460,11 @@ const JSONPatcherProxy = (function() {
return JSONPatcherProxy;
})();

if (typeof module !== 'undefined') {
if (true) {
module.exports = JSONPatcherProxy;
module.exports.default = JSONPatcherProxy;
}


/***/ })
/******/ ]);
2 changes: 1 addition & 1 deletion dist/jsonpatcherproxy.min.js

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

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"scripts": {
"build": "webpack",
"bench": "node test/spec/proxyBenchmark.js",
"test": "jasmine DUPLEX=proxy JASMINE_CONFIG_PATH=test/jasmine.json"
"test": "jasmine DUPLEX=proxy JASMINE_CONFIG_PATH=test/jasmine.json",
"version": "webpack && git add -A"
},
"keywords": [
"proxy",
Expand Down
2 changes: 1 addition & 1 deletion src/jsonpatcherproxy.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';

/*!
* https://github.com/Palindrom/JSONPatcherProxy
* JSONPatcherProxy version: 0.0.8
* (c) 2017 Starcounter
* MIT license
*/
Expand Down
26 changes: 22 additions & 4 deletions webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
const webpack = require('webpack');
const MinifyPlugin = require('babel-minify-webpack-plugin');
const CopyWebpackPlugin = require('copy-webpack-plugin');
const version = require('./package.json').version;

const banner = `JSONPatcherProxy version: ${version}`

module.exports = [
{
Expand All @@ -12,10 +15,25 @@ module.exports = [
},
plugins: [
new MinifyPlugin(),
// src file can be used in production everywhere
new CopyWebpackPlugin([
{ from: './src/jsonpatcherproxy.js', to: './dist/jsonpatcherproxy.js' }
])
new webpack.BannerPlugin({
banner
})
],
resolve: {
extensions: ['.js']
}
},
{
entry: './src/jsonpatcherproxy.js',
output: {
filename: 'dist/jsonpatcherproxy.js',
library: 'JSONPatcherProxy',
libraryTarget: 'var'
},
plugins: [
new webpack.BannerPlugin({
banner
})
],
resolve: {
extensions: ['.js']
Expand Down

0 comments on commit c54b13e

Please sign in to comment.