Git Product home page Git Product logo

make-js-component's Introduction

Hi everyone ✌️

Hi, I'm Giuliano and I'm a freelance full stack web developer based in Rome. I work as developer since i was 23, while i was taking a literature degree, since i really have many different interests and believe in the power of having a flexible mind. Coding for me is a way of playing around. It really feels like doing lego-like stuff, and really can't have enough of this digital-artisan like sensation 🛠️

I lately started also teaching junior developers and writing dev articles. In the last years the love for sharing knowledge has grown in me more and more,found its way in my everyday life, and couldn't be more happy and satisfied with it. ❤️

So if you want start a conversation about dev, having some fun coding together, sharing and build some ideas, reach out and let's enjoy. 😁

🛠️ Currently working on

📚 Currently learning

  • Rust 🦀

🖥️ My favourite languages

  • PHP 🐘
  • Python 🐍
  • Javascript

DEV Latest Articles

Where you can find me

twitter Linkedin Devto

Newsletter 📧

You can read my newsletter Here
I publish every Monday at 9AM CET
Or you can subscribe and have it directly in your mail here

make-js-component's People

Contributors

andrearanica avatar cristinagenduso avatar dariotheluca avatar eddiejaoude avatar fmineo avatar giuliano1993 avatar giuppidev avatar giuseppesciacca avatar giuseppevignanello avatar irfansalim avatar jackcoral89 avatar mjs001 avatar renzodef avatar steeoghr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

make-js-component's Issues

Adding advanced for Qwik

Following the model used for VUe advanced ( PR #78 ), we can create Advanced for Qwik to allow user to "compose" their component with the parts they prefer

Prevent old components from being overwritten by creating homonymous components

Currently, when a new component is created in the same directory and with the same name (and extension clearly) as one that already exists, the latter is overwritten without any kind of warning.
I think it would be useful to introduce a warning if you are trying to overwrite an already existing component and ask for confirmation whether or not you intend to proceed.

Define defaults for React

We might need some default set for each framework, in order to skip the post framework selections step with a flag.

This issue is about picking the defaults for React

Define defaults for Qwik

We might need some default set for each framework, in order to skip the post framework selections step with a flag.

This issue is about picking the defaults for Qwik

Define defaults for Svelte

We might need some default set for each framework, in order to skip the post framework selections step with a flag.

This issue is about picking the defaults for Svelte

Implement tests

Some tests should be implemented to check the maintainability and functionality of the package so it doesn't break while growing and being developed.
I mean also to implement github actions the use tests before allowing merging

Implement Commander to skip framework selection steps

That would be cool, instead of going necessarily trough all the wizard, to be able to give an optional argument after the npx make-js-component in order to skip the framework selection step and go right into the options

the command would then look like
npx make-js-command [frameworkname]

Define defaults for Vue

We might need some default set for each framework, in order to skip the post framework selections step with a flag.

This issue is about picking the defaults for vue

[ react ] add in file style option

It would be nice to have some styling option on React component creation, for example:

  • Tailwind (just adding some basic classes)
  • Styled component

Add control for empty component name

Reproduction steps

When starting the process, it now allows to go on after empty component name. That should be avoided

Do you want to work on this issue?

No

Adding advanced for React

Following the model used for VUe advanced ( PR #78 ), we can create Advanced for React to allow user to "compose" their component with the parts they prefer

adding a --default flag

We could use a [-d --default] flag that applies all the defaults for the framework, so that we can fully skip the framework wizard and directly have the component

Add another component question

When the component creation is complete, ask the user if they want to create another component.
This would allow to directly run again the command and create more component at once

Add --multiple flag

We could add a --multiple flag that, if checked, at the end of each component creation asks the user if he wants to exit.
Otherwise the creator command will be launched once again.

Doing the user is able to easily create more components in a row

Code refactor

Hi, I have already contributed to the project by implementing the React CSS Module feature.

I am excited about the project and really like it, but to be honest, I found the code to be somewhat procedural and, at times, repetitive and confusing.
For example, there are too many nested if/else statements, or repeated code between JS/TS in React components, and there are no comments in the code.

If you agree, I already have ideas on how to make it more extensible and open to modifications.

I believe this choice will completely influence the architecture of the library, so it would be appropriate to suspend the implementation of new features until the refactoring is done.
I also think that now is the right time, especially since the project is still small and there is no documentation yet.

I can put my ideas into action quickly, but with one condition: I am not very confident with TypeScript, so I would only handle the JavaScript part.

What do you think?

Don't allow special characters in component name

Reproduction steps

When starting the process, it now allows to use whatever character in component name. That should be avoided and only letters shall be allowed

Do you want to work on this issue?

No

Not handled exception when trying to create a component into a subfolder

Reproduction steps

When I try to save the component into a subfolder inside a subfolder, the script gives a not handled exception if the second subfolder doesn't exist
Instead, if I give only a folder that doesn't exist, it creates it without problems


? Give a name to your component test1
? Custom path under the component folder for saving your component test1/test1
? Pick a framework to create the component for React
? Do you want to use Typescript? No
? Do you want to use any CSS framework? No
node:internal/fs/utils:347
    throw err;
    ^

Error: ENOENT: no such file or directory, mkdir 'src\components\test1\test1'
    at Module.mkdirSync (node:fs:1396:3)
    at file:[...]src/utils/utils.mjs:16:16
    at FSReqCallback.readFileAfterClose [as oncomplete] (node:internal/fs/read_file_context:68:3) {
  errno: -4058,
  syscall: 'mkdir',
  code: 'ENOENT',
  path: 'src\\components\\test1\\test1'
}

Add types on wizard.mts

Reproduction steps

The input in wizard.mts have no type and could have string.

Also the whole const wizard could have a type return like Promise<Answers>



### Do you want to work on this issue?

Yes

[react] Add the style option

It would be nice to have some styling option on React component creation, for example:

  • Tailwind (just adding some basic classes)
  • Styled component
  • Modules (the more difficult one because it involves another file creation)

Implement Commander to skip component name step

That would be cool, instead of going necessarily trough all the wizard, to be able to give an optional argument after the npx make-js-component in order to skip the component name writing step and go right into the next options

the command would then look like
npx make-js-command --name=[componentName]

Improve documentation

Readme.md file could be improved, especially we should describe the options available for each framework

bug when creating React component with "styled-component"

Reproduction steps

Give a name to your component test
Custom path for the component (default: src/components) 
Pick a framework to create the component for React
Do you want to use Typescript? No (or Yes)
Do you want to use any CSS framework? Styled Components

Do you want to work on this issue?

Yes

Documentation for working with flags

We need a comprehensive an cohese documentation about working directly with flags.
At the moment we have 3 flags
--name <name> allows to specify the component name
-f <framework> let you specify one of the available frameworks ( at the moment of writing Vue, React, Angular, Qwik, Svelte and Astro)
--folder <path> the components subfolder in which add the component. The folder is created if it doesn't exsists

Make new component extension dynamic

At the moment the extension defaults to .vue, since originally that package generated only vue components; should be dynamic, depending on the framework of choice

Adding advanced for Svelte

Following the model used for VUe advanced ( PR #78 ), we can create Advanced for Svelte to allow user to "compose" their component with the parts they prefer

Adding advanced for Angular

Following the model used for VUe advanced ( PR #78 ), we can create Advanced for Angular to allow user to "compose" their component with the parts they prefer

Implement creation of a local config file

We could use a subcommand to implement a custom configurations file to define things such the default components folder or some other default ( like composition or option API for vue or typescript use on each component)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.