#copying files when building

21 messages · Page 1 of 1 (latest)

somber crypt
#

I'm working on a yeoman generator and migrating it to typescript.
I followed a tutorial.

it said to use cpy-cli to copy the src/**/templates folder into generators/**/templates when building it.
i tried, but running npx cpy **/templates ../generators -cwd=src like the tutorial shows, it doesn't do anything.
how do i get this to work?
*
self promo, the project

somber crypt
#

!helper

old badge
#

You didn't follow the tutorial correctly

#

The tutorial said you have to use the cpy-cli pacakge

#

But when calling npx, you pass the cpy pacakge

#

Those are different packages

#

If the command is different from the package name, you have to use -p when calling npx

#

The correct command should be npx -p cpy-cli cpy **/templates ../templates

#

@somber crypt

somber crypt
#

ahhhh wait, ahhh

somber crypt
#

it straight up, doesn't copy anything.

#

cpy app/templates ../../generators --cwd=src works, but only for app.

old badge
#

@somber crypt you are calling cpy, not cpy-cli

somber crypt
#

inya video it show cpy.

old badge
#

¯_(ツ)_/¯

somber crypt
#

ahh

old badge
#

just check out the actual doc for cpy

#

cuz video tutorials teach you nothing

somber crypt
#

ok, this WORKS: cpy app/templates ../../generators --cwd=src

#

and the docs for cpy say it should work