Pkg: Multiple Assets

Created on 4 Mar 2018  路  4Comments  路  Source: vercel/pkg

is it possible to have 2 asset directories ?
My project folder:
ASSETS
_index.html
jquery-3.2.1.js_
IMAGES
_green.jpg
red.jpg_

arbitre.js
package.json

package.json:
{
"name": "arbitre",
"bin": "arbitre.js",
"pkg": {
"assets": "assets",
"assets": "images"
},
"dependencies": {
"pkg": "^4.3.0",
"socket.io": "^2.0.4"
}
}

i declare my image into arbitre.js:
var imgGreen = path.join(__dirname, 'images/green.jpg');
var imgRed = path.join(__dirname, 'images/red.jpg');

when i compile via pkg, the "folder" image wasn't include into package.
i need help.
Thank you !!!

Most helpful comment

assets can be specified with a array

It would be good to have this mentioned in the docs as it's not obvious.

All 4 comments

assets can be specified with a array

I tried:

"pkg": {
"assets": ["assets", "images"]
},

but it does not work

"pkg": {
"assets": ["assets/**/*", "images/**/*"]
},

assets can be specified with a array

It would be good to have this mentioned in the docs as it's not obvious.

Was this page helpful?
0 / 5 - 0 ratings