Packaging nodejs apps
didrocks at ubuntu.com
Mon Nov 14 10:34:17 UTC 2016
Le 14/11/2016 à 10:55, Stephen Stewart a écrit :
> While looking into a nodejs/yarn plugin I wondered if I could make a
> yarn snap (not plugin), and simply define nodejs and yarn as parts,
> use dump plugin and be done, no plugin required:
> "Parts 'yarn' and 'node' have the following file paths in common which
> have different contents:"
> So I am wondering why doesn't this just work?
It doesn't work simply because snapcraft doesn't know which file from
which part to ship. You have common files between parts with different
contents (as the error message underline). Which one of yarn's or node's
README.md should be included for instance?
> It seems like name collisions in parts might be a common enough thing,
> and I couldn't quite understand the help docs around filesets and
> organise to see a nice way to make this work for me across projects.
I guess http://snapcraft.io/docs/build-snaps/advanced-features will be a
Basically, you define in one parts a fileset with:
- - LICENSE
(note the - to say to exclude those 3 files).
then, in the same part you want to exclude those files:
And you should be done!
More information about the Snapcraft