1.0.0 • Published 4 months ago

shared-base v1.0.0

Weekly downloads
-
License
GPL-3.0
Repository
-
Last release
4 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-2747igridigrid-viewerisokitnabujseleven-next-gengh-aireact-multi@gdi/store-iso@gdi/store-knowledge@gdi/store-leads@gdi/store-mixer@gdi/store-money@gdi/store-orders@gdi/store-ppl@gdi/store-products@gdi/store-rayl@gdi/store-sales@gdi/store-settings@gdi/store-site@gdi/store-tasks@gdi/store-things@gdi/store-viewer@gdi/store-voice@gdi/store-weather@gdi/stores@gdi/template-card@gdi/hooks@gdi/language@gdi/photo-booth@gdi/platformer@gdi/sagas@gdi/selectors@gdi/service-base@gdi/store-auth@gdi/store-base@gdi/store-biblo@gdi/store-campaigns@gdi/store-carts@gdi/store-comments@gdi/store-dashboard@gdi/store-devtools@gdi/store-docs@gdi/store-events@gdi/store-factory@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-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-top-41hj5@gdi/block-top-9yur8@gdi/block-top-aqwer@gdi/block-twins-aou31@gdi/block-twins-j1j43@gdi/datasets@gdi/engine@gdi/ai-kit@gdi/ai-runner@gdi/app-biblo@gdi/app-campaigns@gdi/app-carts@gdi/app-comments@gdi/app-tasks@gdi/store-soundboard@gdi/store-soundboard-scripts@gdi/store-studio@gdi/template-gdi@gdi/template-starter@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
1.0.0

4 months ago

0.5.0

4 months ago

0.4.9

1 year ago

0.4.8

1 year ago

0.4.5

1 year ago

0.4.4

1 year ago

0.4.7

1 year ago

0.4.6

1 year ago

0.4.3

1 year ago

0.0.20

2 years ago

0.0.21

2 years ago

0.0.22

1 year ago

0.0.24

1 year ago

0.0.25

1 year ago

0.0.30

1 year ago

0.0.31

1 year ago

0.0.32

1 year ago

0.0.34

1 year ago

0.1.0

1 year ago

0.3.0

1 year ago

0.2.0

1 year ago

0.0.26

1 year ago

0.0.27

1 year ago

0.0.28

1 year ago

0.0.29

1 year ago

0.4.1

1 year ago

0.4.0

1 year ago

0.4.2

1 year ago

0.0.10

2 years ago

0.0.11

2 years ago

0.0.12

2 years ago

0.0.14

2 years ago

0.0.15

2 years ago

0.0.9

2 years ago

0.0.16

2 years ago

0.0.8

2 years ago

0.0.18

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago