Yeoman Generator Next Steps - yeoman-generator

I'm new to creating a Yeoman Generator. I used generator-generator to get me started and I went through the process of creating it, testing, and getting it all buttoned up.
In the tuts for creating a yo generator they seem to leave off where my question is headed.
Question: What next? I've got it all readyL
Do I submit it to Yeoman?
Simply put it on my Github?
How can I get it to where others can start using my shiny new generator?
Thanks for the help / guidance.

Found here: http://www.eguneys.com/blog/2014/09/17/lets-build-a-yeoman-generator-2
Publish Your Generator
Finally you can publish your generator. First create an account on npm. Next set your npm author info.
$ npm set init.author.name "Your Name"
$ npm set init.author.email "Your Email"
$ npm set init.author.url "Your Website"
$ npm adduser
Then publish with.
$ npm publish
A note about the package.json format
There is a list of yeoman generators in the official yeoman website. It is automatically pulled from the npm API. To list your generator there you need to add yeoman-generator keyword to your package.json and a repository description on Github.

You just need to publish it to npm.
Make sure to add "yeoman-generator" as a keywords in your package.json file so it'll be listed on yeoman.io and by yo when a user search for generators.

Related

jhipster bootswatch yo generator not installed

Good morning,
i want to add bootswatch module to change theme of jhipster project as needed. Following the guide https://www.npmjs.com/package/generator-jhipster-bootswatch I installed the npm install -g generator-jhipster-bootswatch module successfully. I get an error when I run the next command yo jhipster-bootswatch
enter image description here
The output of the yo doctor command reveals no problems with this
enter image description here
Do you have any tips to resolve this message?

Why isn't my clojure/cljs app deploying on Heroku?

I'm trying to deploy my app to heroku and I keep getting this error:
The required namespace "react" is not available, it was required by "reagent/core.cljs".
But I have
"react": "17.0.2-0",
"react-dom": "17.0.2-0",
"react-highlight.js": "1.0.7",
all in my package.json and I also put
[cljsjs/react "17.0.2-0"]
[cljsjs/react-dom "17.0.2-0"]
in my project.clj. I also did npm install react. I'm not sure what I'm doing wrong?
It compiles fine using shadow-cljs to my localhost, but it won't compile when I try to push to heroku. Any idea what I'm missing?
Editing to add some more details:
I made a bin/build file based on this blog post, even though I'm not using Fulcro: https://folcon.github.io/post/2020-04-12-Fulcro-on-Heroku/
I created a bin/build file that say this:
#!/usr/bin/env bash
npm install
npx shadow-cljs release main
clojure -A:depstar -m hf.depstar.uberjar fulcro.jar
I added this to my shadow-cljs.edn file:
;; v-- and this!
:release {:compiler-options {:optimizations :advanced}}}
And it also said to add something to my deps.edn file, but I don't have one so I didn't.
I also did the buildpack step to add the clojure and nodejs buildpacks, although I'm not using nodejs to my knowledge.
I had the same problem, it was very easy to fix.
You need to first specify buildpacks nodejs, and after it only clojure.
from here:
npm install react react-dom create-react-class

why does npm gives me warning when i try to install jquery-csv library using VS in ubuntu

I'm trying to install jquery-csv library
with visual studio in ubuntu for the first time
the instruction says that to install package I should run:
npm i jquery-csv
however whenever I tried it npm warns me that it can't find package.son:
is this something i'm expected to see in a normal package installation?
if not, please help me with some instructions
The error you're getting suggests you aren't using a Node.js project and don't have a package.json file.
If this is an existing browser-based project and you want to add the library, you can download jquery.csv.min.js from here: https://github.com/typeiii/jquery-csv/tree/master/src , and add a client-side (browser) reference in your HTML file as shown on the readme:
<script src="jquery.csv.min.js"></script>
If you're working on a new Node.js project, the first step is to run npm init, see npm init - create a package.json file

I didn't run "Yarn add react-native" to a folder, will I run into issues when starting a project? I'm a noob and am just starting out

