appendix Setting up the project

 

Before you write any code, you need to have an NPM project set up. In this appendix, I’ll help you create and configure a project to write the code for your framework.

I understand that you might not configure an NPM project from scratch with a bundler, a linter, and a test library, as most frameworks come with a command-line interface (CLI) tool (such as create-react-app or angular-cli) that creates the scaffolding and generates the boilerplate code structure. So I’ll give you two options to create your project:

  • Use the CLI tool I created for this book. With a single command, you can create a project and can start writing your code right away.
  • Configure the project from scratch. This option is more laborious, but it teaches you how to configure the project.

If you want to get started with the book quickly and can’t wait to write your awesome frontend framework, I recommend that you use the CLI tool. In this case, you need to read section A.8. But if you’re the kind of developer who enjoys configuring everything from scratch, you can follow the steps in section A.9 to configure the project yourself.

A.1 Where to find the source code

A.1.1 Checking out the code for each chapter

A.1.2 A note on the code

A.1.3 Reporting problems in the code

A.1.4 Fixing a bug yourself

A.2 Solutions to the exercises

A.3 Advanced topics

A.4 Note on the technologies used

A.4.1 Package manager: NPM

A.4.2 Bundler: Rollup

A.4.3 Linter: ESLint

A.4.4 (Optional) Testing: Vitest

A.4.5 Language: JavaScript

A.5 Read the docs

A.6 Structure of the project

A.7 Finding a name for your framework

A.8 Option A: Using the CLI tool

A.9 Option B: Configuring the project from scratch

A.9.1 The examples folder

A.9.2 Creating the runtime package

A.10 Publishing your framework to NPM