JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • 0
  • Score
    100M100P100Q45462F
  • License MIT

Yeoman generator to create yeoman generators based in ES Modules.

Package Exports

  • generator-esmodules-generator
  • generator-esmodules-generator/app

Readme

Welcome to generator-esmodules-generator ๐Ÿ‘‹

Version Documentation Maintenance License: MIT

Yeoman generator to create yeoman generators based in ES Modules.

๐Ÿ  Homepage

The generator-esmodules-generator provides a structure to create a yeoman generator using ES Modules.

The structure created by this generator includes:

Example of a generator created by generator-esmodules-generator:

Captura de pantalla (10)

Index

Prerequisites

  • npm >= 4.0.0

Installation

First, install Yeoman and generator-esmodules-generator using npm (we assume you have pre-installed node.js).

npm install -g yo
npm install -g generator-esmodules-generator

Then generate your new project:

yo esmodules-generator

The configuration files

The configuration files included are:

  • Eslint: .eslintignore (the files and directories ignored by eslint) and .eslintrc.json (configuration used by eslint).

  • Git: .gitignore (the files and directories ignored by git).

  • Lint-staged: .lintstagedrc.json (configuration used by lint-staged).

  • Prettier: .prettierignore (the files and directories ignored by prettier) and .prettierrc.json (configuration used by prettier).

  • Babel: babel.config.json (configuration used by babel):

    • The env.buildCommonjs contains the configuration used to transpile the source code to es5.

    • The env.buildESmodules contains the configuration used to transpile the source code to es6.

  • Commitlint: commitlint.config.js (configuration used by commitlint).

  • Jest: jest.config.js (configuration used by jest).

  • TypeScript: tsconfig.json (configuration used by TypeScript compiler).

The scripts in package.json

The more important scripts added into the package.json created by this generator are:

  • "init": Runs the commands necessary to initialize the package, for example init:husky. It executed automatically when Do you want to automatically run the scripts that configure the package, then installing the dependencies? is yes.
  • "documentation:create": Creates documentation using readme-md-generator. It executed automatically when Do you want to automatically run the scripts that configure the package, then installing the dependencies? is yes.
  • "format": Checks the format using prettier.
  • "format:fix": Fixes the format using prettier.
  • "format:build-stage" and "format:build-stage:fix": similar to "format" and "format:fix". They used when the npm run build is called.
  • "lint": static code analysis using eslint.
  • "lint:fix": Fixes the code using eslint.
  • "lint:build-stage" and "lint:build-stage:fix": similar to "lint" and "lint:fix". They are used when the npm run build is called.
  • "build:tsc": Generates .d.ts files using the TypeScript compilator. It is used when the npm run build is called.
  • "build:es5": Transpiles the source code to es5 using babel.
  • "build:es6": Transpiles the source code to es6 using babel.
  • "build": Generates the dist folder, that contains the cjs folder (source code transpiled to es5), the esm folder (source code transpiled to es6), and types folder (it contains the declaration files).
  • "prepublishOnly": Used before publishing your package using npm publish. Runs npm run build.
  • "test": Runs the tests using jest.
  • "commitlint": Runs commitlint. It is used into .husky/commit-msg file. It is called by the commit-msg hook. See git hook.
  • "lint-staged": Runs lint-staged. It is used into .husky/pre-commit file. It is called by the pre-commit hook. See git hook.
  • "quality-check": Runs npm run format && npm run lint && npm run test. It is used into .husky/pre-push file. It is called by the pre-push hook See git hook.

Getting To Know Yeoman

  • Yeoman has a heart of gold.
  • Yeoman is a person with feelings and opinions, but is very easy to work with.
  • Yeoman can be too opinionated at times but is easily convinced not to be.
  • Feel free to learn more about Yeoman.

Author

๐Ÿ‘ค Cristopher Jimรฉnez

๐Ÿค Contributing

Contributions, issues and feature requests are welcome!
Feel free to check issues page.

Show your support

Give a โญ๏ธ if this project helped you!

๐Ÿ“ License

Copyright ยฉ 2023 Cristopher Jimรฉnez.
This project is MIT licensed.


This README was generated with โค๏ธ by readme-md-generator