Skip to content

Commit 74ce704

Browse files
CLI setup (#3)
Introduce CLI
1 parent 9a77389 commit 74ce704

34 files changed

+1934
-35948
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
.DS_Store
22
/node_modules/
3-
/dist/
43

54
# local env files
65
.env.local

README.md

Lines changed: 45 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,17 @@ Auto-generated documentation via Docsify
2626
npm install
2727
```
2828

29-
#### Initiate Test Suite
29+
#### Create new project
30+
```
31+
npx create-vue3-package <repo-name>
32+
```
33+
34+
#### Initiate test suite
3035
```
3136
npm test
3237
```
3338

34-
#### Serve Docs
39+
#### Serve docs
3540
```
3641
npm run docs
3742
@@ -58,34 +63,37 @@ visit -> http://localhost:3000
5863
## What's in this Package?
5964

6065
```
61-
vue-starter-package
62-
├── .github
63-
├── docs
64-
├── node_modules
65-
├── src
66-
│ └── assets
67-
│ └── main.ts
66+
create-vue3-package
6867
├── templates
69-
│ └── ISSUE_TEMPLATE
70-
│ └── bug_report.md
71-
│ └── feature_request.md
72-
│ └── CODE_OF_CONDUCT.md
73-
│ └── CONTRIBUTING.md
74-
│ └── LICENSE.md
75-
│ └── PULL_REQUEST_TEMPLATE.md
76-
│ └── README_TEMPLATE.md
77-
├── tests
78-
│ └── sum.js
79-
│ └── sum.test.js
80-
├── .eslintrc.js
81-
├── .gitignore
82-
├── babel.config.js
83-
├── CODE_OF_CONDUCT.md
84-
├── LICENSE.md
85-
├── package.json
86-
├── package-lock.json
87-
├── README.md
88-
└── tsconfig.json
68+
│ └── ISSUE_TEMPLATE
69+
│ └── bug_report.md
70+
│ └── feature_request.md
71+
│ └── CODE_OF_CONDUCT.md
72+
│ └── CONTRIBUTING.md
73+
│ └── LICENSE.md
74+
│ └── PULL_REQUEST_TEMPLATE.md
75+
│ └── README_TEMPLATE.md
76+
│ └── src
77+
│ └── main.ts
78+
│ └── main.vue
79+
│ └── tests
80+
│ └── example-ts-file.test.js
81+
│ └── example-vue-file.test.js
82+
│ └── docs
83+
│ └── customization
84+
│ └── configuration.md
85+
│ └── themes.md
86+
│ └── getting_started
87+
│ └── more-pages.md
88+
│ └── quickstart.md
89+
│ └── guides
90+
│ └── deploy.md
91+
│ └── helpers.md
92+
│ └── .nojekyll
93+
│ └── _sidebar.md
94+
│ └── changelog.md
95+
│ └── index.html
96+
│ └── README.md
8997
```
9098

9199

@@ -94,12 +102,19 @@ vue-starter-package
94102
To expand on the test suite, add your test files to the `/tests` directory, and Jest will
95103
automatically pick them up.
96104

105+
This package has been pre-configured to test `.js`, `.ts`, and `.vue` files for your convenience.
106+
Please see `/templates/tests` for example implementation.
107+
97108
To run your automated tests, run the commands below in your terminal:
98109
```
99110
cd <repo-name>
100111
101-
npm run test
112+
npm test
102113
```
114+
If you would like to have an HTML file generated to view the results in more detail, please
115+
uncomment the line 'html' in `jest.config.js`. Otherwise, the results will be visible in your
116+
terminal.
117+
103118

104119
[Jest Documentation](https://jestjs.io/docs/en/getting-started)
105120

bin/create-package

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/usr/bin/env node
2+
3+
require = require('esm')(module /*, options*/);
4+
require('../src/cli').cli(process.argv);

0 commit comments

Comments
 (0)