Skip to content

Commit 0c2f926

Browse files
xingfujiang72161674
andauthored
replace @jayfate/path with path (#34)
Co-authored-by: 72161674 <[email protected]>
1 parent 4c3b44b commit 0c2f926

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+82
-80
lines changed

packages/hap-compiler/src/style/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*/
55

66
'use strict'
7-
import path from '@jayfate/path'
7+
import path from 'path'
88
import css from 'css'
99
import { compileOptionsObject } from '@hap-toolkit/shared-utils'
1010
import { validate as validateDelaration, mightReferlocalResource } from './validator'

packages/hap-compiler/src/style/process.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
'use strict'
77
import fs from 'fs'
8-
import path from '@jayfate/path'
8+
import path from 'path'
99
import css from 'css'
1010
import cssWhat from 'css-what'
1111
import { extend, compileOptionsObject } from '@hap-toolkit/shared-utils'

packages/hap-compiler/src/template/validator.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* SPDX-License-Identifier: Apache-2.0
44
*/
55

6-
import path from '@jayfate/path'
6+
import path from 'path'
77
import { colorconsole, extend } from '@hap-toolkit/shared-utils'
88
import exp from './exp'
99
import styler from '../style'

packages/hap-compiler/src/utils.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
// TODO duplicate of packager/src/common/utils.js
77
import fs from 'fs'
8-
import path from '@jayfate/path'
8+
import path from 'path'
99
import { globalConfig } from '@hap-toolkit/shared-utils'
1010

1111
/**

packages/hap-debugger/src/router/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* SPDX-License-Identifier: Apache-2.0
44
*/
55

6-
import path from '@jayfate/path'
6+
import path from 'path'
77
import KoaRouter from 'koa-router'
88
import koaBody from 'koa-body'
99
import serve from 'koa-static'

packages/hap-debugger/src/router/routes.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* SPDX-License-Identifier: Apache-2.0
44
*/
55

6-
import path from '@jayfate/path'
6+
import path from 'path'
77
import fs from 'fs'
88

99
import qr from 'qr-image'

packages/hap-dev-utils/src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const process = require('process')
77
const fs = require('fs-extra')
88
const { spawn } = require('child_process')
99
const JSZip = require('jszip')
10-
const path = require('@jayfate/path')
10+
const path = require('path')
1111
const glob = require('glob')
1212

1313
/**

packages/hap-dsl-xvm/__tests__/loaders/app-loader.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* SPDX-License-Identifier: Apache-2.0
44
*/
55

6-
const path = require('@jayfate/path')
6+
const path = require('path')
77
const { rowify } = require('hap-dev-utils')
88
const appLoader = require('../../lib/loaders/app-loader').default
99

packages/hap-dsl-xvm/__tests__/loaders/ux-loader.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* SPDX-License-Identifier: Apache-2.0
44
*/
55

6-
const path = require('@jayfate/path')
6+
const path = require('path')
77
const { rowify } = require('hap-dev-utils')
88
const uxLoader = require('../../lib/loaders/ux-loader').default
99
const { compileOptionsObject } = require('@hap-toolkit/shared-utils')

packages/hap-dsl-xvm/src/loaders/common/utils.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* SPDX-License-Identifier: Apache-2.0
44
*/
55

6-
import path from '@jayfate/path'
6+
import path from 'path'
77
import loaderUtils from 'loader-utils'
88
import hash from 'hash-sum'
99
import { SourceMapGenerator, SourceMapConsumer } from 'source-map'
@@ -235,7 +235,5 @@ export function convertPath(filePath) {
235235
if (/^[/\\]node_modules/.test(filePath)) {
236236
pathBase = globalConfig.projectPath
237237
}
238-
return process.platform === 'win32'
239-
? path.join(pathBase, filePath).replace(/\//g, '\\')
240-
: path.join(pathBase, filePath)
238+
return path.join(pathBase, filePath)
241239
}

0 commit comments

Comments
 (0)