Skip to content

🌈 Let Robby take care of your hybrid npm modules. ☄️

Notifications You must be signed in to change notification settings

igorskyflyer/robby

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

🤖 Robby

🌈 Let Robby take care of your hybrid npm modules. ☄️

Robby is the official CLI for Modern Module.


By using it you are creating a hybrid-module and a cross-over until ES modules become a standard in Node too and CommonJS modules become obsolete. 🤸‍♂️


Features

🌷  Node support,
        CommonJS modules and ES modules compatible

💫  browser support¹ - ES modules compatible,
        other module systems are available too

⚡  zero-config,

🔥  JavaScript supported,

☄️  TypeScript supported,

🌟  modules interoperability,

🌴  tree-shaking supported,

🌊  single codebase for you to mantain,

🐦  codebase written in ES modules style,

🦜  type-checked codebase,

🐳  TypeScript declarations (*.d.ts) exported by default,

🦘  transpilation supported.


¹ - if you don't use Node-specific code, of course.



🙋‍♂️ For compatibility reasons this starter uses .js file extension for the ES modules code and .cjs for CommonJS module code which in turn allows ES modules to be consumed by both Node and compatible browsers while also fixing a Node module lookup issue which currently occurs in Visual Studio Code and probably other Node-compatible editors/IDEs causing them to show an error when importing .mjs modules. CommonJS modules .cjs behave as expected. Also, TypeScript compiler doesn't support non-.js files when generating d.ts declaration files.

Another thing to consider, when consuming ES modules, (most) servers are not configured to serve .mjs files with a mime type of application/javascript which is necessary for JavaScript files (including modules) to work properly while the same does not happen when ES modules have the "regular" .js extension.