starlight-color 1.0.0

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/dist/index.js ADDED
@@ -0,0 +1,82 @@
1
+ /******/ (() => { // webpackBootstrap
2
+ /******/ var __webpack_modules__ = ({
3
+
4
+ /***/ 889:
5
+ /***/ ((module) => {
6
+
7
+ const RESET = "\x1b[0m";
8
+
9
+ function wrap(code, text) {
10
+ return code + String(text) + RESET;
11
+ }
12
+
13
+ module.exports = {
14
+ red: text => wrap("\x1b[31m", text),
15
+ green: text => wrap("\x1b[32m", text),
16
+ yellow: text => wrap("\x1b[33m", text),
17
+ blue: text => wrap("\x1b[34m", text),
18
+ magenta: text => wrap("\x1b[35m", text),
19
+ cyan: text => wrap("\x1b[36m", text),
20
+ white: text => wrap("\x1b[37m", text),
21
+
22
+ gray: text => wrap("\x1b[90m", text),
23
+
24
+ brightRed: text => wrap("\x1b[91m", text),
25
+ brightGreen: text => wrap("\x1b[92m", text),
26
+ brightYellow: text => wrap("\x1b[93m", text),
27
+ brightBlue: text => wrap("\x1b[94m", text),
28
+ brightMagenta: text => wrap("\x1b[95m", text),
29
+ brightCyan: text => wrap("\x1b[96m", text),
30
+ brightWhite: text => wrap("\x1b[97m", text)
31
+ };
32
+
33
+
34
+ /***/ })
35
+
36
+ /******/ });
37
+ /************************************************************************/
38
+ /******/ // The module cache
39
+ /******/ var __webpack_module_cache__ = {};
40
+ /******/
41
+ /******/ // The require function
42
+ /******/ function __nccwpck_require__(moduleId) {
43
+ /******/ // Check if module is in cache
44
+ /******/ var cachedModule = __webpack_module_cache__[moduleId];
45
+ /******/ if (cachedModule !== undefined) {
46
+ /******/ return cachedModule.exports;
47
+ /******/ }
48
+ /******/ // Create a new module (and put it into the cache)
49
+ /******/ var module = __webpack_module_cache__[moduleId] = {
50
+ /******/ // no module.id needed
51
+ /******/ // no module.loaded needed
52
+ /******/ exports: {}
53
+ /******/ };
54
+ /******/
55
+ /******/ // Execute the module function
56
+ /******/ var threw = true;
57
+ /******/ try {
58
+ /******/ __webpack_modules__[moduleId](module, module.exports, __nccwpck_require__);
59
+ /******/ threw = false;
60
+ /******/ } finally {
61
+ /******/ if(threw) delete __webpack_module_cache__[moduleId];
62
+ /******/ }
63
+ /******/
64
+ /******/ // Return the exports of the module
65
+ /******/ return module.exports;
66
+ /******/ }
67
+ /******/
68
+ /************************************************************************/
69
+ /******/ /* webpack/runtime/compat */
70
+ /******/
71
+ /******/ if (typeof __nccwpck_require__ !== 'undefined') __nccwpck_require__.ab = __dirname + "/";
72
+ /******/
73
+ /************************************************************************/
74
+ /******/
75
+ /******/ // startup
76
+ /******/ // Load entry module and return exports
77
+ /******/ // This entry module is referenced by other modules so it can't be inlined
78
+ /******/ var __webpack_exports__ = __nccwpck_require__(889);
79
+ /******/ module.exports = __webpack_exports__;
80
+ /******/
81
+ /******/ })()
82
+ ;
package/index.js ADDED
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+
3
+ require('./dist/index.js');
package/package.json ADDED
@@ -0,0 +1,20 @@
1
+ {
2
+ "name": "starlight-color",
3
+ "version": "1.0.0",
4
+ "description": "Starlight Programming Language with Color Support",
5
+ "bin": {
6
+ "starlight": "index.js"
7
+ },
8
+ "scripts": {
9
+ "build": "ncc build src/starlight.js -o dist",
10
+ "prepublishOnly": "npm run build"
11
+ },
12
+ "author": "Macedon",
13
+ "license": "MIT",
14
+ "os": [
15
+ "win32"
16
+ ],
17
+ "devDependencies": {
18
+ "@vercel/ncc": "^0.38.4"
19
+ }
20
+ }
@@ -0,0 +1,25 @@
1
+ const RESET = "\x1b[0m";
2
+
3
+ function wrap(code, text) {
4
+ return code + String(text) + RESET;
5
+ }
6
+
7
+ module.exports = {
8
+ red: text => wrap("\x1b[31m", text),
9
+ green: text => wrap("\x1b[32m", text),
10
+ yellow: text => wrap("\x1b[33m", text),
11
+ blue: text => wrap("\x1b[34m", text),
12
+ magenta: text => wrap("\x1b[35m", text),
13
+ cyan: text => wrap("\x1b[36m", text),
14
+ white: text => wrap("\x1b[37m", text),
15
+
16
+ gray: text => wrap("\x1b[90m", text),
17
+
18
+ brightRed: text => wrap("\x1b[91m", text),
19
+ brightGreen: text => wrap("\x1b[92m", text),
20
+ brightYellow: text => wrap("\x1b[93m", text),
21
+ brightBlue: text => wrap("\x1b[94m", text),
22
+ brightMagenta: text => wrap("\x1b[95m", text),
23
+ brightCyan: text => wrap("\x1b[96m", text),
24
+ brightWhite: text => wrap("\x1b[97m", text)
25
+ };