1.0.4 • Published 8 months ago

shared-base v1.0.4

Weekly downloads
-
License
GPL-3.0
Repository
-
Last release
8 months ago

rollup-starter-lib

Greenkeeper badge

This repo contains a bare-bones example of how to create a library using Rollup, including importing a module from node_modules and converting it from CommonJS.

We're creating a library called how-long-till-lunch, which usefully tells us how long we have to wait until lunch, using the ms package:

console.log('it will be lunchtime in ' + howLongTillLunch());

Getting started

Clone this repository and install its dependencies:

git clone https://github.com/rollup/rollup-starter-lib
cd rollup-starter-lib
npm install

npm run build builds the library to dist, generating three files:

  • dist/how-long-till-lunch.cjs.js A CommonJS bundle, suitable for use in Node.js, that requires the external dependency. This corresponds to the "main" field in package.json
  • dist/how-long-till-lunch.esm.js an ES module bundle, suitable for use in other people's libraries and applications, that imports the external dependency. This corresponds to the "module" field in package.json
  • dist/how-long-till-lunch.umd.js a UMD build, suitable for use in any environment (including the browser, as a <script> tag), that includes the external dependency. This corresponds to the "browser" field in package.json

npm run dev builds the library, then keeps rebuilding it whenever the source files change using rollup-watch.

npm test builds the library, then tests it.

Variations

  • babel — illustrates writing the source code in ES2015 and transpiling it for older environments with Babel
  • buble — similar, but using Bublé which is a faster alternative with less configuration
  • TypeScript — uses TypeScript for type-safe code and transpiling

License

MIT.

@everything-registry/sub-chunk-2747store-foramtesting-basesuper-ai@root-io/app-marketingisokitigridigrid-vieweraxios-oauth@gpti/auth@gpti/firebase@gpti/store-base@gpti/store-iso@gpti/ui@infinitebrahmanuniverse/nolb-share@mult/base-ui@mult/board@mult/core@mult/editors@mult/gallery@mult/sheet@mult/uinabujsreact-multiredux-connectedredux-connected-devtoolssaga-tsgh-aieleven-next-gen@sloyd/api@sloyd/store-base@sloyd/ui@igpt/auth@igpt/firebase@igpt/isotope@igpt/store-foram@igpt/ui@gdi/ai-kit@gdi/ai-runner@gdi/app-biblo@gdi/app-campaigns@gdi/app-carts@gdi/app-comments@gdi/app-dashboard@gdi/app-dashboard3d@gdi/app-devtools@gdi/app-docs@gdi/app-events@gdi/app-factory@gdi/app-knowledge@gdi/app-leads@gdi/app-login@gdi/app-mixer@gdi/app-money@gdi/app-orders@gdi/app-ppl@gdi/app-products@gdi/app-rayl@gdi/app-sales@gdi/app-settings@gdi/app-soundboard@gdi/app-source@gdi/app-studio@gdi/app-tasks@gdi/app-things@gdi/app-voice@gdi/blkr@gdi/block-about-iuhr3@gdi/block-apps-jf84j@gdi/block-base@gdi/block-card-ah4j1@gdi/block-contact-au487@gdi/block-cta-p8y4a@gdi/block-cta-uiey3@gdi/block-divider-aku34@gdi/block-features-j4k1h@gdi/block-footer-ajk34@gdi/block-footer-ui4y2@gdi/block-gallery-ui5873@gdi/block-header-aouu4@gdi/block-hero-ajh53@gdi/block-hero-hu45i@gdi/block-hero-ouywy@gdi/block-init@gdi/block-numbers-jk123@gdi/block-portfolio-aiou3@gdi/block-quotes-iaj2f@gdi/block-quotes-opur3@gdi/block-resume-iuo4f@gdi/block-section-gkj41@gdi/block-services-uoq83@gdi/block-top-41hj5@gdi/block-top-9yur8@gdi/block-top-aqwer@gdi/block-twins-aou31@gdi/block-twins-j1j43@gdi/template-card@gdi/template-gdi@gdi/template-starter@gdi/template-tech
1.0.2

8 months ago

1.0.4

8 months ago

1.0.3

8 months ago

1.0.0

2 years ago

0.5.0

2 years ago

0.4.9

3 years ago

0.4.8

3 years ago

0.4.5

3 years ago

0.4.4

3 years ago

0.4.7

3 years ago

0.4.6

3 years ago

0.4.3

3 years ago

0.0.20

3 years ago

0.0.21

3 years ago

0.0.22

3 years ago

0.0.24

3 years ago

0.0.25

3 years ago

0.0.30

3 years ago

0.0.31

3 years ago

0.0.32

3 years ago

0.0.34

3 years ago

0.1.0

3 years ago

0.3.0

3 years ago

0.2.0

3 years ago

0.0.26

3 years ago

0.0.27

3 years ago

0.0.28

3 years ago

0.0.29

3 years ago

0.4.1

3 years ago

0.4.0

3 years ago

0.4.2

3 years ago

0.0.10

3 years ago

0.0.11

3 years ago

0.0.12

3 years ago

0.0.14

3 years ago

0.0.15

3 years ago

0.0.9

3 years ago

0.0.16

3 years ago

0.0.8

3 years ago

0.0.18

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.7

3 years ago

0.0.6

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago