-1

I have a problem, with a NPM package, I use the inherit npm

but I don't need to pack it for the image, I need only to build (npm run build) it once and put the build output to the image.

But if I remove inherit npm I get errors, same when I would like the npm_do_configure and npm_do_compile override with a shell function in my receipt.

What should I do, to make it working? I need not the package, I need the build output from the package.

Jomaar
  • 84
  • 9

2 Answers2

0

Okay I got it.

with

do_my_compile(){
    # my work
}
addtask do_my_compile after do_compile

do_install () { 
    # my install
}

do_my_compile[network] = "1"
do_configure[noexec] = "1"
do_compile[noexec] = "1"

I was able to build the source I need for my reciept.

Jomaar
  • 84
  • 9
0

I know that maybe I'm too late

Instead of defining a do_my_compile function and disabling the other default tasks (do_compile[noexec]) you can just do

do_compile () {
    # npm doing
    # your compiling commands
    
}

do_install () {
    # install your compiled output
}

you can also find an example here, on the tipsNtricks wiki