cpe

@larsroettig/create-pwa-extension

Code Generator for Magento PWA Studio extensions

Showing:

Popularity

Downloads/wk

2

GitHub Stars

18

Maintenance

Last Commit

5mos ago

Contributors

3

Package

Dependencies

14

Size (min+gzip)

138.2KB

License

MIT

Type Definitions

Tree-Shakeable

No?

Categories

Readme

PWA Studio extension generator

An extension generator for Magento PWA Studio includes all you need to build an amazing extension

  • 📏 ESLint - JavaScript linter
  • 💖 Prettier - Opinionated Code Formatter
  • 📄 Jest - Setup React Testing Library
    • 🦉 @testing-library/jest-dom - Custom jest matchers the state of the DOM
    • 🐏 @testing-library/react-hooks - React hooks testing utilities that encourage good testing practices
  • 🐶 Husky - Use git hooks with ease
  • Automatically installs project's peer dependencies -
  • 🗂 Basic Module structure

🚀 Getting started

yarn create @larsroettig/pwa-extension 
npm init @magento/pwa
ParameterDescription
--template @yournamespace/templatecustom template for code generator
-venable verbose log for code generator
-ddebug download from node registry

Create your own templates

Via a parameter, you can define your own template --template @yournamespace/template
The code generator will copy any file from a node package. It solves and download packages via npm view --json ${packageName} for it should work for a private repository as well.

My starter template you can find here: https://github.com/larsroettig/create-pwa-studio-extension/tree/main/packages/cpse-template

❗ Attention by default LICENSE will be delete from your template but if you want to define LICENSE file you can use LICENSE.template

A minimal template need the following files: package.json

{
  "name": "@your-name/cpse-template",
  "author": "your-name <your-mail@domain.tdl>",
  "version": "2.0.0",
  "license": "MIT",
  "publishConfig": {
    "access": "public"
  }
}

package.json.template

{
  "name": "@larsroettig/pwa-extension-template",
  "author": "Lars Roettig <hello@larsroettig.de>",
  "version": "0.0.0",
  "main": "src/index.js",
}

Optional

.gitignore.template

node_modules

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100
No reviews found
Be the first to rate

Alternatives

No alternatives found

Tutorials

No tutorials found
Add a tutorial