Facebook Builds Rome |
Tuesday, 31 March 2020 |
Facebook has developed Rome, an “all-in-one” solution for JavaScript and TypeScript development. The project (named after the saying that 'all roads lead to Rome') is described as a complete JavaScript toolchain that compiles and bundles JavaScript projects, lints and type-checks, runs tests, and can also format code. Rome's development was started by Sebastian McKenzie who is also the creator of Babel and Yarn, and it is now being developed by the React Native team at Facebook. They say Rome takes a different approach to JavaScript tooling than existing Open Source stacks, and is perhaps more similar to the internal monorepo-based tooling found at very large companies. Rome takes care of all the build and compile steps so developers avoid having to pass source code through multiple tools for the different stages.
Rome consists of a compiler, linter, formatter, bundler, and testing framework. It is written in TypeScript, is self-hosted and compiles itself with an old version. It can be used to process JSX, Flow, and TypeScript code. While Rome has a number of elements, you can choose to use parts of it with other tools. All compilation in Rome happens on a per-module basis, allowing each module to be processed in a pool of worker threads. To avoid this leading to a need to re-parse every module, they need to be pre-namespaced such that they can all share a single scope. While compilation is carried out per file, Rome can bundle the individual elements by prefixing all module-scoped variables with an identifier generated based on the module’s filename. This is also applied to each module’s imported and exported identifiers, which means any module export can be addressed using only the module’s filename and the export name: Rome is still experimental and in active development, and the team say it's open for contributors and those interested in experimental tools. One nice touch about the project; the developers say they know the logo they've chosen is of an ancient Greek spartan helmet, meaning it's not very relevant since it's not Roman, but it looks cooler than the Roman equivalent.
More InformationRelated ArticlesBabel Adds Ability To Parse F# Like Pipelines Facebook Releases React Native
To be informed about new articles on I Programmer, sign up for our weekly newsletter, subscribe to the RSS feed and follow us on Twitter, Facebook or Linkedin.
Comments
or email your comment to: comments@i-programmer.info |
Last Updated ( Wednesday, 08 April 2020 ) |