Skip to content

Commit 941a093

Browse files
committed
fix readme cli
1 parent 004f9ad commit 941a093

File tree

4 files changed

+26
-53
lines changed

4 files changed

+26
-53
lines changed

README.md

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
1-
<img alt='overnightjs' src='https://github.com/ljlm0402/typescript-express-starter/raw/master/typescript-express-starter.jpg' border='0'>
1+
<img alt='logo' src='https://github.com/ljlm0402/typescript-express-starter/raw/master/typescript-express-starter.jpg' border='0'>
22

33
[Express](https://www.npmjs.com/package/express) with [TypeScript's](https://www.npmjs.com/package/typescript) application generator.
44

55
<a href="https://www.npmjs.com/package/typescript-express-starter" target="_blank"><img src="https://img.shields.io/npm/v/typescript-express-starter.svg" alt="NPM Version" /></a>
66
<a href="https://www.npmjs.com/package/typescript-express-starter" target="_blank"><img src="https://img.shields.io/npm/l/typescript-express-starter.svg" alt="Package License" /></a>
77
<a href="https://www.npmjs.com/package/typescript-express-starter" target="_blank"><img src="https://img.shields.io/npm/dm/typescript-express-starter.svg" alt="NPM Downloads" /></a>
88

9-
109
## What is it?
1110

12-
Creates a new express application similar to the _express-generator_ module. Except this new
11+
Creates a new typescript express application.
1312
application is configured to use TypeScript instead of plain JavaScript.
1413

1514
## Why typescript-express-starter?
@@ -18,19 +17,6 @@ NodeJS is great for the rapid development of web-projects, but is often neglecte
1817
type safety. TypeScript solves this issue and (along with its linter file) can even make your code
1918
more robust than some other static languages like Java.
2019

21-
There are some other tools out there to generate express apps with TypeScript such as
22-
_express-generator-ts_, but these either haven't been updated in a while or install a lot of junk
23-
in your project (such as an ORM).
24-
25-
Due to the heavy use of single-page-applications, no view-engine is configured by default. Express is
26-
only setup with the minimal settings for calling APIs and serving an index.html file. All the tools you
27-
need to run for development (while restarting on changes), building, testing, and running for production
28-
are packaged with this library.
29-
30-
In addition, relative paths are also setup, so you don't have to go through the trouble of installing
31-
and configuring _tsconfig-paths_ and _module-alias_. Just make sure to update `paths` in _tsconfig.json_
32-
and `_moduleAliases` in _package.json_ if you want to add/edit the relative paths.
33-
3420
## Installation
3521

3622
```sh
@@ -40,7 +26,7 @@ $ npm install -g typescript-express-starter
4026
## Quick Start
4127

4228
The quickest way to get started is use npx and pass in the name of the project you want to create.
43-
If you don't specify a project name, the default _express-gen-ts_ will be used instead.
29+
If you don't specify a project name, the default typescript-express-starter_ will be used instead.
4430

4531
Create the app:
4632

@@ -64,3 +50,5 @@ $ cd "project name" && npm run start
6450
## License
6551

6652
[MIT](LICENSE)
53+
54+
<sub><sup>Written by <a href="https://github.com/ljlm0402">@AGUMON</a></sup></sub><small>✌</small>

typescript-express-starter/README.md

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
1-
<img alt='overnightjs' src='https://github.com/ljlm0402/typescript-express-starter/raw/master/typescript-express-starter.jpg' border='0'>
1+
<img alt='logo' src='https://github.com/ljlm0402/typescript-express-starter/raw/master/typescript-express-starter.jpg' border='0'>
22

33
[Express](https://www.npmjs.com/package/express) with [TypeScript's](https://www.npmjs.com/package/typescript) application generator.
44

55
<a href="https://www.npmjs.com/package/typescript-express-starter" target="_blank"><img src="https://img.shields.io/npm/v/typescript-express-starter.svg" alt="NPM Version" /></a>
66
<a href="https://www.npmjs.com/package/typescript-express-starter" target="_blank"><img src="https://img.shields.io/npm/l/typescript-express-starter.svg" alt="Package License" /></a>
77
<a href="https://www.npmjs.com/package/typescript-express-starter" target="_blank"><img src="https://img.shields.io/npm/dm/typescript-express-starter.svg" alt="NPM Downloads" /></a>
88

9-
109
## What is it?
1110

12-
Creates a new express application similar to the _express-generator_ module. Except this new
11+
Creates a new typescript express application.
1312
application is configured to use TypeScript instead of plain JavaScript.
1413

1514
## Why typescript-express-starter?
@@ -18,19 +17,6 @@ NodeJS is great for the rapid development of web-projects, but is often neglecte
1817
type safety. TypeScript solves this issue and (along with its linter file) can even make your code
1918
more robust than some other static languages like Java.
2019

21-
There are some other tools out there to generate express apps with TypeScript such as
22-
_express-generator-ts_, but these either haven't been updated in a while or install a lot of junk
23-
in your project (such as an ORM).
24-
25-
Due to the heavy use of single-page-applications, no view-engine is configured by default. Express is
26-
only setup with the minimal settings for calling APIs and serving an index.html file. All the tools you
27-
need to run for development (while restarting on changes), building, testing, and running for production
28-
are packaged with this library.
29-
30-
In addition, relative paths are also setup, so you don't have to go through the trouble of installing
31-
and configuring _tsconfig-paths_ and _module-alias_. Just make sure to update `paths` in _tsconfig.json_
32-
and `_moduleAliases` in _package.json_ if you want to add/edit the relative paths.
33-
3420
## Installation
3521

3622
```sh
@@ -40,7 +26,7 @@ $ npm install -g typescript-express-starter
4026
## Quick Start
4127

4228
The quickest way to get started is use npx and pass in the name of the project you want to create.
43-
If you don't specify a project name, the default _express-gen-ts_ will be used instead.
29+
If you don't specify a project name, the default typescript-express-starter_ will be used instead.
4430

4531
Create the app:
4632

@@ -64,3 +50,5 @@ $ cd "project name" && npm run start
6450
## License
6551

6652
[MIT](LICENSE)
53+
54+
<sub><sup>Written by <a href="https://github.com/ljlm0402">@AGUMON</a></sup></sub><small>✌</small>

typescript-express-starter/lib/typescript-express-starter.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ async function tsExpressStarter(destination) {
1919
}
2020
}
2121