I used the CLI to install React Native, Node and Python but was not aware if I needed to save it to a file first.
I ran the yarn command:
➜ ~yarn add <package>
I would get this warning message when running yarn check:
➜ ~ yarn check
warning package.json: No license field
warning No license field
warning "jest-haste-map#fsevents#node-pre-gyp#^0.12.0" could be deduped from "0.12.0" to "node-pre-gyp#0.12.0"
Questions:
1. Do I only ~ yarn add when I start a project?
2. Since I've installed python, node, and react-native without creating a project folder will I run into issues down the road?
3. Do I add the json file with the licenses manually when starting a project with yarn?
4. Am I hopeless? lol
I've tried uninstalling and reinstalling from yarn and updating yarn. Also, I've tried installing python and node from Homebrew to see if that changes anything.
Below is a log of the output from the CLI after running ~ yarn check
Last login: Sat Aug 24 02:21:38 on ttys001
➜ ~ yarn check
yarn check v1.17.3
warning package.json: No license field
warning No license field
warning "jest-haste-map#fsevents#node-pre-gyp#^0.12.0" could be deduped from "0.12.0" to "node-pre-gyp#0.12.0"
success Folder in sync.
✨ Done in 1.99s.
Solution I figured it out! So after poking around I realized that once I started a project I had a yarn.lock and package.json file one level up in the directory where the file was located. What I did was I deleted yarn.lock and package.json associated with the folder in the directory. After that was complete I then went into my project and installed the correct packages.
You're not hopeless. This project may be, you've bitten off waaaay more than you can chew yet.
To answer your main question:
yarn add and it's cousin npm install will install the thing you tell them to in the node_modules folder in the directory you run the command in. The reason it's yelling at you is because usually you'll want to save the thing you installed as a dependency of your project, and you can't do that without a package.json file. You should run npm init to set up the package.json file for your project, then running yarn add will actually save it to the dependencies list so that you have a reproducible. If you have a package.json file already, it sounds like you maybe created it by hand (since it's missing a license field?) rather than have npm set it up for you, which is a bad idea.
Two more things:
React Native is awesome! ...But, it's a tool for people who already have good familiarity with Javascript command line/tooling/ecosystem/coding/React to build mobile apps. It is a lousy choice for a first project if you're just getting started with programming. Building a webpage with React is a lot easier, but even that may be too much.
If you really want to build a React Native app and you just can't wait look at this to get started.
But seriously, learn Javascript then npm then yarn then React then React Native. In that order.

How do I install vuetify directly from github?

When I try with
npm install vuetifyjs/vuetify#v1.5.2
I get "Cannot find package".
UPDATE:
There is a packages folder under which there is a vuetify directory.
I tried npm installing that folder. Everything appeared to go well until I started the dev server.
Now in the console log I see:
[Vuetify] Multiple instances of Vue detected
Seems to be related to https://github.com/vuetifyjs/vuetify/issues/4068 but I cannot tell what the solution is at this point.
I had the same issue to use my own version of Vuetify, waiting for my pull request being accepted.
Here what I did:
I build the vuetify project with my fix.
yarn
yarn build
Then I took the content of 'packages/vuetify' and put it in a new git repository. I remove the .gitignore to be able to commit built files (/es5, /lib, /lib-temp, /dist)
Finally I add this git repository to my project to replace my vuetify version:
npm install git+https://gitlab.com/GITLABUSERNAME/REPOSITORYNAME.git
Looking at the package.json file, the package doesn't have a name property, which it would need to have for you to be able to install it from GitHub.
So the short answer is that you can't install vuetify directly from GitHub via npm.
However, you can install it directly from npm:
npm install vuetify#1.5.2
You can't install vuetify directly from GitHub but you can edit code in 1 component node_modules/vuetify/lib/components/VSlider/VSlider.js Then, you install patch-package and execute path package vuetify Delete node modules and execute yarn to create new node modules Last, yarn serve, you see your code is work
https://www.npmjs.com/package/patch-package

Resources