remix-flat-routes
Advanced tools
Comparing version 0.2.0 to 0.2.1
@@ -0,1 +1,18 @@ | ||
#!/usr/bin/env node | ||
var __create = Object.create; | ||
var __defProp = Object.defineProperty; | ||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | ||
var __getOwnPropNames = Object.getOwnPropertyNames; | ||
var __getProtoOf = Object.getPrototypeOf; | ||
var __hasOwnProp = Object.prototype.hasOwnProperty; | ||
var __copyProps = (to, from, except, desc) => { | ||
if (from && typeof from === "object" || typeof from === "function") { | ||
for (let key of __getOwnPropNames(from)) | ||
if (!__hasOwnProp.call(to, key) && key !== except) | ||
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); | ||
} | ||
return to; | ||
}; | ||
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod)); | ||
var fs = __toESM(require("fs")); | ||
var import_migrate = require("./migrate"); | ||
@@ -15,2 +32,6 @@ main(); | ||
} | ||
if (!fs.existsSync(sourceDir)) { | ||
console.error(`source directory '${sourceDir}' does not exist`); | ||
process.exit(1); | ||
} | ||
let options = { convention: "flat-files" }; | ||
@@ -17,0 +38,0 @@ for (let option of argv.slice(2)) { |
{ | ||
"name": "remix-flat-routes", | ||
"version": "0.2.0", | ||
"version": "0.2.1", | ||
"description": "Package for generating routes using flat convention", | ||
"main": "dist/cli.js", | ||
"main": "dist/index.js", | ||
"bin": { | ||
@@ -7,0 +7,0 @@ "migrate-flat-routes": "dist/cli.js" |
@@ -43,2 +43,9 @@ # Remix Flat Routes | ||
Example: | ||
npx migrate-flat-routes ./app/routes ./app/flatroutes --convention=flat-folders | ||
NOTE: | ||
sourceDir and targetDir are relative to project roo | ||
Options: | ||
@@ -45,0 +52,0 @@ --convention=<convention> |
@@ -0,1 +1,4 @@ | ||
#!/usr/bin/env node | ||
import * as fs from 'fs' | ||
import { migrate, MigrateOptions } from './migrate' | ||
@@ -19,2 +22,7 @@ | ||
if (!fs.existsSync(sourceDir)) { | ||
console.error(`source directory '${sourceDir}' does not exist`) | ||
process.exit(1) | ||
} | ||
let options: MigrateOptions = { convention: 'flat-files' } | ||
@@ -21,0 +29,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
33673
643
233
0
3