Skip to content

Commit

Permalink
Caches the Yarn resolution for faster installs
Browse files Browse the repository at this point in the history
  • Loading branch information
Maël Nison committed Oct 3, 2018
1 parent b41e696 commit 676ad4e
Show file tree
Hide file tree
Showing 5 changed files with 9,783 additions and 2 deletions.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
"screencast": "node ./tasks/screencast.js",
"screencast:error": "svg-term --cast jyu19xGl88FQ3poMY8Hbmfw8y --out screencast-error.svg --window --at 12000 --no-cursor",
"test": "cd packages/react-scripts && node bin/react-scripts.js test",
"format": "prettier --trailing-comma es5 --single-quote --write 'packages/*/*.js' 'packages/*/!(node_modules)/**/*.js'"
"format": "prettier --trailing-comma es5 --single-quote --write 'packages/*/*.js' 'packages/*/!(node_modules)/**/*.js'",
"compile:lockfile": "node tasks/compile-lockfile.js"
},
"devDependencies": {
"async-sema": "^2.1.3",
Expand Down
8 changes: 8 additions & 0 deletions packages/create-react-app/createReactApp.js
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,14 @@ function createApp(name, verbose, version, useNpm, usePnp, template) {
version = '[email protected]';
}
}

if (useYarn) {
fs.copySync(
require.resolve('./yarn.lock.cached'),
path.join(root, 'yarn.lock')
);
}

run(
root,
appName,
Expand Down
Loading

0 comments on commit 676ad4e

Please sign in to comment.