From b46051638ece6027f49647be625af92852b6777d Mon Sep 17 00:00:00 2001 From: Priyanshu Rav <77456300+priyanshurav@users.noreply.github.com> Date: Sat, 15 May 2021 10:00:36 +0530 Subject: [PATCH] Added Rollup logo in README.md (#4080) * Added Rollup logo in README.md * Revert changes to lockfile --- README.md | 19 +++++++++---------- package-lock.json | 2 +- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index be9df6aaff4..f9b17bb978b 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,6 @@ -# Rollup +

+ +

@@ -27,6 +29,7 @@

+

Rollup

## Overview @@ -65,20 +68,20 @@ rollup main.js --format umd --name "myBundle" --file bundle.js Developing software is usually easier if you break your project into smaller separate pieces, since that often removes unexpected interactions and dramatically reduces the complexity of the problems you'll need to solve, and simply writing smaller projects in the first place [isn't necessarily the answer](https://medium.com/@Rich_Harris/small-modules-it-s-not-quite-that-simple-3ca532d65de4). Unfortunately, JavaScript has not historically included this capability as a core feature in the language. -This finally changed with ES modules support in JavaScript, which provides a syntax for importing and exporting functions and data so they can be shared between separate scripts. Most browsers and Node.js support ES modules. However, Node.js releases before 12.17 support ES modules only behind the `--experimental-modules` flag, and older browsers like Internet Explorer do not support ES modules at all. Rollup allows you to write your code using ES modules, and run your application even in environments that do not support ES modules natively. For environments that support them, Rollup can output optimized ES modules; for environments that don't, Rollup can compile your code to other formats such as CommonJS modules, AMD modules, and IIFE-style scripts. This means that you get to *write future-proof code*, and you also get the tremendous benefits of... +This finally changed with ES modules support in JavaScript, which provides a syntax for importing and exporting functions and data so they can be shared between separate scripts. Most browsers and Node.js support ES modules. However, Node.js releases before 12.17 support ES modules only behind the `--experimental-modules` flag, and older browsers like Internet Explorer do not support ES modules at all. Rollup allows you to write your code using ES modules, and run your application even in environments that do not support ES modules natively. For environments that support them, Rollup can output optimized ES modules; for environments that don't, Rollup can compile your code to other formats such as CommonJS modules, AMD modules, and IIFE-style scripts. This means that you get to _write future-proof code_, and you also get the tremendous benefits of... ## Tree Shaking In addition to enabling the use of ES modules, Rollup also statically analyzes and optimizes the code you are importing, and will exclude anything that isn't actually used. This allows you to build on top of existing tools and modules without adding extra dependencies or bloating the size of your project. -For example, with CommonJS, the *entire tool or library must be imported*. +For example, with CommonJS, the _entire tool or library must be imported_. ```js // import the entire utils object with CommonJS -var utils = require( 'utils' ); +var utils = require('utils'); var query = 'Rollup'; // use the ajax method of the utils object -utils.ajax( 'https://api.example.com?search=' + query ).then( handleResponse ); +utils.ajax('https://api.example.com?search=' + query).then(handleResponse); ``` But with ES modules, instead of importing the whole `utils` object, we can just import the one `ajax` function we need: @@ -88,7 +91,7 @@ But with ES modules, instead of importing the whole `utils` object, we can just import { ajax } from 'utils'; var query = 'Rollup'; // call the ajax function -ajax( 'https://api.example.com?search=' + query ).then( handleResponse ); +ajax('https://api.example.com?search=' + query).then(handleResponse); ``` Because Rollup includes the bare minimum, it results in lighter, faster, and less complicated libraries and applications. Since this approach is based on explicit `import` and `export` statements, it is vastly more effective than simply running an automated minifier to detect unused variables in the compiled output code. @@ -108,14 +111,12 @@ To make sure your ES modules are immediately usable by tools that work with Comm This project exists thanks to all the people who contribute. [[Contribute](CONTRIBUTING.md)]. - ## Backers Thank you to all our backers! 🙏 [[Become a backer](https://opencollective.com/rollup#backer)] - ## Sponsors Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [[Become a sponsor](https://opencollective.com/rollup#sponsor)] @@ -131,8 +132,6 @@ Support this project by becoming a sponsor. Your logo will show up here with a l - - ## License [MIT](https://github.com/rollup/rollup/blob/master/LICENSE.md) diff --git a/package-lock.json b/package-lock.json index 236b85a14b4..35797b1bd11 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5043,4 +5043,4 @@ "dev": true } } -} +} \ No newline at end of file