All of lore.kernel.org
 help / color / mirror / Atom feed
* Integrating npm into install?
@ 2021-03-10 19:57 Paul Wicks
  0 siblings, 0 replies; only message in thread
From: Paul Wicks @ 2021-03-10 19:57 UTC (permalink / raw)
  To: yocto

[-- Attachment #1: Type: text/plain, Size: 867 bytes --]

I've got a python app that uses some javascript assets that are normally
built via webpack. In a normal build, the process is as follows:

* run "npm install" to get all the javascript dependencies
* run "npm build", a custom task in my package.json file that invokes
webpack to build the assets and place them where the python install can
find them.
* run "python setup.py install" to build and install the python part of the
app

What's the best/most correct way to integrate this into a yocto recipe? My
current approach is to have the main recipe "inherit setuptools3" and then
add the following:

"
do_run_npm_install() {
    bbplain "Running npm install, this may take a few minutes..."
    npm install
    npm run build
}

addtask run_npm_install before do_compile
"

However, this fails with an "npm: not found" error.

-Paul Wicks

[-- Attachment #2: Type: text/html, Size: 2125 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-03-10 19:57 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-10 19:57 Integrating npm into install? Paul Wicks

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.