ts-file-router 1.0.2 → 1.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -30,9 +30,9 @@ const serializeRoutes = (obj, ident = 2) => {
30
30
  };
31
31
  const start = ({ baseFolder, outputFile, routeFileName = 'page.ts', }) => {
32
32
  // Get the pages dir to resolve routes
33
- const basePath = path_1.default.resolve(__dirname, baseFolder);
33
+ const basePath = path_1.default.resolve(process.cwd(), baseFolder);
34
34
  // Output file for routes
35
- const output = path_1.default.resolve(__dirname, outputFile);
35
+ const output = path_1.default.resolve(process.cwd(), outputFile);
36
36
  const generateRouter = async () => {
37
37
  const mapRoutes = async (dir) => {
38
38
  const routes = {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ts-file-router",
3
- "version": "1.0.2",
3
+ "version": "1.0.4",
4
4
  "description": "router based on project files using typescript",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",