Просмотр исходного кода

move path-utils to @growi/core

Yuki Takei 4 лет назад
Родитель
Сommit
ffb0e950e1

+ 2 - 0
packages/core/src/index.js

@@ -1,4 +1,5 @@
 import * as _pathUtils from './utils/path-utils';
+import * as _pagePathUtils from './utils/page-path-utils';
 
 // module.exports = {
 //   BasicInterceptor: require('./utils/basic-interceptor'),
@@ -12,3 +13,4 @@ import * as _pathUtils from './utils/path-utils';
 
 // export utils
 export const pathUtils = _pathUtils;
+export const pagePathUtils = _pagePathUtils;

+ 2 - 1
packages/app/src/test/utils/path-utils.test.js → packages/core/src/test/util/page-path-utils.js

@@ -1,5 +1,6 @@
-const { isTopPage, convertToNewAffiliationPath, isCreatablePage } = require('~/utils/path-utils');
+import { pagePathUtils } from '~/utils/page-path-utils';
 
+const { isTopPage, convertToNewAffiliationPath, isCreatablePage } = pagePathUtils;
 
 describe('TopPage Path test', () => {
   test('Path is only "/"', () => {

+ 0 - 0
packages/app/src/utils/path-utils.ts → packages/core/src/utils/page-path-utils.ts


+ 1 - 0
packages/core/tsconfig.json

@@ -3,6 +3,7 @@
   "compilerOptions": {
     "baseUrl": ".",
     "paths": {
+      "~/*": ["./src/*"]
     }
   }
 }