Skip to content
This repository was archived by the owner on Sep 20, 2024. It is now read-only.

Commit 7cb523e

Browse files
committed
refactor: use commonjs script
1 parent fce19e7 commit 7cb523e

File tree

5 files changed

+24
-13
lines changed

5 files changed

+24
-13
lines changed

components.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Global component types for @@chakra-ui/vue-next1.0.0-alpha.4
33
* This is a generated file. Do not edit it's contents.
44
*
5-
* This file was generated on 2021-06-22T09:14:59.565Z
5+
* This file was generated on 2021-06-22T09:21:16.557Z
66
*/
77
declare module 'vue' {
88
export interface GlobalComponents {
@@ -121,7 +121,7 @@ declare module 'vue' {
121121
* Global component types for @@chakra-ui/vue-next1.0.0-alpha.4
122122
* This is a generated file. Do not edit it's contents.
123123
*
124-
* This file was generated on 2021-06-22T09:14:59.565Z
124+
* This file was generated on 2021-06-22T09:21:16.557Z
125125
*/
126126
declare module 'vue' {
127127
export interface GlobalComponents {

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,5 +136,8 @@
136136
"vue-prism-editor": "^2.0.0-alpha.2",
137137
"vue-router": "^4.0.6",
138138
"vue3-perfect-scrollbar": "^1.5.5"
139+
},
140+
"devDependencies": {
141+
"@types/eslint": "^7.2.13"
139142
}
140143
}

packages/core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"build:esm": "cross-env BABEL_ENV=esm babel src --root-mode upward --extensions .ts,.tsx -d dist/esm --source-maps",
2424
"build:cjs": "cross-env BABEL_ENV=cjs babel src --root-mode upward --extensions .ts,.tsx -d dist/cjs --source-maps",
2525
"build:types": "cross-env tsc --emitDeclarationOnly --declaration --declarationDir dist/types",
26-
"postbuild": "cross-env ts-node ../../scripts/generate-global-types.ts",
26+
"postbuild": "cross-env yarn run ts-node ../../scripts/generate-global-types.ts",
2727
"watch": "concurrently yarn:watch:*",
2828
"watch:esm": "cross-env BABEL_ENV=esm babel src --root-mode upward --extensions .ts,.tsx -d dist/esm --source-maps --watch",
2929
"watch:cjs": "cross-env BABEL_ENV=cjs babel src --root-mode upward --extensions .ts,.tsx -d dist/cjs --source-maps --watch",

scripts/generate-global-types.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
import { writeFileSync, appendFileSync } from 'fs'
2-
import { resolve } from 'path'
3-
import * as ChakraComponents from '@chakra-ui/vue-next'
4-
import {
5-
name as pkgName,
6-
version as pkgVersion,
7-
} from '../packages/core/package.json'
8-
import { ESLint } from 'eslint'
9-
import { domElements } from '@chakra-ui/vue-system'
1+
const { writeFileSync, appendFileSync } = require('fs')
2+
const { resolve } = require('path')
3+
const {
4+
name: pkgName,
5+
version: pkgVersion,
6+
} = require('../packages/core/package.json')
7+
const { ESLint } = require('eslint')
8+
const { domElements } = require('@chakra-ui/vue-system')
9+
const ChakraComponents = require('@chakra-ui/vue-next')
1010

1111
type ComponentsImport = typeof ChakraComponents
1212

yarn.lock

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3059,6 +3059,14 @@
30593059
resolved "https://registry.yarnpkg.com/@types/cookie/-/cookie-0.3.3.tgz#85bc74ba782fb7aa3a514d11767832b0e3bc6803"
30603060
integrity sha512-LKVP3cgXBT9RYj+t+9FDKwS5tdI+rPBXaNSkma7hvqy35lc7mAokC2zsqWJH0LaqIt3B962nuYI77hsJoT1gow==
30613061

3062+
"@types/eslint@^7.2.13":
3063+
version "7.2.13"
3064+
resolved "https://registry.yarnpkg.com/@types/eslint/-/eslint-7.2.13.tgz#e0ca7219ba5ded402062ad6f926d491ebb29dd53"
3065+
integrity sha512-LKmQCWAlnVHvvXq4oasNUMTJJb2GwSyTY8+1C7OH5ILR8mPLaljv1jxL1bXW3xB3jFbQxTKxJAvI8PyjB09aBg==
3066+
dependencies:
3067+
"@types/estree" "*"
3068+
"@types/json-schema" "*"
3069+
30623070
"@types/estree@*":
30633071
version "0.0.47"
30643072
resolved "https://registry.yarnpkg.com/@types/estree/-/estree-0.0.47.tgz#d7a51db20f0650efec24cd04994f523d93172ed4"
@@ -3114,7 +3122,7 @@
31143122
jest-diff "^26.0.0"
31153123
pretty-format "^26.0.0"
31163124

3117-
"@types/json-schema@^7.0.3":
3125+
"@types/json-schema@*", "@types/json-schema@^7.0.3":
31183126
version "7.0.7"
31193127
resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.7.tgz#98a993516c859eb0d5c4c8f098317a9ea68db9ad"
31203128
integrity sha512-cxWFQVseBm6O9Gbw1IWb8r6OS4OhSt3hPZLkFApLjM8TEXROBuQGLAH2i2gZpcXdLBIrpXuTDhH7Vbm1iXmNGA==

0 commit comments

Comments
 (0)