country-flag-cli 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +58 -0
  3. package/package.json +39 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2021 Evan Mattiza
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,58 @@
1
+ # typescript-cli-starter
2
+
3
+ A simple and zero-opinion typescript starter template for building cross-platform command line applications.
4
+
5
+ ![GitHub package.json dynamic](https://img.shields.io/github/package-json/keywords/khalidx/typescript-cli-starter.svg?style=flat-square)
6
+
7
+ ![GitHub](https://img.shields.io/github/license/khalidx/typescript-cli-starter.svg?style=flat-square)
8
+ ![GitHub package.json version](https://img.shields.io/github/package-json/v/khalidx/typescript-cli-starter.svg?style=flat-square)
9
+ ![GitHub top language](https://img.shields.io/github/languages/top/khalidx/typescript-cli-starter.svg?style=flat-square)
10
+
11
+ ![GitHub last commit](https://img.shields.io/github/last-commit/khalidx/typescript-cli-starter.svg?style=flat-square)
12
+
13
+ Includes:
14
+
15
+ - [TypeScript](https://www.typescriptlang.org/), for writing good code
16
+ - [Ava](https://www.npmjs.com/package/ava), for writing good tests
17
+ - [Commander](https://www.npmjs.com/package/commander), for building CLI applications
18
+ - [Pkg](https://www.npmjs.com/package/pkg), for building cross-platform native executables
19
+
20
+ Your application will be installable from `npm` or by sharing your native executables.
21
+
22
+ ## Usage
23
+
24
+ ### **dev**
25
+
26
+ `npm run dev`
27
+
28
+ Runs the CLI application.
29
+
30
+ You can pass arguments to your application by running `npm run dev -- --your-argument`. The extra `--` is so that your arguments are passed to your CLI application, and not `npm`.
31
+
32
+ ### **clean**
33
+
34
+ `npm run clean`
35
+
36
+ Removes any built code and any built executables.
37
+
38
+ ### **build**
39
+
40
+ `npm run build`
41
+
42
+ Cleans, then builds the TypeScript code.
43
+
44
+ Your built code will be in the `./dist/` directory.
45
+
46
+ ### **test**
47
+
48
+ `npm run test`
49
+
50
+ Cleans, then builds, and tests the built code.
51
+
52
+ ### **bundle**
53
+
54
+ `npm run bundle`
55
+
56
+ Cleans, then builds, then bundles into native executables for Windows, Mac, and Linux.
57
+
58
+ Your shareable executables will be in the `./exec/` directory.
package/package.json ADDED
@@ -0,0 +1,39 @@
1
+ {
2
+ "name": "country-flag-cli",
3
+ "version": "0.0.1",
4
+ "description": "A simple cli app to return flag emojis given 2 digit country code",
5
+ "author": "Evan Mattiza",
6
+ "keywords": [
7
+ "typescript",
8
+ "cli"
9
+ ],
10
+ "license": "MIT",
11
+ "main": "./dist/index.js",
12
+ "bin": "./dist/cli.js",
13
+ "files": [
14
+ "dist/**/*",
15
+ "!dist/**/*.test.js"
16
+ ],
17
+ "scripts": {
18
+ "dev": "esno ./src/cli.ts",
19
+ "clean": "rimraf ./dist/ ./exec/",
20
+ "es-build": "esbuild --platform=node --bundle src/cli.ts --outdir=dist --minify --sourcemap=inline",
21
+ "build": "npm run clean && npm run test && npm run es-build",
22
+ "test": "jest",
23
+ "bundle": "npm run build && pkg . -t node14 --out-dir ./exec/ --compress GZip"
24
+ },
25
+ "devDependencies": {
26
+ "@types/jest": "^27.4.0",
27
+ "esbuild": "^0.14.11",
28
+ "esno": "^0.14.0",
29
+ "jest": "^27.4.7",
30
+ "pkg": "^4.4.0",
31
+ "pkg-fetch": "^3.2.6",
32
+ "rimraf": "^2.6.3",
33
+ "ts-jest": "^27.1.3",
34
+ "typescript": "^3.5.3"
35
+ },
36
+ "dependencies": {
37
+ "commander": "^2.20.0"
38
+ }
39
+ }