diff options
author | crupest <crupest@outlook.com> | 2021-01-29 23:29:52 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2021-01-29 23:29:52 +0800 |
commit | cc08d98c5e170406b104cadb71add94010c59dae (patch) | |
tree | 91885012d9203611eb278986e75737ca700e9d17 /FrontEnd/.yarn/sdks/prettier | |
parent | 72344fcf7a099e1fcc8495d5ea30c64b5dddf183 (diff) | |
download | timeline-cc08d98c5e170406b104cadb71add94010c59dae.tar.gz timeline-cc08d98c5e170406b104cadb71add94010c59dae.tar.bz2 timeline-cc08d98c5e170406b104cadb71add94010c59dae.zip |
Front end migrate to npm because of buggy pnp in yarn 2.
Diffstat (limited to 'FrontEnd/.yarn/sdks/prettier')
-rwxr-xr-x | FrontEnd/.yarn/sdks/prettier/index.js | 30 | ||||
-rw-r--r-- | FrontEnd/.yarn/sdks/prettier/package.json | 6 |
2 files changed, 0 insertions, 36 deletions
diff --git a/FrontEnd/.yarn/sdks/prettier/index.js b/FrontEnd/.yarn/sdks/prettier/index.js deleted file mode 100755 index 80134e18..00000000 --- a/FrontEnd/.yarn/sdks/prettier/index.js +++ /dev/null @@ -1,30 +0,0 @@ -#!/usr/bin/env node - -const {existsSync} = require(`fs`); -const {createRequire, createRequireFromPath} = require(`module`); -const {resolve, dirname} = require(`path`); - -const relPnpApiPath = "../../../.pnp.js"; - -const absPnpApiPath = resolve(__dirname, relPnpApiPath); -const absRequire = (createRequire || createRequireFromPath)(absPnpApiPath); - -if (existsSync(absPnpApiPath)) { - if (!process.versions.pnp) { - // Setup the environment to be able to require prettier/index.js - require(absPnpApiPath).setup(); - } - - const pnpifyResolution = require.resolve(`@yarnpkg/pnpify`, {paths: [dirname(absPnpApiPath)]}); - if (typeof global[`__yarnpkg_sdk_is_using_pnpify__`] === `undefined`) { - Object.defineProperty(global, `__yarnpkg_sdk_is_using_pnpify__`, {configurable: true, value: true}); - - process.env.NODE_OPTIONS += ` -r ${pnpifyResolution}`; - - // Apply PnPify to the current process - absRequire(pnpifyResolution).patchFs(); - } -} - -// Defer to the real prettier/index.js your application uses -module.exports = absRequire(`prettier/index.js`); diff --git a/FrontEnd/.yarn/sdks/prettier/package.json b/FrontEnd/.yarn/sdks/prettier/package.json deleted file mode 100644 index adf33891..00000000 --- a/FrontEnd/.yarn/sdks/prettier/package.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "prettier", - "version": "2.2.1-pnpify", - "main": "./index.js", - "type": "commonjs" -} |