Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Michael Kühnel
    @mischah
    It copies recursicely by default. You could have a look at this pretty small generator of mine: https://github.com/micromata/generator-http-fake-backend
    Paul Perry
    @MistaTwist
    Thanks, man! I'll go and try to learn it and mimic for my scenario :)
    Paul Perry
    @MistaTwist
    @mischah Thankyou again for the help today - I'm almost there now! Still need to set up a test express https backend to serve files while testing- I've now got a generator that creates the project structure for a Twitch extension as per https://github.com/twitchdev/extensions-samples/tree/master/boilerplate (minus the docker stuff)
    just needs a couple of tweaks then I'll publish it at some point this weekend
    Michael Kühnel
    @mischah
    Nice :ok_hand:
    Bindu Wavell
    @binduwavell
    I’m just getting back into working on my yeoman generator and for some reason the tests are not running in IntelliJ, they work just fine from the CLI. Before I post errors, etc. Any guidance on getting yeoman tests to run in IntelliJ?
    Bindu Wavell
    @binduwavell
    Never mind :)
    Damn dependencies… No idea why the tests run in CLI but fail in IntelliJ but there were issues with dependencies…
    Jo Chong
    @jogit82
    Hi, I keep getting error messages trying to install yo
    when i npm i --save yeoman-generator, there was no error

    but when i installed yo, it gives me errors, '$ npm install --save yo

    spawn-sync@1.0.15 postinstall C:\Users\user1\work folders\project1\node_modules\spawn-sync
    node postinstall

    'node' is not recognized as an internal or external command,
    operable program or batch file.
    demo-theme@1.0.0 C:\Users\user1\work folders\project1
    `-- (empty)'

    does it mean im missing some dependency before i can install yo?
    Michael Kühnel
    @mischah

    @jogit82

    mhmm. This never happens on my machine. But it seems to be a known issue of spawn-sync.
    See ForbesLindesay/spawn-sync#42

    Simon Boudrias
    @SBoudrias
    @jogit82 yeah, looks like node is not recognize as a binary on your system. Is node inside your system PATH? (and executable by the user running the install/post-install script?)
    Dhruvdutt Jadhav
    @dhruvdutt
    Is there a way to do snapshot or assertion testing on the configuration written inside .yo-rc.json by generators?
    Michael Kühnel
    @mischah
    None that I know of. Maybe @SBoudrias has an idea.
    Simon Boudrias
    @SBoudrias
    You could expect(readFileSync()).toMatchSnapshot() it’s all just JavaScript, no magic :)
    Dhruvdutt Jadhav
    @dhruvdutt
    Thanks. :D
    Justin Rice
    @jsrice7391
    Hey all, I have a MERN stack generator that I have and want to publish, but both Snyk and npm security checks do not pass due to the sshpk@1.13.1 vulnerability, I have tried uninstalling, but it stick around due to its use as a peer dependancy. Any hints?
    Michael Kühnel
    @mischah
    @jsrice7391 Hej Justin, I don’t see any failing nsp or Snyk checks because of sshpk in any of my generators. Is your generator public? Can you give me a link to your generator on GitHub?
    Charles Moulliard
    @cmoulliard
    Hi
    Is it possible to expose a yeo generator as a REST endpoint in order to call it from a Web Application ?
    Simon Boudrias
    @SBoudrias
    @cmoulliard it would be possible, you can checkout http://yeoman.io/authoring/integrating-yeoman.html on how to run generators programmatically
    @cmoulliard also note that Yeoman is synchronous, so it’ll be time consuming on a web server
    Charles Moulliard
    @cmoulliard
    Thanks. I will have look
    Anthony DeMartini
    @ademartini
    In a generator, how do you copy all of your template files recursively, retaining dir structure, and applying context
    Simon Boudrias
    @SBoudrias
    @ademartini this.fs.copyTpl(this.templatePath(‘**'), this.destinationPath());
    is there issue using this?
    david
    @david19rp
    hi guys, someone knowshow to install https://github.com/yeoman/generator-webapp on windows 10?
    doesn't works and I can't find any fix for this
    image.png
    Stefan Bauer
    @StfBauer

    Hi, question. I have a generator that uses a sub generator.
    The sub generator is installed in the local generator package via dependency and has a fix define version number.
    The sub generator is installed on the client machine in the global node_modules too with an older version.

    When I pass in the local generator during the installation still the older global installed will be take.
    How can I avoid this?

    Simon Boudrias
    @SBoudrias
    @StfBauer answered you on yeoman/yeoman#1702
    Derrick
    @dhinklexo

    Ok, I have a fun question. As part of a generator flow, I'm executing a git clone (internal generator being used to clone projects and then setup hooks, etc). After the clone is done, I need to change the destinationRoot() to be inside the newly cloned folder for a sub-generator - however, when I call destinationRoot(subfolder), my subgenerator ends up writing to a double nested folder.

    So I have something like this:

        await this.spawnCommand('git', ['clone', `git@github.com:org/test-repo.git`]);
        this.destinationRoot('test-repo');
        this.composeWith(require.resolve('../git-hooks'));

    but my subgenerator ends up writing to ./test-repo/test-repo/

    Kevin Zeidler
    @KevinZeidler_twitter
    Screenshot_20180928_125047.png
    Screenshot_20180928_125047.png
    What's the solution for this? (Sorry for the duplicate paste)
    Simon Boudrias
    @SBoudrias
    @KevinZeidler_twitter if it’s working fine you can ignore, it’s only a warning
    but you might have 2 versions of node or npm on your machines - and we’re not sure which one will be running
    Rupam Roy
    @rupamroy
    Hi guys , i want to set up an env variable in the configuring priorty function in my sub-generator , how can i do that
    Dimitar Danailov
    @dimitardanailov

    Hello Guys,

    I'd like to receive a suggestion:

    Quick info about my project:

    I've been working on Generator. Generators creates custom v1 element. I'm using these template files: https://github.com/dimitardanailov/yo-custom-elements/tree/master/packages/generator-custom-element/generators/app/templates

    Let's to discuss the challenge:

    I want to add an additional prompt question: > Where would you like to be stored this or these files?

    I want to give to end user an opportunity to use access to filesystem. Why: I'd like to reduce time of typing and mistakes of invalid directories.

    https://github.com/sullof/inquirer-command-prompt looks such as a good opportunity for this feature.

    I really will appreciate if receive feedback and suggestion: How to achieve this feature.

    Simon Boudrias
    @SBoudrias
    @dimitardanailov that’d be hard without breaking Yeoman’s integration in 3rd party. Yeoman expose an interface other tools can overwrite to display on different UI. That’s why we don’t allow to inject inquirer plugins through a public interface
    Dimitar Danailov
    @dimitardanailov

    @SBoudrias

    Thank you very much for the feedback.
    I'd like to back on the drawing board.

    Dimitar Danailov
    @dimitardanailov
    prompt.png

    I’d like to ask one additional question.
    I have a list with two simple options (Yes and No).

    If user did choice equal to No. I want my generator to generate the files.
    If user did choice equal to Yes. I want my generator to prompt an additional question(s)

    Simon Boudrias
    @SBoudrias
    @dimitardanailov nothing specific to Yeoman about this, just need to use JS. Like an if/else statement calling this.prompt conditionnally
    Yoel Monzón
    @yoelfme
    Hi guys, I'm having an issue but I'm trying to copy a dir from my templates dir to to the destination path, but with an specific I'm receiving an error
    in the specific dir that I'm receiving the error I just have a file .gitkeep
    Simon Boudrias
    @SBoudrias
    @yoelfme what is the error?