Skip to content

Commit

Permalink
Fix npm package builds (facebook#7888)
Browse files Browse the repository at this point in the history
* Ensure lib/ is packaged for react-test-renderer

* Run npm pack from right working directory

We were running this on the original packages not the compiled ones, resulting in missing files
  • Loading branch information
zpao authored and acusti committed Mar 15, 2017
1 parent 370e414 commit f8f0436
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
5 changes: 4 additions & 1 deletion grunt/tasks/npm-react-native.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,12 @@ function packRelease() {
var spawnCmd = {
cmd: 'npm',
args: ['pack', 'packages/react-native-renderer'],
opts: {
cwd: 'build/',
},
};
grunt.util.spawn(spawnCmd, function() {
var buildSrc = 'react-native-renderer-' + grunt.config.data.pkg.version + '.tgz';
var buildSrc = 'build/react-native-renderer-' + grunt.config.data.pkg.version + '.tgz';
var buildDest = 'build/packages/react-native-renderer.tgz';
fs.rename(buildSrc, buildDest, done);
});
Expand Down
5 changes: 4 additions & 1 deletion grunt/tasks/npm-react-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,12 @@ function packRelease() {
var spawnCmd = {
cmd: 'npm',
args: ['pack', 'packages/react-test-renderer'],
opts: {
cwd: 'build/',
},
};
grunt.util.spawn(spawnCmd, function() {
var buildSrc = 'react-test-renderer-' + grunt.config.data.pkg.version + '.tgz';
var buildSrc = 'build/react-test-renderer-' + grunt.config.data.pkg.version + '.tgz';
var buildDest = 'build/packages/react-test-renderer.tgz';
fs.rename(buildSrc, buildDest, done);
});
Expand Down
3 changes: 2 additions & 1 deletion packages/react-test-renderer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"LICENSE",
"PATENTS",
"README.md",
"index.js"
"index.js",
"lib/"
]
}

0 comments on commit f8f0436

Please sign in to comment.