File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ root = true
2+
3+ [* ]
4+ indent_style = tab
5+ end_of_line = lf
6+ charset = utf-8
7+ trim_trailing_whitespace = true
8+ insert_final_newline = true
9+
10+ [* .yml ]
11+ indent_style = space
12+ indent_size = 2
Original file line number Diff line number Diff line change 1+ * text =auto eol =lf
Original file line number Diff line number Diff line change 1- # Logs
2- logs
3- * .log
4- npm-debug.log *
5- yarn-debug.log *
6- yarn-error.log *
7- lerna-debug.log *
8- .pnpm-debug.log *
9-
10- # Diagnostic reports (https://nodejs.org/api/report.html)
11- report. [0-9 ]* . [0-9 ]* . [0-9 ]* . [0-9 ]* .json
12-
13- # Runtime data
14- pids
15- * .pid
16- * .seed
17- * .pid.lock
18-
19- # Directory for instrumented libs generated by jscoverage/JSCover
20- lib-cov
21-
22- # Coverage directory used by tools like istanbul
23- coverage
24- * .lcov
25-
26- # nyc test coverage
27- .nyc_output
28-
29- # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
30- .grunt
31-
32- # Bower dependency directory (https://bower.io/)
33- bower_components
34-
35- # node-waf configuration
36- .lock-wscript
37-
38- # Compiled binary addons (https://nodejs.org/api/addons.html)
39- build /Release
40-
41- # Dependency directories
42- node_modules /
43- jspm_packages /
44-
45- # Snowpack dependency directory (https://snowpack.dev/)
46- web_modules /
47-
48- # TypeScript cache
49- * .tsbuildinfo
50-
51- # Optional npm cache directory
52- .npm
53-
54- # Optional eslint cache
55- .eslintcache
56-
57- # Optional stylelint cache
58- .stylelintcache
59-
60- # Microbundle cache
61- .rpt2_cache /
62- .rts2_cache_cjs /
63- .rts2_cache_es /
64- .rts2_cache_umd /
65-
66- # Optional REPL history
67- .node_repl_history
68-
69- # Output of 'npm pack'
70- * .tgz
71-
72- # Yarn Integrity file
73- .yarn-integrity
74-
75- # dotenv environment variable files
76- .env
77- .env.development.local
78- .env.test.local
79- .env.production.local
80- .env.local
81-
82- # parcel-bundler cache (https://parceljs.org/)
83- .cache
84- .parcel-cache
85-
86- # Next.js build output
87- .next
88- out
89-
90- # Nuxt.js build / generate output
91- .nuxt
1+ node_modules
922dist
93-
94- # Gatsby files
95- .cache /
96- # Comment in the public line in if your project uses Gatsby and not Next.js
97- # https://nextjs.org/blog/next-9-1#public-directory-support
98- # public
99-
100- # vuepress build output
101- .vuepress /dist
102-
103- # vuepress v2.x temp and cache directory
104- .temp
105- .cache
106-
107- # Docusaurus cache and generated files
108- .docusaurus
109-
110- # Serverless directories
111- .serverless /
112-
113- # FuseBox cache
114- .fusebox /
115-
116- # DynamoDB Local files
117- .dynamodb /
118-
119- # TernJS port file
120- .tern-port
121-
122- # Stores VSCode versions used for testing VSCode extensions
123- .vscode-test
124-
125- # yarn v2
126- .yarn /cache
127- .yarn /unplugged
128- .yarn /build-state.yml
129- .yarn /install-state.gz
130- .pnp. *
3+ .env
Original file line number Diff line number Diff line change 1+ dist
Original file line number Diff line number Diff line change 1- # magic-commit
2- You can do magicc, you can commit anything that you desire.
1+ # magicc
2+
3+ > This readme is automatically generated by [ create-ink-app] ( https://github.com/vadimdemedes/create-ink-app )
4+
5+ ## Install
6+
7+ ``` bash
8+ $ npm install --global magicc
9+ ```
10+
11+ ## CLI
12+
13+ ```
14+ $ magicc --help
15+
16+ Usage
17+ $ magicc
18+
19+ Options
20+ --name Your name
21+
22+ Examples
23+ $ magicc --name=Jane
24+ Hello, Jane
25+ ```
Original file line number Diff line number Diff line change 1+ {
2+ "name" : " magicc" ,
3+ "version" : " 0.0.0" ,
4+ "license" : " MIT" ,
5+ "bin" : " dist/cli.js" ,
6+ "type" : " module" ,
7+ "engines" : {
8+ "node" : " >=16"
9+ },
10+ "scripts" : {
11+ "build" : " babel --out-dir=dist source" ,
12+ "dev" : " babel --out-dir=dist --watch source" ,
13+ "test" : " prettier --check . && xo && ava"
14+ },
15+ "files" : [
16+ " dist"
17+ ],
18+ "dependencies" : {
19+ "ink" : " ^4.1.0" ,
20+ "ink-big-text" : " ^2.0.0" ,
21+ "ink-gradient" : " ^3.0.0" ,
22+ "meow" : " ^11.0.0" ,
23+ "react" : " ^18.2.0"
24+ },
25+ "devDependencies" : {
26+ "@babel/cli" : " ^7.21.0" ,
27+ "@babel/preset-react" : " ^7.18.6" ,
28+ "@vdemedes/prettier-config" : " ^2.0.1" ,
29+ "ava" : " ^5.2.0" ,
30+ "chalk" : " ^5.2.0" ,
31+ "eslint-config-xo-react" : " ^0.27.0" ,
32+ "eslint-plugin-react" : " ^7.32.2" ,
33+ "eslint-plugin-react-hooks" : " ^4.6.0" ,
34+ "import-jsx" : " ^5.0.0" ,
35+ "ink-testing-library" : " ^3.0.0" ,
36+ "prettier" : " ^2.8.7" ,
37+ "xo" : " ^0.53.1"
38+ },
39+ "ava" : {
40+ "environmentVariables" : {
41+ "NODE_NO_WARNINGS" : " 1"
42+ },
43+ "nodeArguments" : [
44+ " --loader=import-jsx"
45+ ]
46+ },
47+ "xo" : {
48+ "extends" : " xo-react" ,
49+ "prettier" : true ,
50+ "rules" : {
51+ "react/prop-types" : " off"
52+ }
53+ },
54+ "prettier" : " @vdemedes/prettier-config" ,
55+ "babel" : {
56+ "presets" : [
57+ " @babel/preset-react"
58+ ]
59+ }
60+ }
Original file line number Diff line number Diff line change 1+ import React from 'react' ;
2+ import { Text } from 'ink' ;
3+ import BigText from 'ink-big-text' ;
4+ import Gradient from 'ink-gradient' ;
5+
6+ export default function App ( ) {
7+ return (
8+ < >
9+ < Gradient name = "passion" >
10+ < BigText text = "Magicc" />
11+ < Text > You can do `magicc`, you can commit anything that you desire. 🪄</ Text >
12+ </ Gradient >
13+ </ >
14+ ) ;
15+ }
Original file line number Diff line number Diff line change 1+ #!/usr/bin/env node
2+ import React from 'react' ;
3+ import { render } from 'ink' ;
4+ import meow from 'meow' ;
5+ import App from './app.js' ;
6+
7+ const cli = meow (
8+ `
9+ Usage
10+ $ magicc
11+ ` ,
12+ {
13+ importMeta : import . meta,
14+ } ,
15+ ) ;
16+
17+ render ( < App /> ) ;
Original file line number Diff line number Diff line change 1+ import React from 'react' ;
2+ import chalk from 'chalk' ;
3+ import test from 'ava' ;
4+ import { render } from 'ink-testing-library' ;
5+ import App from './source/app.js' ;
6+
7+ test ( 'greet unknown user' , t => {
8+ const { lastFrame} = render ( < App /> ) ;
9+
10+ t . is ( lastFrame ( ) , `Hello, ${ chalk . green ( 'Stranger' ) } ` ) ;
11+ } ) ;
12+
13+ test ( 'greet user with a name' , t => {
14+ const { lastFrame} = render ( < App name = "Jane" /> ) ;
15+
16+ t . is ( lastFrame ( ) , `Hello, ${ chalk . green ( 'Jane' ) } ` ) ;
17+ } ) ;
You can’t perform that action at this time.
0 commit comments