Skip to content

Commit

Permalink
create subfolder at top level of tarball from Github
Browse files Browse the repository at this point in the history
create a package dir at top level of tarball from Github

Tarballs that npm can use, package contents should reside
in a subfolder inside the tarball (usually it is called package/).
npm strips one directory layer when installing the package
(an equivalent of tar x --strip-components=1 is run).

See https://docs.npmjs.com/cli/v7/commands/npm-install
  • Loading branch information
tshaynik committed Oct 14, 2021
1 parent 33eb330 commit 67c3a90
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion internal.nix
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,9 @@ rec {
name
{ } ''
set +x
tar -C ${src} -czf $out ./
mkdir package
cp -R ${src}/. package
tar -czf $out package
'';

# Description: Turns a dependency with a from field of the format
Expand Down

0 comments on commit 67c3a90

Please sign in to comment.