From d8d6d9812704e892b48e9968ee75b8a60a626efe Mon Sep 17 00:00:00 2001 From: atomiks Date: Thu, 6 Dec 2018 00:46:23 +1100 Subject: [PATCH] Update README-start.md --- static-parts/README-start.md | 20 +++----------------- 1 file changed, 3 insertions(+), 17 deletions(-) diff --git a/static-parts/README-start.md b/static-parts/README-start.md index 305b2d4f3..0731ea0c4 100644 --- a/static-parts/README-start.md +++ b/static-parts/README-start.md @@ -39,17 +39,15 @@ npm install 30-seconds-of-code yarn add 30-seconds-of-code ``` -[CDN link](https://unpkg.com/30-seconds-of-code/) +[CDN link](https://unpkg.com/30-seconds-of-code@2/)
Details **Browser** -> IMPORTANT: replace the `src` with the full version link and desired target spec (such as ES5 minified)): - ```html - + @@ -62,19 +60,7 @@ yarn add 30-seconds-of-code const _30s = require('30-seconds-of-code'); _30s.average(1, 2, 3); -// ES Modules -import _30s from '30-seconds-of-code'; -_30s.average(1, 2, 3); -``` - -To import snippets directly: - -```js -// CommonJS -const { average } = require('30-seconds-of-code'); -average(1, 2, 3); - -// ES Modules +// ES Modules (tree-shaking support) import { average } from '30-seconds-of-code'; average(1, 2, 3); ```