MCPcopy Index your code
hub / github.com/react/react / getTarOptions

Function getTarOptions

scripts/rollup/packaging.js:139–156  ·  view source on GitHub ↗
(tgzName, packageName)

Source from the content-addressed store, hash-verified

137}
138
139function getTarOptions(tgzName, packageName) {
140 // Files inside the `npm pack`ed archive start
141 // with "package/" in their paths. We'll undo
142 // this during extraction.
143 const CONTENTS_FOLDER = 'package';
144 return {
145 src: tgzName,
146 dest: `build/node_modules/${packageName}`,
147 tar: {
148 entries: [CONTENTS_FOLDER],
149 map(header) {
150 if (header.name.indexOf(CONTENTS_FOLDER + '/') === 0) {
151 header.name = header.name.slice(CONTENTS_FOLDER.length + 1);
152 }
153 },
154 },
155 };
156}
157
158let entryPointsToHasBundle = new Map();
159// eslint-disable-next-line no-for-of-loops/no-for-of-loops

Callers 1

prepareNpmPackageFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected