codsen 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md ADDED
@@ -0,0 +1,10 @@
1
+ # Change Log
2
+
3
+ All notable changes to this project will be documented in this file.
4
+ See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
+
6
+ ## 0.0.2 (2022-01-11)
7
+
8
+ ### Bug Fixes
9
+
10
+ - init ([9f9d5cd](https://github.com/codsen/codsen/commit/9f9d5cd93ee99daca59e3a573414d9f852181f41))
package/LICENSE ADDED
@@ -0,0 +1,22 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2010-2022 Roy Revelt and other contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,53 @@
1
+ # codsen
2
+
3
+ > Codsen CLI
4
+
5
+ <div class="package-badges">
6
+ <a href="https://www.npmjs.com/package/codsen" rel="nofollow noreferrer noopener">
7
+ <img src="https://img.shields.io/badge/-npm-blue?style=flat-square" alt="page on npm">
8
+ </a>
9
+ <a href="https://codsen.com/os/codsen" rel="nofollow noreferrer noopener">
10
+ <img src="https://img.shields.io/badge/-codsen-blue?style=flat-square" alt="page on codsen.com">
11
+ </a>
12
+ <a href="https://github.com/codsen/codsen/tree/main/packages/codsen" rel="nofollow noreferrer noopener">
13
+ <img src="https://img.shields.io/badge/-github-blue?style=flat-square" alt="page on github">
14
+ </a>
15
+ <a href="https://npmcharts.com/compare/codsen?interval=30" rel="nofollow noreferrer noopener" target="_blank">
16
+ <img src="https://img.shields.io/npm/dm/codsen.svg?style=flat-square" alt="Downloads per month">
17
+ </a>
18
+ <a href="https://prettier.io" rel="nofollow noreferrer noopener" target="_blank">
19
+ <img src="https://img.shields.io/badge/code_style-prettier-brightgreen.svg?style=flat-square" alt="Code style: prettier">
20
+ </a>
21
+ <img src="https://img.shields.io/badge/licence-MIT-brightgreen.svg?style=flat-square" alt="MIT License">
22
+ <a href="https://liberamanifesto.com" rel="nofollow noreferrer noopener" target="_blank">
23
+ <img src="https://img.shields.io/badge/libera-manifesto-lightgrey.svg?style=flat-square" alt="libera manifesto">
24
+ </a>
25
+ </div>
26
+
27
+ ## Install
28
+
29
+ ```bash
30
+ npm i -g codsen
31
+ ```
32
+
33
+ Then, call it from the command line using keyword:
34
+
35
+ ```bash
36
+ codsen
37
+ ```
38
+
39
+ ## Documentation
40
+
41
+ Please [visit codsen.com](https://codsen.com/os/codsen/) for a full description of the API.
42
+
43
+ ## Contributing
44
+
45
+ To report bugs or request features or assistance, [raise an issue](https://github.com/codsen/codsen/issues/new/choose) on GitHub.
46
+
47
+ ## Licence
48
+
49
+ MIT License
50
+
51
+ Copyright (c) 2010-2022 Roy Revelt and other contributors
52
+
53
+ <img src="https://codsen.com/images/png-codsen-ok.png" width="98" alt="ok" align="center"> <img src="https://codsen.com/images/png-codsen-1.png" width="148" alt="codsen" align="center"> <img src="https://codsen.com/images/png-codsen-star-small.png" width="32" alt="star" align="center">
package/cli.js ADDED
@@ -0,0 +1,37 @@
1
+ #!/usr/bin/env node
2
+
3
+ import meow from "meow";
4
+ import { createRequire } from "module";
5
+
6
+ const { log } = console;
7
+
8
+ const require = createRequire(import.meta.url);
9
+ const { name } = require("./package.json");
10
+
11
+ const cli = meow(
12
+ `
13
+ Usage
14
+ $ codsen
15
+
16
+ Options
17
+ -h, --help Shows this help
18
+ -v, --version Shows the version of your ${name}
19
+ `,
20
+ {
21
+ importMeta: import.meta,
22
+ flags: {},
23
+ }
24
+ );
25
+
26
+ // FUNCTIONS
27
+ // -----------------------------------------------------------------------------
28
+
29
+ if (cli.flags.v) {
30
+ log(cli.pkg.version);
31
+ process.exit(0);
32
+ } else if (cli.flags.h) {
33
+ log(cli.help);
34
+ process.exit(0);
35
+ }
36
+
37
+ console.log("C O D S E N");
package/package.json ADDED
@@ -0,0 +1,56 @@
1
+ {
2
+ "name": "codsen",
3
+ "version": "0.0.2",
4
+ "description": "Codsen CLI",
5
+ "keywords": [
6
+ "codsen",
7
+ "cli"
8
+ ],
9
+ "homepage": "https://codsen.com/os/codsen/",
10
+ "repository": {
11
+ "type": "git",
12
+ "url": "https://github.com/codsen/codsen.git",
13
+ "directory": "packages/codsen"
14
+ },
15
+ "license": "MIT",
16
+ "author": {
17
+ "name": "Roy Revelt",
18
+ "email": "roy@codsen.com",
19
+ "url": "https://codsen.com"
20
+ },
21
+ "type": "module",
22
+ "bin": {
23
+ "codsen": "cli.js"
24
+ },
25
+ "scripts": {
26
+ "build": "echo 'no build needed'",
27
+ "dev": "echo 'no build needed'",
28
+ "lect": "node '../../ops/lect/lect.js'",
29
+ "letspublish": "yarn publish || :",
30
+ "lint": "eslint . --fix",
31
+ "prepare": "echo 'ready'",
32
+ "prettier:format": "prettier --write '**/*.{js,md}' --no-error-on-unmatched-pattern",
33
+ "test": "c8 yarn run unit && yarn run lint",
34
+ "unit": "uvu test"
35
+ },
36
+ "engines": {
37
+ "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
38
+ },
39
+ "c8": {
40
+ "check-coverage": false,
41
+ "exclude": [
42
+ "**/test/**/*.*"
43
+ ]
44
+ },
45
+ "lect": {
46
+ "licence": {
47
+ "extras": [
48
+ ""
49
+ ]
50
+ }
51
+ },
52
+ "dependencies": {
53
+ "meow": "^10.1.2",
54
+ "update-notifier": "^5.1.0"
55
+ }
56
+ }