22-
2322
function copyProjectFiles(destination) {
2423
const prjFolder = './project-files';
2524
const source = path.join(__dirname, prjFolder);
@@ -35,22 +34,19 @@ function copyProjectFiles(destination) {
3534
})
3635
}
3736

38-
3937
function updatePackageJson(destination) {
4038
let file = editJsonFile(destination + '/package.json', {
4139
autosave: true
4240
});
4341
file.set('name', path.basename(destination));
4442
}
4543

46-
4744
function getDepStrings() {
4845
const dependencies = 'class-transformer class-validator cookie-parser express jest morgan ts-jest ts-node typescript';
4946
const devDependencies = '@types/cookie-parser @types/express @types/jest @types/morgan @types/supertest supertest tslint tslint-config-airbnb';
5047
return { dependencies, devDependencies };
5148
}
5249

53-
5450
function downloadNodeModules(destination, dep) {
5551
const options = {cwd: destination};
5652
childProcess.execSync('npm i -s ' + dep.dependencies, options);
Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,35 @@
11
{
22
"name": "typescript-express-starter",
3-
"version": "1.0.0",
4-
"description": "Generate new Express applications similar to express-generate which but sets it up to use TypeScript instead",
3+
"version": "1.0.2",
4+
"description": "Easy TypeScript Express Starter",
5+
"author": "AGUMON [email protected]",
6+
"license": "MIT",
7+
"main": "lib/cli.js",
8+
"keywords": [
9+
"typescript",
10+
"express",
11+
"jest",
12+
"lint"
13+
],
514
"scripts": {
615
"typescript-express-starter": "node bin/cli.js",
716
"start": "node bin/cli.js",
817
"test": "echo \"Error: no test specified\" && exit 1"
918
},
10-
"main": "lib/cli.js",
1119
"bin": {
1220
"typescript-express-starter": "bin/cli.js"
1321
},
22+
"dependencies": {
23+
"edit-json-file": "^1.3.2",
24+
"ncp": "^2.0.0"
25+
},
1426
"repository": {
1527
"type": "git",
1628
"url": "git+https://github.com/ljlm0402/typescript-express-starter.git"
1729
},
18-
"keywords": [
19-
"express",
20-
"typescript",
21-
"jest"
22-
],
23-
"author": "AGUMON [email protected]",
24-
"license": "MIT",
2530
"bugs": {
2631
"url": "https://github.com/ljlm0402/typescript-express-starter/issues"
2732
},
28-
"homepage": "https://github.com/ljlm0402/typescript-express-starter#readme",
29-
"dependencies": {
30-
"edit-json-file": "^1.3.2",
31-
"ncp": "^2.0.0"
32-
}
33+
"homepage": "https://github.com/ljlm0402/typescript-express-starter#readme"
3334
}
3435

0 commit comments

Comments
 (0)