Skip to content

Commit 431e079

Browse files
committed
chore: update test command
1 parent e3b174a commit 431e079

6 files changed

Lines changed: 48 additions & 6 deletions

File tree

.eslintignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
lib
2+
docs

.husky/pre-commit

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
1-
2-
npm run build
31
npm test

fixtures/Foo.mist.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Generated by MistCSS, do not modify
22
import './Foo.mist.css'
33

4-
import type { JSX, ReactNode } from 'react';
4+
import type { JSX, ReactNode } from 'react'
55

66
type FooProps = {
77
children?: ReactNode

package-lock.json

Lines changed: 41 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@
99
"scripts": {
1010
"build": "rm -rf lib && tsc",
1111
"format": "prettier --write .",
12-
"lint": "eslint src",
12+
"lint": "eslint",
1313
"fixtures:type-check": " tsc -p ./fixtures/tsconfig.json",
1414
"fixtures:lint-css": "stylelint './fixtures/**/*.css'",
15-
"test": "npm run build && node --test && npm run fixtures:type-check && npm run fixtures:lint-css",
15+
"test": "npm run build && node --import tsx/esm --test src/*.test.ts && npm run fixtures:type-check && npm run fixtures:lint-css",
1616
"prepublishOnly": "npm run build",
1717
"docs:dev": "vitepress dev docs",
1818
"docs:build": "vitepress build docs",
@@ -43,6 +43,7 @@
4343
"prettier": "^3.2.5",
4444
"stylelint": "^16.2.1",
4545
"stylelint-config-standard": "^36.0.0",
46+
"tsx": "^4.7.1",
4647
"typescript": "^5.3.3",
4748
"vitepress": "^1.0.0-rc.44"
4849
},

src/renderer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ export function render(name: string, components: Components): string {
5252
return `// Generated by MistCSS, do not modify
5353
import './${name}.mist.css'
5454
55-
import type { JSX, ReactNode } from 'react';
55+
import type { JSX, ReactNode } from 'react'
5656
5757
${Object.keys(components)
5858
.map((key) => renderComponent(components, key))

0 commit comments

Comments
 (0)