├── .babelrc ├── .eslintrc ├── .npmignore ├── .travis.yml ├── CHANGELOG.md ├── LICENSE ├── README.md ├── demo ├── .babelrc ├── build │ ├── favicon.png │ └── index.html ├── package.json ├── src │ ├── CoreStatus.js │ ├── DemoUI.js │ ├── core.error.js │ ├── core.green.js │ ├── core.js │ ├── index.js │ ├── style.less │ └── style2.less ├── static │ ├── Lato-Black.woff │ ├── Lato-Bold.woff │ ├── Lato-Regular.woff │ └── tiny_grid.png └── webpack.config.babel.js ├── karma-sauce.conf.js ├── karma.conf.js ├── package.json ├── scripts └── deploy.sh ├── src ├── coreInit.js ├── getNextCoreId.js ├── index.js ├── loadCore.js ├── operations.js └── utils │ └── noop.js └── test ├── .eslintrc ├── coreInit-test.js ├── fixtures ├── errorCore.js └── spyCore.js ├── getNextCoreId-test.js ├── loadCore-test.js ├── operations-test.js ├── tests.webpack.js └── utils.js /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": ["es2015"], 3 | "plugins": ["transform-object-rest-spread"] 4 | } 5 | -------------------------------------------------------------------------------- /.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "parser": "babel-eslint", 3 | "extends": "airbnb", 4 | "rules": { 5 | "semi": [2, "never"] 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | demo/ 2 | scripts/ 3 | src/ 4 | test/ 5 | coverage/ 6 | .babelrc 7 | .eslintrc 8 | .eslintignore 9 | .travis.yml 10 | karma*.conf.js 11 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | 3 | node_js: 4 | - "5" 5 | 6 | script: 7 | - npm run lint 8 | - if [ "$SAUCE_ACCESS_KEY" ]; then npm run test:sauce; else npm run test; fi 9 | 10 | after_success: 11 | - npm install coveralls lcov-result-merger 12 | - $(npm bin)/lcov-result-merger './coverage/*/lcov.info' | $(npm bin)/coveralls 13 | - ./scripts/deploy.sh 14 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Change Log 2 | All notable changes to this project will be documented in this file. 3 | This project adheres to [Semantic Versioning](http://semver.org/). 4 | 5 | ## 0.1.1 - 2016-01-29 6 | ### Fixed 7 | - Superficial README updates. 8 | 9 | ## 0.1.0 - 2016-01-29 10 | ### Added 11 | - Initial public release. 12 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 Max Goodman 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Isolated Core 2 | 3 | [![Build Status](https://img.shields.io/travis/chromakode/isolated-core/master.svg?style=flat-square)](https://travis-ci.org/chromakode/isolated-core) 4 | [![Coverage Status](https://img.shields.io/coveralls/chromakode/isolated-core/master.svg?style=flat-square)](https://coveralls.io/github/chromakode/isolated-core?branch=master) 5 | [![npm](https://img.shields.io/npm/v/isolated-core.svg?style=flat-square)](https://www.npmjs.com/package/isolated-core) 6 | [![npm](https://img.shields.io/npm/l/isolated-core.svg?style=flat-square)](https://github.com/chromakode/isolated-core/blob/master/LICENSE) 7 | 8 | A library for seamless in-page cold updates using iframes. 9 | 10 | [:zap: **DEMO**](http://chromakode.github.io/isolated-core/) 11 | 12 | 13 | ## Introduction 14 | 15 | In long running web apps, such as chat clients or music players, users leave pages open for weeks. It's useful to push code updates to existing clients, but in-page updates must be extremely fast and reliable to not become disruptive to the user experience. 16 | 17 | With Isolated Core, your client-side JS (the "core") is contained within an `