From dc2a05459932f54b80ed407d2a1e9c3dad85e141 Mon Sep 17 00:00:00 2001 From: Evan Scott Date: Tue, 5 Jun 2018 22:19:34 -0400 Subject: [PATCH] v1.1.1 umd.js -> standalone.js, fixed the browser bundle in general and added a note on it to the README --- README.md | 7 +++++-- package.json | 2 +- rollup.config.js | 8 ++++---- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index ade8070..d4efe79 100644 --- a/README.md +++ b/README.md @@ -429,15 +429,18 @@ ReactDOM.render(, root); You can also use consume Buttermilk from a CDN like unpkg: ``` -https://unpkg.com/buttermilk@1.1.0/dist/umd.js -https://unpkg.com/buttermilk@1.1.0/dist/umd.min.js +https://unpkg.com/buttermilk@1.1.1/dist/standalone.js +https://unpkg.com/buttermilk@1.1.1/dist/standalone.min.js ``` The exports will be accessible at `window.Buttermilk`. Note that this requires `react >= 16.3` (`window.React`) and `prop-types` (`window.PropTypes`) to also be accessible in the `window` scope. +Both the minified and development versions ship with source maps for ease of debugging. + ## more examples - holistic example + animated route transitions: +- browser-only without a bundler: ## goals diff --git a/package.json b/package.json index 2262852..a728649 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "buttermilk", "description": "Beautifully simple isomorphic routing for React projects.", - "version": "1.1.0", + "version": "1.1.1", "repository": { "type": "git", "url": "https://github.com/probablyup/buttermilk" diff --git a/rollup.config.js b/rollup.config.js index d071a3f..adba235 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -45,14 +45,14 @@ function generateConfig(overrides, minify = false, externalHelpers = false) { export default [ generateConfig({ output: { - file: 'dist/umd.js', - format: 'umd', + file: 'dist/standalone.js', + format: 'iife', } }), generateConfig({ output: { - file: 'dist/umd.min.js', - format: 'umd', + file: 'dist/standalone.min.js', + format: 'iife', } }, true), generateConfig({