mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
types(cli): fit typescript@4.1
This commit is contained in:
parent
265ca82686
commit
23e647805a
@ -3,7 +3,7 @@ import { readFileSync, removeSync, outputFileSync } from 'fs-extra';
|
|||||||
import { replaceExt } from '../common';
|
import { replaceExt } from '../common';
|
||||||
import { replaceCssImport } from '../common/css';
|
import { replaceCssImport } from '../common/css';
|
||||||
|
|
||||||
export function compileJs(filePath: string): Promise<undefined> {
|
export function compileJs(filePath: string): Promise<void> {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
let code = readFileSync(filePath, 'utf-8');
|
let code = readFileSync(filePath, 'utf-8');
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@ import webpack from 'webpack';
|
|||||||
import { getPackageConfig } from '../config/webpack.package';
|
import { getPackageConfig } from '../config/webpack.package';
|
||||||
|
|
||||||
export async function compilePackage(isMinify: boolean) {
|
export async function compilePackage(isMinify: boolean) {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise<void>((resolve, reject) => {
|
||||||
const config = getPackageConfig(isMinify);
|
const config = getPackageConfig(isMinify);
|
||||||
|
|
||||||
webpack(config, (err, stats) => {
|
webpack(config, (err, stats) => {
|
||||||
|
@ -54,7 +54,7 @@ function watch() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function build() {
|
function build() {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise<void>((resolve, reject) => {
|
||||||
const config = getSitePrdConfig();
|
const config = getSitePrdConfig();
|
||||||
|
|
||||||
webpack(config, (err, stats) => {
|
webpack(config, (err, stats) => {
|
||||||
|
@ -93,7 +93,7 @@ function getSequence(components: string[], depsMap: DepsMap) {
|
|||||||
export async function genStyleDepsMap() {
|
export async function genStyleDepsMap() {
|
||||||
const components = getComponents();
|
const components = getComponents();
|
||||||
|
|
||||||
return new Promise(resolve => {
|
return new Promise<void>(resolve => {
|
||||||
clearDepsCache();
|
clearDepsCache();
|
||||||
|
|
||||||
const map = {} as DepsMap;
|
const map = {} as DepsMap;
|
||||||
|
@ -11297,9 +11297,9 @@ typedarray-to-buffer@^3.1.5:
|
|||||||
is-typedarray "^1.0.0"
|
is-typedarray "^1.0.0"
|
||||||
|
|
||||||
typescript@^4.0.0:
|
typescript@^4.0.0:
|
||||||
version "4.0.2"
|
version "4.1.2"
|
||||||
resolved "https://registry.npmjs.org/typescript/-/typescript-4.0.2.tgz#7ea7c88777c723c681e33bf7988be5d008d05ac2"
|
resolved "https://registry.npm.taobao.org/typescript/download/typescript-4.1.2.tgz?cache=0&sync_timestamp=1605941213950&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ftypescript%2Fdownload%2Ftypescript-4.1.2.tgz#6369ef22516fe5e10304aae5a5c4862db55380e9"
|
||||||
integrity sha512-e4ERvRV2wb+rRZ/IQeb3jm2VxBsirQLpQhdxplZ2MEzGvDkkMmPglecnNDfSUBivMjP93vRbngYYDQqQ/78bcQ==
|
integrity sha1-Y2nvIlFv5eEDBKrlpcSGLbVTgOk=
|
||||||
|
|
||||||
uc.micro@^1.0.1, uc.micro@^1.0.5:
|
uc.micro@^1.0.1, uc.micro@^1.0.5:
|
||||||
version "1.0.6"
|
version "1.0.6"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user