Skip to content

Commit 2fc2c48

Browse files
committed
Use Yarn 2
1 parent cc4202b commit 2fc2c48

File tree

13 files changed

+7047
-8141
lines changed

13 files changed

+7047
-8141
lines changed

.gitignore

Lines changed: 4 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,4 @@
1-
node_modules/
2-
yarn.lock
3-
4-
coverage/
5-
.nyc*
6-
*.js.map
7-
8-
# Release
9-
*.tgz
10-
11-
# OSX
12-
.DS_Store
13-
*.lcov
14-
15-
# IDEA IDEs
16-
.idea/
17-
18-
typescript_lualib.lua
19-
lualib_bundle.lua
20-
21-
dist/*
1+
.pnp.*
2+
.yarn/unplugged
3+
.yarn/build-state.yml
4+
/dist

.prettierignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
.pnp.*
2+
.yarn
3+
.vscode/pnpify
4+
/dist

.vscode/pnpify/prettier/index.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
const {createRequire, createRequireFromPath} = require(`module`);
2+
const {dirname, resolve} = require(`path`);
3+
4+
const relPnpApiPath = "../../../.pnp.js";
5+
6+
const absPnpApiPath = resolve(__dirname, relPnpApiPath);
7+
const absRequire = (createRequire || createRequireFromPath)(absPnpApiPath);
8+
9+
// Setup the environment to be able to require prettier
10+
require(absPnpApiPath).setup();
11+
12+
// Prepare the environment (to be ready in case of child_process.spawn etc)
13+
process.env.NODE_OPTIONS = process.env.NODE_OPTIONS || ``;
14+
process.env.NODE_OPTIONS += ` -r ${absPnpApiPath}`;
15+
16+
// Defer to the real prettier your application uses
17+
module.exports = absRequire(`prettier`);
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"name": "prettier",
3+
"version": "1.19.1-pnpify",
4+
"main": "index.js"
5+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
const {createRequire, createRequireFromPath} = require(`module`);
2+
const {dirname, resolve} = require(`path`);
3+
4+
const relPnpApiPath = "../../../../.pnp.js";
5+
6+
const absPnpApiPath = resolve(__dirname, relPnpApiPath);
7+
const absRequire = (createRequire || createRequireFromPath)(absPnpApiPath);
8+
9+
// Setup the environment to be able to require typescript/lib/tsserver
10+
require(absPnpApiPath).setup();
11+
12+
// Prepare the environment (to be ready in case of child_process.spawn etc)
13+
process.env.NODE_OPTIONS = process.env.NODE_OPTIONS || ``;
14+
process.env.NODE_OPTIONS += ` -r ${absPnpApiPath}`;
15+
16+
// Defer to the real typescript/lib/tsserver your application uses
17+
module.exports = absRequire(`typescript/lib/tsserver`);
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"name": "typescript",
3+
"version": "3.7.5-pnpify"
4+
}

.vscode/settings.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"typescript.tsdk": ".vscode/pnpify/typescript/lib",
3+
"prettier.prettierPath": ".vscode/pnpify/prettier"
4+
}

.yarnrc.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
enableGlobalCache: true

0 commit comments

Comments
 (0)