Skip to content

Commit 0ae5429

Browse files
committed
feat!: move to esm and upgrade deps
1 parent b543297 commit 0ae5429

File tree

9 files changed

+2075
-2166
lines changed

9 files changed

+2075
-2166
lines changed

README.md

Lines changed: 42 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ You can help the community discover new Vue websites by using the [browser exten
99
## Installation
1010

1111
```bash
12-
npm install -g vue-telescope-analyzer # Or yarn global add vue-telescope-analyzer
12+
npm i -g vue-telescope-analyzer
1313
```
1414

1515
## Usage
@@ -107,62 +107,50 @@ analyze('https://nuxt.com')
107107
Result:
108108

109109
```js
110-
{ 17:48:21
111-
url: 'https://nuxt.com/',
110+
{ url: 'https//nuxt.com/',
112111
hostname: 'nuxt.com',
113112
domain: 'nuxt.com',
114-
meta: {
115-
language: 'en',
116-
title: 'Nuxt: The Intuitive Web Framework',
117-
description: 'Build your next Vue.js application with confidence using Nuxt. An open source framework under MIT license that makes web development simple and powerful.',
118-
siteName: '',
119-
isAdultContent: false
120-
},
121-
vueVersion: '3.2.45',
113+
meta:
114+
{ language: 'en',
115+
title: 'Nuxt: The Intuitive Vue Framework · Nuxt',
116+
description:
117+
'Nuxt is an open source framework that makes web development intuitive and powerful. Create performant and production-grade full-stack web apps and websites with confidence.',
118+
siteName: 'Nuxt',
119+
isAdultContent: false },
120+
vueVersion: '3.4.21',
122121
hasSSR: true,
123-
isStatic: false,
124-
framework: {
125-
slug: 'nuxtjs',
126-
name: 'Nuxt',
127-
imgPath: '/framework/nuxt.svg',
128-
url: 'https://nuxt.com'
129-
},
130-
plugins: [
131-
{
132-
slug: 'vue-router',
133-
name: 'vue-router',
134-
imgPath: null,
135-
url: 'https://router.vuejs.org/'
136-
}
137-
],
138-
ui: {
139-
slug: 'tailwind-css',
140-
name: 'Tailwind CSS',
141-
imgPath: '/ui/tailwind.svg',
142-
url: 'https://tailwindcss.com/'
143-
},
144-
frameworkModules: [
145-
{
146-
slug: 'nuxt-content',
147-
name: '@nuxt/content',
148-
imgPath: null,
149-
url: 'https://content.nuxtjs.org'
150-
},
151-
{
152-
slug: 'nuxtjs-algolia',
153-
name: '@nuxtjs/algolia',
154-
imgPath: null,
155-
url: 'https://algolia.nuxtjs.org'
156-
},
157-
{
158-
slug: 'nuxt-image',
159-
name: '@nuxt/image',
160-
imgPath: null,
161-
url: 'https://image.nuxtjs.org'
162-
}
163-
],
164-
screenshot: '/var/folders/.../00b97a2040a9aeffc8d5c9d855d2643a.jpg'
165-
}
122+
isStatic: true,
123+
framework:
124+
{ slug: 'nuxtjs',
125+
name: 'Nuxt',
126+
imgPath: '/framework/nuxt.svg',
127+
url: 'https://nuxt.com',
128+
version: '3.10.3' },
129+
plugins:
130+
[ { slug: 'vue-router',
131+
name: 'vue-router',
132+
imgPath: null,
133+
url: 'https://router.vuejs.org/' } ],
134+
ui:
135+
{ slug: 'tailwind-css',
136+
name: 'Tailwind CSS',
137+
imgPath: '/ui/tailwind.svg',
138+
url: 'https://tailwindcss.com/' },
139+
frameworkModules:
140+
[ { slug: 'nuxt-content',
141+
name: '@nuxt/content',
142+
imgPath: null,
143+
url: 'https://content.nuxtjs.org' },
144+
{ slug: 'nuxtjs-color-mode',
145+
name: '@nuxtjs/color-mode',
146+
imgPath: null,
147+
url: 'https://color-mode.nuxtjs.org' },
148+
{ slug: 'nuxt-ui', name: '@nuxt/ui', imgPath: null, url: 'https://ui.nuxt.com' },
149+
{ slug: 'nuxt-ui-pro',
150+
name: '@nuxt/ui-pro',
151+
imgPath: null,
152+
url: 'https://ui.nuxt.com/pro' } ],
153+
screenshot: '/var/folders/.../00b97a2040a9aeffc8d5c9d855d2643a.jpg' }
166154
```
167155

168156
## Contributing

bin/vta.js

Lines changed: 0 additions & 40 deletions
This file was deleted.

bin/vta.mjs

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
#!/usr/bin/env node
2+
3+
import ora from 'ora'
4+
import consola from 'consola'
5+
import { defineCommand, runMain } from 'citty'
6+
import { analyze } from '../src/index.mjs'
7+
8+
const main = defineCommand({
9+
meta: {
10+
name: 'vta',
11+
description: 'Vue Telescope Analyzer'
12+
},
13+
args: {
14+
url: {
15+
type: 'positional',
16+
description: 'URL to analyze',
17+
required: true
18+
},
19+
browser: {
20+
type: 'string',
21+
description: 'Browser WS endpoint to use',
22+
required: false
23+
}
24+
},
25+
async setup ({ args }) {
26+
const spinner = ora(`Detecting Vue on ${args.url}`).start()
27+
setTimeout(() => spinner.color = 'magenta', 2500)
28+
setTimeout(() => spinner.color = 'blue', 5000)
29+
setTimeout(() => spinner.color = 'yellow', 7500)
30+
31+
const hrstart = process.hrtime()
32+
try {
33+
const result = await analyze(args.url, { browserWSEndpoint: args.browser })
34+
spinner.stop()
35+
consola.log(result)
36+
37+
const hrend = process.hrtime(hrstart)
38+
consola.info('Execution time (hr): %ds %dms', hrend[0], hrend[1] / 1000000)
39+
process.exit(0)
40+
} catch (err) {
41+
consola.error(err.message)
42+
if (err.body) consola.log(err.body)
43+
process.exit(1)
44+
}
45+
}
46+
})
47+
48+
runMain(main)

package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@
2020
"author": "NuxtJS Company",
2121
"license": "GPL-3.0",
2222
"dependencies": {
23-
"consola": "^2.15.3",
24-
"make-dir": "^3.1.0",
25-
"ora": "5.4.0",
26-
"puppeteer": "^13.5.2",
27-
"tld-extract": "^2.0.1",
28-
"yargs": "^17.5.1"
23+
"citty": "^0.1.6",
24+
"consola": "^3.2.3",
25+
"make-dir": "^4.0.0",
26+
"ora": "8.0.1",
27+
"puppeteer": "^22.6.3",
28+
"tld-extract": "^2.1.0"
2929
},
3030
"devDependencies": {
3131
"standard-version": "^9.5.0"

0 commit comments

Comments
 (0)