Skip to content

Commit

Permalink
added changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
lubber-de committed Oct 29, 2017
1 parent 8950a58 commit 77a80ec
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 6 deletions.
6 changes: 4 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [Unreleased]
## [1.0.6]
### Changed
- License from GPLv3 to MIT

### Added
- new option `noCache` for fileObjects to prevent caching if needed for non-jsonp files
- Changelog

## [1.0.5] - 2017-10-20
Expand Down Expand Up @@ -45,7 +46,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
### Added
- Initial Commit

[Unreleased]: /../compare/v1.0.5...HEAD
[Unreleased]: /../compare/v1.0.6...HEAD
[1.0.6]: /../compare/v1.0.5...v1.0.6
[1.0.5]: /../compare/v1.0.4...v1.0.5
[1.0.4]: /../compare/v1.0.3...v1.0.4
[1.0.3]: /../compare/v1.0.2...v1.0.3
Expand Down
15 changes: 13 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,14 @@ JS code as a string (! Because this could rely one some previous needed code loa

**type**: `string`
If omitted, stackLoad tries to guess it from a possible file extension. Otherwise assumes 'js' as default. Other possible values are:
- 'css'
- 'jsonp'
- `css`
- `jsonp`
Using jsonp assumes the url already has the probably needed callback function name as part of the url. stackLoad just adds a timestamp to the url to make sure it is not cached
- Anything else is considered javascript.

**noCache**: `boolean`
Set to true if you definately want to skip cache-load for the file and force redownloading from the server

#### stackObject Properties
**files**: `string` | `array()` of strings | `fileObject` | `array()` of fileObjects
The files will be synchronously loaded in the order of the array. So take care of possible dependencies.
Expand Down Expand Up @@ -156,6 +159,14 @@ stackLoad({
});
```

Prevent Caching / Force Server reload (automatically enabled for jsonp files)
```javascript
stackLoad({
url:'http://domain.tld/foo/bar.js',
noCache: true
});
```

Call a function when all files are loaded
```javascript
stackLoad({
Expand Down
2 changes: 1 addition & 1 deletion stackload.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@
o.type = guessed[1].toLowerCase();
}
}
if(o.type.toLowerCase()==='jsonp') {
if(o.type.toLowerCase()==='jsonp' || o.noCache) {
var dt= new Date().getTime();
if (o.url.match(/\?/)) {
o.url += "&_="+dt;
Expand Down
2 changes: 1 addition & 1 deletion stackload.min.js

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

0 comments on commit 77a80ec

Please sign in to comment.