Follow these steps to install and run the Taiwan National Health Insurance Info Chrome extension:
- Verify Node.js Version: Ensure your Node.js version is 18 or higher.
- Clone the Repository: Clone this repository to your local machine.
- Update Package Information: Modify the
name,description, andrepositoryfields in thepackage.jsonfile to reflect your project's details. - Update Extension Name: Change the name of your extension in the
src/manifest.jsonfile. - Install Dependencies: Run
npm installto install all necessary dependencies. - Start Development Server: Run
npm startto start the development server. - Load Extension in Chrome:
- Navigate to
chrome://extensions/in your Chrome browser. - Enable
Developer modeby toggling the switch in the upper right corner. - Click on
Load unpackedand select thebuildfolder from your project directory.
- Navigate to
- Begin Development: Your extension is now loaded and ready for development.
Enhance your workflow efficiency with the webpack server used for development (started with npm start). It includes an auto-reload feature that automatically reloads the browser every time you save a file in your editor.
To run the development mode on a different port, specify the PORT environment variable like this:
$ PORT=6002 npm run start
Check here for more information on content scripts.
After the development of your extension run the command
$ NODE_ENV=production npm run build
Now, the contents of the build folder will be the extension ready to be submitted to the Chrome Web Store. For more information about publishing, refer to the official guide.