Skip to content

Commit

Permalink
chore: update test command
Browse files Browse the repository at this point in the history
  • Loading branch information
typicode committed Mar 26, 2024
1 parent e3b174a commit 431e079
Show file tree
Hide file tree
Showing 6 changed files with 48 additions and 6 deletions.
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
lib
docs
2 changes: 0 additions & 2 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@

npm run build
npm test
2 changes: 1 addition & 1 deletion fixtures/Foo.mist.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Generated by MistCSS, do not modify
import './Foo.mist.css'

import type { JSX, ReactNode } from 'react';
import type { JSX, ReactNode } from 'react'

type FooProps = {
children?: ReactNode
Expand Down
41 changes: 41 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
"scripts": {
"build": "rm -rf lib && tsc",
"format": "prettier --write .",
"lint": "eslint src",
"lint": "eslint",
"fixtures:type-check": " tsc -p ./fixtures/tsconfig.json",
"fixtures:lint-css": "stylelint './fixtures/**/*.css'",
"test": "npm run build && node --test && npm run fixtures:type-check && npm run fixtures:lint-css",
"test": "npm run build && node --import tsx/esm --test src/*.test.ts && npm run fixtures:type-check && npm run fixtures:lint-css",
"prepublishOnly": "npm run build",
"docs:dev": "vitepress dev docs",
"docs:build": "vitepress build docs",
Expand Down Expand Up @@ -43,6 +43,7 @@
"prettier": "^3.2.5",
"stylelint": "^16.2.1",
"stylelint-config-standard": "^36.0.0",
"tsx": "^4.7.1",
"typescript": "^5.3.3",
"vitepress": "^1.0.0-rc.44"
},
Expand Down
2 changes: 1 addition & 1 deletion src/renderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export function render(name: string, components: Components): string {
return `// Generated by MistCSS, do not modify
import './${name}.mist.css'
import type { JSX, ReactNode } from 'react';
import type { JSX, ReactNode } from 'react'
${Object.keys(components)
.map((key) => renderComponent(components, key))
Expand Down

0 comments on commit 431e079

Please sign in to comment.