diff --git a/index.js b/index.js index f3de379..692e6bb 100755 --- a/index.js +++ b/index.js @@ -170,9 +170,6 @@ async function main (argv) { ...templates[templateName]?.deps ?? [] ] - // remove eventually - let isSocket05orGreater = true - try { const { stdout } = await exec('ssc --version') @@ -182,8 +179,6 @@ async function main (argv) { .split('.') // convert to numbers .map(s => parseInt(s)) - - isSocket05orGreater = sscVersion[0] >= 1 || sscVersion[1] >= 5 } catch (err) {} } catch (err) { process.stdout.write('Installing \'@socketsupply/socket\' locally (ssc not in PATH)\n') @@ -210,7 +205,6 @@ async function main (argv) { } pkg.type = 'module' - pkg.scripts['init-project'] = `ssc init${isSocket05orGreater ? ' --config' : ''}` pkg.scripts.start = 'ssc build -r -o' pkg.scripts.build = 'ssc build -o' pkg.scripts.test = 'ssc build -r -o --test=./test/index.js --headless' @@ -231,8 +225,8 @@ async function main (argv) { process.stdout.write('Creating socket files...') // Use spawn so we can pass stdio, fte is interactive const initProcess = spawn( - `npm${os.platform() === 'win32' ? '.cmd' : ''}`, - ['run', 'init-project'], + 'ssc', + ['init', '--config'], { stdio: [process.stdin, process.stdout, process.stderr] }) @@ -299,10 +293,6 @@ async function main (argv) { if (line.includes('script = ')) { return line.replace(line, 'script = "node build.js"') } - // Socket 0.5 compatibility - if (isSocket05orGreater && line.includes('forward_arguments = ')) { - return line.replace(line, 'forward_arguments = true') - } return line }).join('\n')