Skip to content

Commit

Permalink
3.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jmdobry committed Feb 26, 2017
1 parent c5b478b commit fc8380f
Show file tree
Hide file tree
Showing 16 changed files with 3,909 additions and 145 deletions.
5 changes: 5 additions & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,12 @@
#
# Thanks!
#
Alan Agius <[email protected]>
Alexis Tondelier <[email protected]>
Greenkeeper <[email protected]>
Jason Dobry <[email protected]>
Justas Brazauskas <[email protected]>
Kris Van de Steeg <[email protected]>
Samuel Marks <[email protected]>
Vohmyanin Sergey Vasilevich <[email protected]>
alessandro231 <[email protected]>
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
##### 3.0.0 - 26 February 2017

###### Breaking changes
- #29 by @Delagen - TypeScript definitions have been rewritten, and the `CacheFactory` constructor function is now a named export of the module.

Before:

import CacheFactory from 'cachefactory';

After:

import { CacheFactory } from 'cachefactory';

##### 2.0.0 - 17 September 2016

###### Breaking changes
Expand Down
6 changes: 5 additions & 1 deletion CONTRIBUTORS
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,12 @@
#
# Thanks!
#
Alan Agius <[email protected]>
Alexis Tondelier <[email protected]>
Greenkeeper <[email protected]>
Jason Dobry <[email protected]>
Justas Brazauskas <[email protected]>
Kris Van de Steeg <[email protected]>
Samuel Marks <[email protected]>
Thinking Byter <[email protected]>
Vohmyanin Sergey Vasilevich <[email protected]>
alessandro231 <[email protected]>
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License

Copyright (C) 2015-2016 CacheFactory project authors
Copyright (C) 2015-2017 CacheFactory project authors

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
Expand Down
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,16 @@ bower install --save cachefactory
## Quick Start

```js
import {CacheFactory} from 'cachefactory';
import { CacheFactory } from 'cachefactory';

const cacheFactory = new CacheFactory();
let cache;

// Check whether cache metadata has been initialized
// on every page refresh.
if (!cacheFactory.exists('my-cache')) {
// Create the cache metadata. Any previously saved
// data will be loaded.
cache = cacheFactory.createCache('my-cache', {
// Delete items from the cache when they expire
deleteOnExpire: 'aggressive',
Expand All @@ -57,7 +61,7 @@ cache.put('/books/1', { title: 'BookOne', id: 1 });

[MIT License][11]

Copyright (C) 2015-2016 CacheFactory project authors
Copyright (C) 2015-2017 CacheFactory project authors

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
Expand Down
8 changes: 6 additions & 2 deletions docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,16 @@ bower install --save cachefactory
## Quick Start

```js
import CacheFactory from 'cachefactory';
import { CacheFactory } from 'cachefactory';

const cacheFactory = new CacheFactory();
let cache;

