Skip to content

estevanico-explorations/rollup-exploration

Repository files navigation

RollupJS Exploration

An example repo where I plan to explore 2 main paths and some other ideas I want to try out.

Paths

TypeScript Setup

I'm thinking of this sort of like a template to use to make other TypeScript powered libraries using Rollup.

Expectations

  • Uses path aliases
  • Compilation
    • Source to single file
    • Source maps (unless production)
    • Single type definiation file
    • Optionally export a shell script alongside source
  • General configurations
    • Add a LICENSE file to header
    • Remove all comments & console.log statements
    • Handles peer deps
  • Outputs
    • ES
    • CommonJS
    • Must test in a different page to confirm
      • i.e. something in an app/ directory in a macro repo
    • Create a secondary package that contains the least amount of stuff in it and compress it to a single file (zip)
  • Development
    • Watches code changes
      • Without nodemon
  • Rollup config that ISN'T IN the source directory
    • Any config that does exist is merged with the automatically provided config

Plugin Development

  • Auto generates imports for output
    • i.e. No index.ts file required
      • If one is provided then it overrides the default code
    • Respects function comment to ignore in the default export; defaults to public
      • i.e. @@private, @@overlook, @@dismiss, @@noemit

Optional Ideas

Template Generator

Create a generator using whatever template library to create a plugin using my above configurations & requirements to disk. Think Yeoman

Some interesting packages to look into

Publish?

I dunno, if the plugin works as I'd like perhaps publish the plugin maybe?

Useful Plugins

Where I found them all: rollup/awesome: ⚡️

Reference Repos / Articles

TODO

  • Production configs
  • development configs
  • Add a banner
  • Support versioning
  • support bin files
  • Write a rollup runner that uses it's own configs and no those stored within the codebase
  • that auto injector plugin
  • a minifier of some sort
  • play more with exported types
  • a special manifest type of thing
  • what types of watch modes are really nessessary?
  • metrics & observability

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published