Appendix A. 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 you might not typically configure an NPM project from scratch with a bundler, a linter, and a test library yourself, as most frameworks come with a CLI tool (like, for example create-react-app or angular-cli) which does the scaffolding and generating the boilerplate code structure for you. So I’ll give you two options to create your project:

  1. Use the CLI tool I created for this book. With a single command, you can create a project where you can start writing your code right away.
  2. Configure the project yourself, from scratch. It’s more laborious, but you get to learn how to configure the project.

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

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 issues 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 The 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 packages

A.10 Publishing your framework to NPM

A.10.1 Creating an NPM account

A.10.2 Logging in to NPM