Skip to content

Commit

Permalink
feat: typescript 확장프로그램 충돌 styled-components/vscode-styled-components…
Browse files Browse the repository at this point in the history
…#426 이슈 미해결
  • Loading branch information
yunwoo-yu committed Nov 21, 2023
1 parent 7776b2e commit 4912d9a
Show file tree
Hide file tree
Showing 96 changed files with 1,226 additions and 2,334 deletions.
10 changes: 0 additions & 10 deletions .editorconfig

This file was deleted.

3 changes: 2 additions & 1 deletion .npmrc
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
@yourscope:registry=https://registry.npmjs.org/
registry=https://registry.npmjs.org/
//registry.npmjs.org/:_authToken=${NPM_TOKEN}
988 changes: 667 additions & 321 deletions .pnp.cjs

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
**.yml
File renamed without changes.
1 change: 1 addition & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"recommendations": [
"arcanis.vscode-zipfs",
"dbaeumer.vscode-eslint",
]
}
4 changes: 2 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"**/.yarn": true,
"**/.pnp.*": true
},
"eslint.nodePath": ".yarn/sdks",
"typescript.tsdk": ".yarn/sdks/typescript/lib",
"typescript.enablePromptUseWorkspaceTsdk": true
"typescript.enablePromptUseWorkspaceTsdk": true,
"eslint.nodePath": ".yarn/sdks"
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
893 changes: 0 additions & 893 deletions .yarn/releases/yarn-4.0.2.cjs

This file was deleted.

874 changes: 0 additions & 874 deletions .yarn/releases/yarn-stable-temp.cjs

This file was deleted.

20 changes: 20 additions & 0 deletions .yarn/sdks/eslint/lib/unsupported-api.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/usr/bin/env node

const {existsSync} = require(`fs`);
const {createRequire} = require(`module`);
const {resolve} = require(`path`);

const relPnpApiPath = "../../../../.pnp.cjs";

const absPnpApiPath = resolve(__dirname, relPnpApiPath);
const absRequire = createRequire(absPnpApiPath);

if (existsSync(absPnpApiPath)) {
if (!process.versions.pnp) {
// Setup the environment to be able to require eslint/use-at-your-own-risk
require(absPnpApiPath).setup();
}
}

// Defer to the real eslint/use-at-your-own-risk your application uses
module.exports = absRequire(`eslint/use-at-your-own-risk`);
12 changes: 10 additions & 2 deletions .yarn/sdks/eslint/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
{
"name": "eslint",
"version": "8.47.0-sdk",
"version": "8.54.0-sdk",
"main": "./lib/api.js",
"type": "commonjs"
"type": "commonjs",
"bin": {
"eslint": "./bin/eslint.js"
},
"exports": {
"./package.json": "./package.json",
".": "./lib/api.js",
"./use-at-your-own-risk": "./lib/unsupported-api.js"
}
}
6 changes: 3 additions & 3 deletions .yarn/sdks/typescript/lib/typescript.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ const absRequire = createRequire(absPnpApiPath);

if (existsSync(absPnpApiPath)) {
if (!process.versions.pnp) {
// Setup the environment to be able to require typescript/lib/typescript.js
// Setup the environment to be able to require typescript
require(absPnpApiPath).setup();
}
}

// Defer to the real typescript/lib/typescript.js your application uses
module.exports = absRequire(`typescript/lib/typescript.js`);
// Defer to the real typescript your application uses
module.exports = absRequire(`typescript`);
8 changes: 6 additions & 2 deletions .yarn/sdks/typescript/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
{
"name": "typescript",
"version": "5.1.6-sdk",
"version": "5.2.2-sdk",
"main": "./lib/typescript.js",
"type": "commonjs"
"type": "commonjs",
"bin": {
"tsc": "./bin/tsc",
"tsserver": "./bin/tsserver"
}
}
2 changes: 0 additions & 2 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
enableGlobalCache: false

