Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commite15482a

Browse files
committed
import path fixes
1 parent89bf2d4 commite15482a

File tree

3 files changed

+4
-11
lines changed

3 files changed

+4
-11
lines changed

‎lib/importPaths.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
"use strict";
22
varpath_1=require('path');
3+
varisWindows=window.navigator.appVersion.indexOf('Win')>-1;
34
varimportPathRegex=/require\(["'](BASE.+)["']\)([a-zA-Z0-9\-\_]+)?|^import.+?\s?["'](BASE.+)["'];?$/m;
45
varrelativePathRegex=/^BASE/;
56
functionfixImportPaths(_a){
6-
vardir=_a.dir,content=_a.content,isWindows=_a.isWindows;
7+
vardir=_a.dir,content=_a.content;
78
varentries=newSet([]);
89
returncontent.split('\n').map(function(line){
910
varisMatch=line.match(importPathRegex);

‎src/importPaths.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,14 @@ import { join } from 'path';
44
import paths won't match the context of the test runner
55
fixImportPaths will replace paths with absolute paths
66
*/
7+
constisWindows=window.navigator.appVersion.indexOf('Win')>-1;
78

89
// import or require statement
910
constimportPathRegex=
1011
/require\(["'](BASE.+)["']\)([a-zA-Z0-9\-\_]+)?|^import.+?\s?["'](BASE.+)["'];?$/m;
1112
constrelativePathRegex=/^BASE/;
1213

13-
exportdefaultfunctionfixImportPaths({dir, content, isWindows}):string{
14+
exportdefaultfunctionfixImportPaths({dir, content}):string{
1415
// collect import lines
1516
letentries=newSet([]);
1617

‎tsconfig.json

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,6 @@
1818
"files": [
1919
"src/importPaths.ts",
2020
"src/index.ts",
21-
"src/system.ts",
22-
"src/rewire-ts/__get__.ts",
23-
"src/rewire-ts/addImportsAsVars.ts",
24-
"src/rewire-ts/fileExists.ts",
25-
"src/rewire-ts/getDefinePropertySrc.ts",
26-
"src/rewire-ts/getImportGlobalsSrc.ts",
27-
"src/rewire-ts/index.ts",
28-
"src/rewire-ts/moduleEnv.ts",
29-
"src/rewire-ts/rewire.ts",
3021
"src/typings/chai/chai.d.ts",
3122
"src/typings/cr/cr.d.ts",
3223
"src/typings/cr/globals.d.ts",

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp