Skip to content

Commit

Permalink
Merge pull request #18 from liujiayii/dev
Browse files Browse the repository at this point in the history
release: 0.0.1-alpha.2
  • Loading branch information
liujiayii authored Nov 14, 2024
2 parents 99f6a5e + 6a7f676 commit 40f5e9e
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "unplugin-convention-routes",
"type": "module",
"version": "0.0.1-alpha.1",
"version": "0.0.1-alpha.2",
"packageManager": "[email protected]",
"description": "File system base router plugin for unplugin",
"author": "[email protected]",
Expand Down
2 changes: 1 addition & 1 deletion src/core/context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ export class PageContext {
const fullPath = path.join(process.cwd(), 'node_modules', '~unplugin-convention-routes')
// console.log('writeFile', fullPath, existsSync(fullPath))
if (!existsSync(fullPath)) {
// console.log('create dir', fullPath)
// console.log('create dir', fullPath)
initVirtualPackage()
// mkdirSync(fullPath, { recursive: true })
}
Expand Down
2 changes: 1 addition & 1 deletion src/core/initVirualPackage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import path from 'node:path'
import process from 'node:process'

export function initVirtualPackage(): void {
copyFile('node_modules/unplugin-convention-routes/virtual-package', 'node_modules/.unplugin-convention-routes')
copyFile('node_modules/unplugin-convention-routes/virtual-package', 'node_modules/~unplugin-convention-routes')
}

/**
Expand Down
4 changes: 2 additions & 2 deletions test/files.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { join } from 'node:path'
import { getPageDirs, getPageFiles } from '../src/files'
import { resolveOptions } from '../src/options'
import { getPageDirs, getPageFiles } from '../src/core/files'
import { resolveOptions } from '../src/core/options'

const options = resolveOptions({}, process.cwd())
const testpages = 'examples/vue/src/pages'
Expand Down
2 changes: 1 addition & 1 deletion test/generate.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { slash } from '@antfu/utils'

import { PageContext } from '../src/context'
import { PageContext } from '../src/core/context'

const sensitivity = process.platform === 'win32' ? 'base' : 'variant'

Expand Down
2 changes: 1 addition & 1 deletion test/options.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { resolveOptions } from '../src/options'
import { resolveOptions } from '../src/core/options'

describe('options resolve', () => {
it('vue', () => {
Expand Down
4 changes: 2 additions & 2 deletions test/parser.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { resolve } from 'node:path'
import { getRouteBlock } from '../src/customBlock'
import { resolveOptions } from '../src/options'
import { getRouteBlock } from '../src/core/customBlock'
import { resolveOptions } from '../src/core/options'

const options = resolveOptions({})

Expand Down
2 changes: 1 addition & 1 deletion test/utils.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { buildReactRemixRoutePath, buildReactRoutePath, countSlash, extsToGlob, isCatchAllRoute, isDynamicRoute } from '../src/utils'
import { buildReactRemixRoutePath, buildReactRoutePath, countSlash, extsToGlob, isCatchAllRoute, isDynamicRoute } from '../src/core/utils'

describe('utils', () => {
it('extensions to glob', () => {
Expand Down

0 comments on commit 40f5e9e

Please sign in to comment.