yarnPath: .yarn/releases/yarn-4.0.2.cjs
13 changes: 5 additions & 8 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
module.exports = {
presets: [
[
"@babel/preset-env",
{ useBuiltIns: "usage", corejs: 3, targets: { node: "current" } },
],
"@babel/preset-typescript",
["@babel/preset-react", { runtime: "automatic" }],
],
presets: [
['@babel/preset-env', { useBuiltIns: 'usage', corejs: 3, targets: { node: 'current' } }],
'@babel/preset-typescript',
['@babel/preset-react', { runtime: 'automatic' }],
],
};
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "salin",
"private": true,
"version": "0.0.1",
"packageManager": "yarn@4.0.2",
"packageManager": "yarn@4.0.2+sha256.825003a0f561ad09a3b1ac4a3b3ea6207af2796d54f62a9420520915721f5186",
"workspaces": [
"packages/*"
],
Expand All @@ -29,7 +29,7 @@
"react-dom": "^18.2.0",
"ts-node": "^10.9.1",
"tslib": "^2.6.2",
"typescript": "^5.1.6"
"typescript": "5.2.2"
},
"license": "MIT"
}
3 changes: 2 additions & 1 deletion packages/cms-ui/babel.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
module.exports = {
extends: "../../babel.config.js",
extends: '../../babel.config.js',
presets: ['@emotion/babel-preset-css-prop'],
};
5 changes: 4 additions & 1 deletion packages/cms-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@
"license": "MIT",
"devDependencies": {
"@babel/core": "^7.23.3",
"@emotion/babel-preset-css-prop": "^11.11.0",
"@emotion/react": "^11.11.1",
"@emotion/styled": "^11.11.0",
"@rollup/plugin-babel": "^6.0.4",
"@rollup/plugin-commonjs": "^25.0.7",
"@rollup/plugin-node-resolve": "^15.2.3",
Expand All @@ -37,7 +40,7 @@
"react-dom": "^18.2.0",
"rollup": "^4.5.0",
"rollup-plugin-peer-deps-external": "^2.2.4",
"typescript": "^5.1.6"
"typescript": "5.2.2"
},
"peerDependencies": {
"react": ">=16.8.0",
Expand Down
77 changes: 38 additions & 39 deletions packages/cms-ui/rollup.config.mjs
Original file line number Diff line number Diff line change
@@ -1,43 +1,42 @@
import nodeResolve from "@rollup/plugin-node-resolve";
import babel from "@rollup/plugin-babel";
import terser from "@rollup/plugin-terser";
import typescript from "@rollup/plugin-typescript";
import commonjs from "@rollup/plugin-commonjs";
import peerDepsExternal from "rollup-plugin-peer-deps-external";
import pkg from "./package.json" assert { type: "json" };
import nodeResolve from '@rollup/plugin-node-resolve';
import babel from '@rollup/plugin-babel';
import terser from '@rollup/plugin-terser';
import typescript from '@rollup/plugin-typescript';
import commonjs from '@rollup/plugin-commonjs';
import peerDepsExternal from 'rollup-plugin-peer-deps-external';
import pkg from './package.json' assert { type: 'json' };

const extensions = [".js", ".jsx", ".ts", ".tsx"];
const extensions = ['.js', '.jsx', '.ts', '.tsx'];

export default {
input: "./src/index.ts", // 진입 경로
output: [
{
file: pkg.main,
sourcemap: true,
format: "cjs",
},
{
file: pkg.module,
sourcemap: true,
format: "esm",
},
],
external: ["react", "react-dom"],
plugins: [
peerDepsExternal(),
nodeResolve({
extensions,
}),
commonjs(),
babel({
babelHelpers: "bundled",
exclude: "node_modules/**/*.(ts|tsx|js|jsx)",
include: "src/**/*.(ts|tsx|js|jsx)",
extensions: [".ts", ".tsx", ".js", ".jsx", ".mjs"],
}),
typescript({
tsconfig: "./tsconfig.json",
}),
terser(),
],
input: './src/index.ts', // 진입 경로
output: [
{
file: pkg.main,
sourcemap: true,
format: 'cjs',
},
{
file: pkg.module,
sourcemap: true,
format: 'esm',
},
],
external: ['react', 'react-dom'],
plugins: [
peerDepsExternal(),
nodeResolve({
extensions,
}),
commonjs(),
babel({
exclude: /node_modules/,
extensions,
include: ['src/**/*'],
}),
typescript({
tsconfig: './tsconfig.json',
}),
terser(),
],
};
10 changes: 9 additions & 1 deletion packages/cms-ui/src/components/Button/index.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
import styled from '@emotion/styled';

export const Button = () => {
return <div>Button</div>;
return <StyledButton>zzz</StyledButton>;
};

const StyledButton = styled.div`
display: flex;
width: 100%;
height: auto;
`;
6 changes: 6 additions & 0 deletions packages/cms-ui/src/components/Button/styled.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import styled from "@emotion/styled";


const Test = styled.div`
width
`
2 changes: 1 addition & 1 deletion packages/cms-ui/src/components/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export * from "./Button";
export * from './Button';
4 changes: 2 additions & 2 deletions packages/cms-ui/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"extends": "../../tsconfig.base.json",
"include": ["./src"],
"include": ["./src"],
"compilerOptions": {
"baseUrl": "./src",
"outDir": "./dist"
"outDir": "./dist",
}
}
Loading

0 comments on commit 4912d9a

Please sign in to comment.