- 1. Create a new Rocket Science application
- 2. Provide the CLI the name of your project
- 3. Change directories into your newly generated project
- 4. Run the setup script
- 5. Start the newly generated Rocket Science Application
- 6. Check out the newly opened tab on localhost:6006
1. Create a new Rocket Science application
run $ npx create-rs-app
This will clone and customize the Rocket Science repository based on the choices made during the CLI prompts after the command is run.
2. Provide the CLI the name of your project
run $ NewRocketScienceApplication
This will determine the name of not only the parent directory of the application, but also the name provided to the ModuleFederationPlugin
in the ./webpack.config.js
3. Change directories into your newly generated project
run $ cd NewRocketScienceApplication
4. Run the setup script
run $ yarn setup
- ensures a modern version of Node.js is installed (15, 16, 17). This can be changed in the package.json if you are using an older version, but may introduce bugs we have not accounted for.
- installs dependencies
- runs unit tests to create .jest-test-results.json for tests storybook addon
5. Start the newly generated Rocket Science Application
run $ yarn launch
- deletes ./dist folder holding previous builds
- runs webpack build in watch mode
- leaves the node process running to listen for changes
- generates new build on saved changes
- starts storybook
- starts federated module CDN server on port 3001