0.0.2 • Published 2 years ago

@gaignoux/frontend-artisan v0.0.2

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

Frontend Artisan / React

Frontend Artisan is a react typescript generator to assist in various projects.

What is this repository for?

  • Quick summary

It is available to support your development by making commands to auto generate api | components | types | interfaces | hooks | context | hoc. Initially the idea was to help new and even more experienced developers to speed up daily development. Removing the need to manually create files that will often have standard structures.

How do I get set up?

  • Summary of set up

First you will need to install the tool in your project of choice, like this:

$    npm i --save-dev @gaignoux/frontend-artisan plop
  • Configuration

Create a plofile.js at the root of your project

module.exports = function (plop) {
	// Here you will load artisan to plop instance
  plop.load('@gaignoux/frontend-artisan');
};

Now you will need to put into your package.json file, a script to run every time you need. Like this:

{
  "scripts": {
    "artisan": "plop --plofile plofile.js"
  }
} 

You can set your own paths as the default setting, so the craftsman doesn't ask you every time he wants to create a new file. For example:

module.exports = function (plop) {
  // Here you will load artisan to plop instance
  plop.load('@gaignoux/frontend-artisan', {
    components: './src/components', // your location for components
    contexts: './src/contexts', // your location for contexts
    hocs: './src/hocs', // your location for hocs
    hooks: './src/hooks', // your location for hooks
    interfaces: './src/interfaces', // your location for interfaces
    types: './src/types', // your location for types
  });
};

Now just test and use as needed.

$    npm run artisan

// or

$    yarn artisan

If you don't want to customize your settings and control the plop command, you can simply call the program directly by configuring it like this:

{
  "scripts": {
    "artisan": "npx @gaignoux/frontend-artisan generate"
  }
} 

And now you can run the previous step that will work in a similar way, but always asking which path you want to create the files.

Test is based on jest, so you just need to contribute and run npm run test;

  • Deployment instructions

No need to implement none of scripts. If you contribute to the project, you only need to run npm run publish:patch to publish a tag like 0.0.1. But if you need to publish a minor or mayor, you just need to run npm run publish:minor or npm run publish:major.

Contribution guidelines

  • Writing tests

Please follow jest test struct. That's the only requirement.

  • Code review

If you found something wrong or witch could be better, fell free to send your pull request for master branch. The package is public but please keep the order.

Who do I talk to?

  • Repo owner or admin

Bruno Gaignoux

  • Other community or team contact

Discord: Bruno Gaignoux#3331

0.0.2

2 years ago

0.0.1

2 years ago

0.0.0

2 years ago