@jamsite/jamsite-cli
Advanced tools
Comparing version 0.0.3 to 0.0.4
@@ -37,3 +37,3 @@ #!/usr/bin/env node | ||
} else { | ||
console.error(`Unknown command "${command}"`) | ||
console.error(`Error: Unknown command "${command}"`) | ||
await runCommand('help', 1) | ||
@@ -46,6 +46,4 @@ } | ||
if (command) { | ||
runCommand(command) | ||
} else { | ||
runCommand('help', 1) | ||
} | ||
command | ||
? runCommand(command) | ||
: runCommand('help', 1) |
@@ -0,3 +1,9 @@ | ||
const requireRel = require('./require-rel') | ||
module.exports = async function commandBuild () { | ||
console.error('Not implemented yet!') | ||
const Jamsite = requireRel(process.cwd(), 'node_modules', '@jamsite', 'jamsite').Jamsite | ||
const jamsite = new Jamsite(process.cwd()) | ||
// todo: run user defined build scripts | ||
jamsite.build() | ||
} |
@@ -1,7 +0,6 @@ | ||
const path = require('path') | ||
const requireRel = require('./require-rel') | ||
module.exports = async function commandStart () { | ||
const modulePath = require.resolve(path.join(process.cwd(), 'node_modules', '@jamsite', 'jamsite-dev')) | ||
const jamsite = require(modulePath) | ||
jamsite.start() | ||
const jamsite = requireRel(process.cwd(), 'node_modules', '@jamsite', 'jamsite-dev') | ||
jamsite.start(process.cwd()) | ||
} |
@@ -1,7 +0,6 @@ | ||
const path = require('path') | ||
const requireRel = require('./require-rel') | ||
module.exports = async function commandStart () { | ||
const modulePath = require.resolve(path.join(process.cwd(), 'node_modules', '@jamsite', 'jamsite')) | ||
const jamsite = require(modulePath) | ||
jamsite.start() | ||
const jamsite = requireRel(process.cwd(), 'node_modules', '@jamsite', 'jamsite') | ||
await jamsite.start(process.cwd()) | ||
} |
{ | ||
"name": "@jamsite/jamsite-cli", | ||
"version": "0.0.3", | ||
"version": "0.0.4", | ||
"description": "Jamsite cli - JAMstack framework cli interface", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
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
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
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
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
6494
14
86
2