// Check whether cache metadata has been initialized
// on every page refresh.
if (!cacheFactory.exists('my-cache')) {
// Create the cache metadata. Any previously saved
// data will be loaded.
cache = cacheFactory.createCache('my-cache', {
// Delete items from the cache when they expire
deleteOnExpire: 'aggressive',
Expand All @@ -50,7 +54,7 @@ cache.put('/books/1', { title: 'BookOne', id: 1 });

[MIT License][11]

Copyright (C) 2015-2016 CacheFactory project authors
Copyright (C) 2015-2017 CacheFactory project authors

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
Expand Down
5 changes: 2 additions & 3 deletions guides/basics.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Grab `CacheFactory` then create a cache. Let's go:

```js
import CacheFactory from 'cachefactory';
import { CacheFactory } from 'cachefactory';

const cacheFactory = new CacheFactory();
let cache;
Expand Down Expand Up @@ -68,8 +68,7 @@ cache = cacheFactory.createCache('my-cache', {
Or say we want all of our caches to use that configuration as their default:

```js
import CacheFactory from 'cachefactory';
const { defaults } = CacheFactory;
import { CacheFactory, defaults } from 'cachefactory';

myUtils.extend(defaults, {
maxAge: 60 * 60 * 1000,
Expand Down
2 changes: 1 addition & 1 deletion guides/working-with-localstorage.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
```js
import CacheFactory from 'cachefactory';
import { CacheFactory } from 'cachefactory';

const cacheFactory = new CacheFactory();

Expand Down
2 changes: 1 addition & 1 deletion karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ module.exports = function (config) {
browsers: ['PhantomJS'],
files: [
'node_modules/es6-promise/dist/es6-promise.auto.js',
'node_modules/yabh/src/index.js',
'src/utils.js',
'src/defaults.js',
'src/BinaryHeap.js',
'src/Cache.js',
'src/CacheFactory.js',
'src/index.js',
Expand Down
74 changes: 37 additions & 37 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
{
"name": "cachefactory",
"description": "CacheFactory is a very simple and useful cache for the browser.",
"version": "2.0.0",
"version": "3.0.0",
"homepage": "https://github.com/jmdobry/CacheFactory",
"repository": {
"type": "git",
"url": "https://github.com/jmdobry/CacheFactory.git"
},
"author": "CacheFactory project authors",
"license": "MIT",
"main": "dist/cachefactory.js",
"jsnext:main": "dist/cachefactory.es2015.js",
"module": "dist/cachefactory.es2015.js",
Expand All @@ -13,12 +19,6 @@
"AUTHORS",
"CONTRIBUTORS"
],
"repository": {
"type": "git",
"url": "https://github.com/jmdobry/CacheFactory.git"
},
"author": "CacheFactory project authors",
"license": "MIT",
"keywords": [
"cache"
],
Expand Down Expand Up @@ -46,44 +46,44 @@
]
},
"scripts": {
"lint": "standard \"**/*.js\"",
"lint": "standard 'src/**/*.js' 'test/**/*.js'",
"doc": "jsdoc -c conf.json -u guides --readme docs.md src",
"bundle:es5": "rollup src/index.js -c rollup.config.js -o dist/cachefactory.js -m dist/cachefactory.js.map -f umd",
"bundle:esnext": "rollup src/index.js -c rollup.config.es2015.js -o dist/cachefactory.es2015.js -m dist/cachefactory.es2015.js.map -f es",
"bundle:es5": "rollup src/index.js -c -o dist/cachefactory.js -m dist/cachefactory.js.map -f umd",
"bundle:esnext": "rollup src/index.js -c -o dist/cachefactory.es2015.js -m dist/cachefactory.es2015.js.map -f es",
"bundle": "npm run bundle:es5 && npm run bundle:esnext",
"min": "uglifyjs dist/cachefactory.js -o dist/cachefactory.min.js --source-map dist/cachefactory.min.map --source-map-url cachefactory.min.map -v -m -c --screw-ie8",
"build": "npm run lint && npm run bundle && npm run min",
"gzip": "echo gzipped size: $(cat dist/cachefactory.min.js | gzip -f9 | wc -c)kb",
"karma": "karma start",
"test": "npm run build && npm run karma",
"ci": "npm test && cat ./coverage/PhantomJS*/lcov.info | codecov"
},
"devDependencies": {
"babel-core": "^6.21.0",
"babel-eslint": "^7.1.1",
"babel-plugin-transform-es2015-modules-umd": "^6.18.0",
"babel-preset-es2015": "^6.18.0",
"babel-preset-es2015-rollup": "^3.0.0",
"chai": "^3.5.0",
"codecov": "^1.0.1",
"es6-promise": "^4.0.5",
"jsdoc": "^3.4.1",
"karma": "^1.3.0",
"karma-babel-preprocessor": "^6.0.1",
"karma-chai": "^0.1.0",
"karma-chrome-launcher": "^2.0.0",
"karma-coverage": "^1.1.1",
"karma-mocha": "^1.1.1",
"karma-phantomjs-launcher": "^1.0.2",
"karma-sinon": "^1.0.5",
"karma-sourcemap-loader": "^0.3.7",
"minami": "^1.1.1",
"mocha": "^3.0.2",
"phantomjs-prebuilt": "^2.1.12",
"rollup": "^0.41.4",
"rollup-plugin-babel": "^2.6.1",
"sinon": "^1.17.5",
"standard": "^8.1.0",
"uglify-js": "^2.7.3",
"yabh": "^1.2.0"
"babel-core": "6.31.1",
"babel-eslint": "7.1.1",
"babel-plugin-external-helpers": "6.22.0",
"babel-plugin-transform-es2015-modules-umd": "6.23.0",
"babel-preset-es2015": "6.22.0",
"chai": "3.5.0",
"codecov": "1.0.1",
"es6-promise": "4.0.5",
"jsdoc": "3.4.3",
"karma": "1.5.0",
"karma-babel-preprocessor": "6.0.1",
"karma-chai": "0.1.0",
"karma-chrome-launcher": "2.0.0",
"karma-coverage": "1.1.1",
"karma-mocha": "1.3.0",
"karma-phantomjs-launcher": "1.0.2",
"karma-sinon": "1.0.5",
"karma-sourcemap-loader": "0.3.7",
"minami": "1.1.1",
"mocha": "3.2.0",
"phantomjs-prebuilt": "2.1.14",
"rollup": "0.41.4",
"rollup-plugin-babel": "2.7.1",
"sinon": "1.17.7",
"standard": "8.6.0",
"uglify-js": "2.7.5"
}
}
13 changes: 0 additions & 13 deletions rollup.config.es2015.js

This file was deleted.

15 changes: 12 additions & 3 deletions rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,25 @@ module.exports = {
banner: '/**\n' +
' * CacheFactory\n' +
' * @version ' + pkg.version + ' - Homepage <https://github.com/jmdobry/CacheFactory>\n' +
' * @copyright (c) 2015-2016 CacheFactory project authors\n' +
' * @copyright (c) 2015-2017 CacheFactory project authors\n' +
' * @license MIT <https://github.com/jmdobry/CacheFactory/blob/master/LICENSE>\n' +
' * @overview CacheFactory is a very simple and useful cache for the browser.\n' +
' */',
plugins: [
babel({
babelrc: false,
plugins: [
'external-helpers'
],
presets: [
'es2015-rollup'
]
[
'es2015',
{
modules: false
}
]
],
exclude: 'node_modules/**'
})
]
}
Loading

0 comments on commit fc8380f

Please sign in to comment.