Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

create-ts-project

Package Overview
Dependencies
Maintainers
2
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

create-ts-project - npm Package Compare versions

Comparing version 1.0.5 to 1.0.6

49

bin/cli.js
#!/usr/bin/env node
const child_process = require('child_process');
const util = require('util');
const child_process = require("child_process");
const util = require("util");
const exec = util.promisify(child_process.exec);
const yargs = require('yargs');
const ora = require('ora');
const replaceInFiles = require('replace-in-files');
const yargs = require("yargs");
const replaceInFiles = require("replace-in-files");
const argv = yargs
.usage('Usage\n\n create-ts-project <name>')
.epilog('Copyright @ 2019')
.argv;
.usage("Usage\n\n create-ts-project <name>")
.epilog("Copyright @ 2019").argv;
const name = argv._[0];
const package = 'https://github.com/piecioshka/create-ts-project/archive/master.zip';
const package =
"https://github.com/piecioshka/create-ts-project/archive/master.zip";

@@ -32,8 +31,5 @@ if (!name) {

from: /create-ts-project/g,
to: name
to: name,
};
const state = ora();
state.start();
async function isFileExist(name) {

@@ -49,4 +45,12 @@ try {

const log = (text) => console.info("[+] " + text);
const fail = (text) => console.error("[-] " + text);
function task(command) {
log("Command: " + command);
return exec(command);
}
(async () => {
state.info(`Create project: ${name}`);
log(`Create project: ${name}`);
try {

@@ -58,15 +62,16 @@ const isDirectoryExist = await isFileExist(name);

// Fetch github.com/piecioshka/create-ts-project
await exec(`wget ${package} -O create-ts-project.zip`);
await exec(`unzip create-ts-project.zip`);
await exec(`mv create-ts-project-master ${name}`);
await exec(`rm -rf create-ts-project.zip`);
await task(`wget ${package} -O create-ts-project.zip`);
await task(`unzip create-ts-project.zip`);
await task(`mv create-ts-project-master ${name}`);
await task(`rm -rf create-ts-project.zip`);
// Replace all "create-ts-project" by "NAME"
await replaceInFiles(options);
// Git setup & commit
await exec(`cd ${name} && git init && git add . && git commit -am "Generate project"`);
state.succeed('Project created');
state.stop();
await task(
`cd ${name} && git init && git add . && git commit -am "Generate project"`
);
log("Project created");
} catch (reason) {
state.fail(`Project does not created properly: ${reason.message}`);
fail(`Project does not created properly: ${reason.message}`);
}
})();
{
"name": "create-ts-project",
"description": "",
"version": "1.0.5",
"description": "Create a project with TypeScript support",
"version": "1.0.6",
"license": "MIT",

@@ -19,10 +19,8 @@ "author": {

"dependencies": {
"@types/node": "^12.11.5",
"ora": "^4.0.2",
"replace-in-files": "^2.0.3",
"ts-node": "^8.4.1",
"typescript": "^3.6.4",
"yargs": "^14.2.0"
"@types/node": "^20.9.0",
"replace-in-files": "^3.0.0",
"ts-node": "^10.9.1",
"typescript": "^5.2.2",
"yargs": "^17.7.2"
},
"devDependencies": {},
"repository": {

@@ -29,0 +27,0 @@ "type": "git",

# create-ts-project
[![npm version](https://badge.fury.io/js/create-ts-project.svg)](https://badge.fury.io/js/create-ts-project)
[![downloads count](https://img.shields.io/npm/dt/create-ts-project.svg)](https://www.npmjs.com/package/create-ts-project)
:hammer: Create a simple project with TypeScript support
:hammer: Create a project with TypeScript support

@@ -28,18 +27,4 @@ > Give a ⭐️ if this project helped you!

## 🤝 Contributing
Contributions, issues and feature requests are welcome!<br/>
Feel free to check [issues page](https://github.com/piecioshka/create-ts-project/issues/).
## Related
* [test-mocha-typescript](https://github.com/piecioshka/test-mocha-typescript)
* [test-jasmine-typescript](https://github.com/piecioshka/test-jasmine-typescript)
* [test-flowtype-vs-typescript](https://github.com/piecioshka/test-flowtype-vs-typescript)
* [test-typescript-parcel](https://github.com/piecioshka/test-typescript-parcel)
* [test-typescript-webpack](https://github.com/piecioshka/test-typescript-webpack)
* [test-jest-typescript](https://github.com/piecioshka/test-jest-typescript)
## License
[The MIT License](http://piecioshka.mit-license.org) @ 2019
[The MIT License](http://piecioshka.mit-license.org) @ 2019-2023
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc