2.2.2 • Published 9 months ago

nextension v2.2.2

Weekly downloads
1
License
MIT
Repository
github
Last release
9 months ago

Nextension

An Advanced CLI Tool for Building Next.js Applications as Chrome Extensions

imageedit_16_4061035640

Table of Contents

  1. Introduction
  2. Features
  3. Installation and Usage
  4. Command Line Options
  5. Examples
  6. File Structure
  7. Troubleshooting
  8. Contributing
  9. License

Introduction

Nextension is an advanced CLI (Command Line Interface) tool designed for developers proficient in Next.js to easily convert their Next.js applications into fully functional Chrome extensions. With Nextension, developers can rapidly create Chrome extensions from their Next.js projects, enabling them to leverage the power of Next.js for building progressive web applications and taking advantage of the Chrome extension ecosystem for distribution.

Features

Nextension is equipped with a variety of features to simplify the process of transforming Next.js projects into Chrome extensions:

  • Seamless Next.js Integration: Maintains all Next.js capabilities during the conversion process.
  • Automatic Manifest Generation: Generates the required manifest.json file, adhering to the Chrome Extension Manifest format. If a manifest.json isn't found in your assets directory, it prompts you to generate a template.
  • HTML Code Beautification: Uses js-beautify to enhance readability and maintainability of the HTML code.
  • Assets Handling: Copies your assets directory to the output directory automatically, ensuring all necessary assets are included in your Chrome extension.
  • Package Manager Detection: Automatically identifies your project's package manager (npm, yarn, or pnpm) and uses it to run the build commands.
  • File Organization: Arranges your files into specific directories like scripts, styles, and icons, resulting in a clean directory structure.
  • Robust Error Handling: Logs any issues encountered during the build process, assisting in troubleshooting.

Installation and Usage

To install Nextension, ensure that you have Node.js version 14.0.0 or higher installed on your system.

Global Installation

For global installation, use the following command:

npm install -g nextension

This allows you to run nextension from any directory:

nextension [options]

Local Installation

For local installation (specific to a project):

npm install --save-dev nextension

After you've installed Nextension, you can run it in your project using the following command:

npx nextension [options]

Command Line Options

OptionAliasDescription
--help-hRun help command for options panel
--verbose-vRun with verbose logging
--generate-manifest-mPrompt to generate a manifest file if not present
--generate-background-bPrompt to generate a background script if not present
--generate-content-cPrompt to generate a content script if not present
--generate-popup-pPrompt to generate a popup script and HTML if not present
--generate-options-oPrompt to generate an options script and HTML if not present
--generate-action-aPrompt to generate an action script if not present

Examples

To use Nextension with verbose logging:

nextension --verbose
nextension -v

To generate a manifest file if not present:

nextension --generate-manifest
nextension -m

File Structure

File / DirectoryDescription
dist/build.d.tsTypeScript definition file for build.js
dist/build.jsTranspiled JavaScript file of build.ts
dist/build.js.mapSource map file for build.js
dist/cli.d.tsTypeScript definition file for cli.js
dist/cli.jsTranspiled JavaScript file of cli.ts
dist/cli.js.mapSource map file for cli.js
dist/utils.d.tsTypeScript definition file for utils.js
dist/utils.jsTranspiled JavaScript file of utils.ts
dist/utils.js.mapSource map file for utils.js
src/build.tsTypeScript source file for the build process
src/cli.tsTypeScript source file for the CLI
src/utils.tsTypeScript source file for utility functions
package-lock.jsonAutomatically generated file for any operations where npm modifies node_modules or package.json
package.jsonFile that lists the packages your project depends on
README.mdThe file that contains the documentation for your project
tsconfig.jsonThe configuration file for the TypeScript compiler

Troubleshooting

If you encounter any issues while using Nextension, please open an issue on GitHub.

Contributing

We appreciate contributions from the developer community! To contribute:

  1. Fork the Nextension repository on GitHub.
  2. Clone your forked repository to your local machine.
  3. Create a new branch for your contribution.
  4. Make your changes to the codebase.
  5. Ensure that all existing tests pass and add new tests as needed.
  6. Commit your changes and push them to your forked repository.
  7. Create a pull request from your branch to the main Nextension repository.

If you have any questions or need assistance with the contribution process, feel free to reach out to us on GitHub.

License

Nextension is open-source software released under the MIT License. Feel free to use and modify Nextension as per the terms of the license.


Thank you for choosing Nextension! We hope you find it a valuable tool for building powerful Chrome extensions with the ease and flexibility of Next.js. Happy coding!

Return to Top

1.2.0

9 months ago

1.0.2

9 months ago

1.0.1

9 months ago

1.0.0

9 months ago

1.0.9

9 months ago

1.0.8

9 months ago

1.0.7

9 months ago

1.0.6

9 months ago

1.2.3

9 months ago

1.0.5

9 months ago

1.2.2

9 months ago

1.0.4

9 months ago

1.2.1

9 months ago

1.0.3

9 months ago

2.2.1

9 months ago

2.2.0

9 months ago

2.0.2

9 months ago

2.2.2

9 months ago

2.2.13

9 months ago

2.2.11

9 months ago

2.2.12

9 months ago

2.0.1

9 months ago

2.0.0

9 months ago

1.1.1

9 months ago

1.1.0

9 months ago

1.1.9

9 months ago

1.1.8

9 months ago

1.1.7

9 months ago

1.1.6

9 months ago

1.1.5

9 months ago

1.5.0

9 months ago

1.1.4

9 months ago

1.1.3

9 months ago

1.1.2

9 months ago

2.1.1

9 months ago

1.2.23

9 months ago

1.2.24

9 months ago

1.2.21

9 months ago

1.2.22

9 months ago

1.2.27

9 months ago

1.2.28

9 months ago

2.1.0

9 months ago

1.2.25

9 months ago

1.2.26

9 months ago

1.2.29

9 months ago

1.0.91

9 months ago

2.0.22

9 months ago

2.0.23

9 months ago

1.2.31

9 months ago

1.0.93

9 months ago

2.0.21

9 months ago

1.0.92

9 months ago

1.2.34

9 months ago

1.2.32

9 months ago

1.2.33

9 months ago

0.0.0

4 years ago