react-fs-router 0.2.4 → 0.2.5

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.
package/bin/index.js CHANGED
@@ -1,6 +1,5 @@
1
1
  #!/usr/bin/env node
2
-
3
- const genPath = require("./dist/genPath/index.js");
2
+ const genPath = require("./dist/genPath");
4
3
  const { Command } = require("commander");
5
4
  const { version, name } = require("../package.json");
6
5
 
@@ -2,4 +2,3 @@ declare const fs: any;
2
2
  declare const prettier: any;
3
3
  declare const chokidar: any;
4
4
  declare let isNotThefirstTimeRunning: boolean;
5
- declare const genPath: (page_directory: any) => void;
@@ -2,7 +2,7 @@ var fs = require("fs");
2
2
  var prettier = require("prettier");
3
3
  var chokidar = require("chokidar");
4
4
  var isNotThefirstTimeRunning = true;
5
- var genPath = function (page_directory) {
5
+ module.exports = function (page_directory) {
6
6
  var pathMaker = function () {
7
7
  var readDirectory = function (directory, includeDirectory) {
8
8
  var pages = {};
@@ -136,4 +136,3 @@ var genPath = function (page_directory) {
136
136
  console.error("Error happened", error);
137
137
  });
138
138
  };
139
- module.exports = genPath;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-fs-router",
3
- "version": "0.2.4",
3
+ "version": "0.2.5",
4
4
  "description": "File-system based routing for React.",
5
5
  "main": "./bin/index.js",
6
6
  "git repository": "https://github.com/Mehran9675/react-filesystem-routing",
@@ -4,7 +4,7 @@ const chokidar = require("chokidar");
4
4
 
5
5
  let isNotThefirstTimeRunning = true;
6
6
 
7
- const genPath = (page_directory) => {
7
+ module.exports = (page_directory) => {
8
8
  const pathMaker = () => {
9
9
  const readDirectory = (directory: string, includeDirectory?: boolean) => {
10
10
  const pages: Record<string, any> = {};
@@ -159,5 +159,3 @@ const genPath = (page_directory) => {
159
159
  console.error("Error happened", error);
160
160
  });
161
161
  };
162
-
163
- module.exports = genPath;