Skip to content

Commit 8856fd8

Browse files
committed
Remove --init from CLI
Signed-off-by: worksofliam <[email protected]>
1 parent 968c246 commit 8856fd8

File tree

1 file changed

+0
-39
lines changed

1 file changed

+0
-39
lines changed

cli/src/index.ts

Lines changed: 0 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ import { ImpactMarkdown } from "./builders/imd";
1111
import { allExtensions, referencesFileName } from "./extensions";
1212
import { getBranchLibraryName, getDefaultCompiles } from "./builders/environment";
1313
import { renameFiles, replaceIncludes } from './utils';
14-
import { iProject } from './builders/iProject';
1514
import { ReadFileSystem } from './readFileSystem';
1615

1716
const isCli = process.argv.length >= 2 && (process.argv[1].endsWith(`so`) || process.argv[1].endsWith(`index.js`));
@@ -40,11 +39,6 @@ async function main() {
4039
i++;
4140
break;
4241

43-
case `-i`:
44-
case `--init`:
45-
initProject(cwd);
46-
process.exit(0);
47-
4842
case `-ar`:
4943
warningOut(`Auto rename enabled. No makefile will be generated.`)
5044
cliSettings.autoRename = true;
@@ -126,11 +120,6 @@ async function main() {
126120
console.log(``);
127121
console.log(`Options specific to '-bf make':`);
128122
console.log(``);
129-
console.log(`\t-i`);
130-
console.log(`\t--init\t\tAdd default compile options to 'iproj.json' file`);
131-
console.log(`\t\t\tShould be used for project initialisation or to customize compile commands.`);
132-
console.log(`\t\t\tThis is specific to using '-bf' with the 'make' option.`);
133-
console.log(``);
134123
console.log(`\t-nc`);
135124
console.log(`\t--no-children\tUsed with '-bf make' and won't include children of`);
136125
console.log(`\t\t\tobjects in the makefile. Useful in conjuction with '-f'.`);
@@ -250,34 +239,6 @@ async function main() {
250239
}
251240
}
252241

253-
function initProject(cwd) {
254-
console.log(`Initialising in ${cwd}`);
255-
256-
const iprojPath = path.join(cwd, `iproj.json`);
257-
258-
let base: Partial<iProject> = {};
259-
const iprojExists = existsSync(iprojPath);
260-
261-
if (iprojExists) {
262-
try {
263-
console.log(`iproj.json already exists. Will append new properties.`);
264-
base = JSON.parse(readFileSync(iprojPath, { encoding: `utf-8` }));
265-
} catch (e) {
266-
error(`Failed to parse iproj.json. Aborting`);
267-
process.exit(1);
268-
}
269-
}
270-
271-
base = {
272-
...base,
273-
compiles: getDefaultCompiles()
274-
};
275-
276-
writeFileSync(iprojPath, JSON.stringify(base, null, 2));
277-
278-
console.log(`Written to ${iprojPath}`);
279-
}
280-
281242
/**
282243
* @param query Can be object (ABCD.PGM) or relative path
283244
*/

0 commit comments

Comments
 (0)