Skip to content

Commit

Permalink
feat: sponsorship
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Dec 6, 2021
1 parent 7ea0f55 commit d0cb65f
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 2 deletions.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@

A blazing fast unit test framework powered by Vite.

> **This project is currently in closed beta exclusively for Sponsors.**
> Become a Sponsor of [@patak-js](https://github.com/sponsors/patak-js) or [@antfu](https://github.com/sponsors/antfu) to access the source code and issues tracker.
## Features

- [Vite](https://vitejs.dev/)'s config, transformers, resolvers, and plugins.
Expand Down Expand Up @@ -155,7 +158,7 @@ describe('suite', () => {
- [x] Task filter
- [x] Mock
- [x] Global Mode & Types
- [ ] Concurrent Executing
- [ ] Parallel Executing
- [x] CLI Help
- [x] JSDom
- [x] Watch
Expand Down
8 changes: 8 additions & 0 deletions README.npm.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# vitest

[![NPM version](https://img.shields.io/npm/v/vitest?color=a1b858&label=)](https://www.npmjs.com/package/vitest)

A blazing fast unit test framework powered by Vite.

> **This project is currently in closed beta exclusively for Sponsors.**
> Become a Sponsor of [@patak-js](https://github.com/sponsors/patak-js) or [@antfu](https://github.com/sponsors/antfu) to access the source code and issues tracker.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"build": "rimraf dist && tsc -p src/tsconfig.json",
"lint": "eslint \"{src,test}/**/*.ts\"",
"prepublishOnly": "nr build",
"release": "bumpp --commit --push --tag && pnpm publish",
"release": "bumpp --commit --push --tag && esmo scripts/publish.ts",
"test": "node bin/vitest.mjs --dev",
"test:update": "nr test -u",
"watch": "tsc -p src/tsconfig.json --watch"
Expand Down
12 changes: 12 additions & 0 deletions scripts/publish.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { execSync } from 'child_process'
import fs from 'fs/promises'

await fs.copyFile('README.md', 'README.gh.md')
await fs.unlink('README.md')
await fs.copyFile('README.npm.md', 'README.md')

execSync('npm publish', { stdio: 'inherit' })

await fs.unlink('README.md')
await fs.copyFile('README.gh.md', 'README.md')
await fs.unlink('README.gh.md')
5 changes: 5 additions & 0 deletions src/node/cli.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
/* eslint-disable no-console */
import { fileURLToPath } from 'url'
import { resolve, dirname } from 'path'
import { findUp } from 'find-up'
import sade from 'sade'
import c from 'picocolors'
import type { UserOptions } from '../types'
import { run as startViteNode } from './node.js'

console.log(c.yellow(c.bold('\nVitest is currently in closed beta exclusively for Sponsors')))
console.log(c.magenta(`Become a Sponsor of ${c.underline('https://github.com/sponsors/patak-js')} or ${c.underline('https://github.com/sponsors/antfu')} \nto access the source code and issues tracker 💖\n`))

// TODO: use bundler
const version = '0.0.0'

Expand Down

0 comments on commit d0cb65f

Please sign in to comment.