mirror of
https://github.com/jakejarvis/stitches-normalize.git
synced 2025-04-28 05:40:28 -04:00
convert to ESM module and real typescript
This commit is contained in:
parent
e80d7d6b7c
commit
ef51f14603
21
.eslintrc.json
Normal file
21
.eslintrc.json
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
{
|
||||||
|
"extends": [
|
||||||
|
"@jakejarvis/eslint-config",
|
||||||
|
"plugin:@typescript-eslint/recommended"
|
||||||
|
],
|
||||||
|
"plugins": [
|
||||||
|
"@typescript-eslint"
|
||||||
|
],
|
||||||
|
"parser": "@typescript-eslint/parser",
|
||||||
|
"env": {
|
||||||
|
"node": true,
|
||||||
|
"browser": false
|
||||||
|
},
|
||||||
|
"rules": {
|
||||||
|
"quote-props": "off",
|
||||||
|
"@typescript-eslint/ban-ts-comment": "off"
|
||||||
|
},
|
||||||
|
"ignorePatterns": [
|
||||||
|
"dist/**"
|
||||||
|
]
|
||||||
|
}
|
19
.github/workflows/ci.yml
vendored
Normal file
19
.github/workflows/ci.yml
vendored
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
name: CI
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
pull_request:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
test:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- uses: actions/setup-node@v2
|
||||||
|
with:
|
||||||
|
node-version: 16
|
||||||
|
- run: yarn install --frozen-lockfile
|
||||||
|
- run: yarn test
|
||||||
|
- run: yarn build
|
3
.gitignore
vendored
3
.gitignore
vendored
@ -1,5 +1,4 @@
|
|||||||
.DS_Store
|
.DS_Store
|
||||||
node_modules/
|
node_modules/
|
||||||
yarn.lock
|
dist/
|
||||||
.npmrc
|
.npmrc
|
||||||
.vscode/
|
|
||||||
|
5
index.d.ts
vendored
5
index.d.ts
vendored
@ -1,5 +0,0 @@
|
|||||||
import * as Stitches from "@stitches/react";
|
|
||||||
|
|
||||||
declare const normalizeCss: Record<string, Stitches.CSSProperties>[];
|
|
||||||
|
|
||||||
export default normalizeCss;
|
|
39
package.json
39
package.json
@ -1,8 +1,9 @@
|
|||||||
{
|
{
|
||||||
"name": "stitches-normalize",
|
"name": "stitches-normalize",
|
||||||
"version": "0.1.0",
|
"version": "0.1.0",
|
||||||
"description": "@sindresorhus's modern-normalize.css as a plug-and-play JavaScript object compatible with Stitches.",
|
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
"description": "@sindresorhus's modern-normalize.css as a plug-and-play JavaScript object compatible with Stitches.",
|
||||||
|
"repository": "jakejarvis/stitches-normalize",
|
||||||
"author": {
|
"author": {
|
||||||
"name": "Jake Jarvis",
|
"name": "Jake Jarvis",
|
||||||
"email": "jake@jarv.is",
|
"email": "jake@jarv.is",
|
||||||
@ -15,22 +16,40 @@
|
|||||||
"url": "https://sindresorhus.com"
|
"url": "https://sindresorhus.com"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"repository": {
|
"type": "module",
|
||||||
"type": "git",
|
|
||||||
"url": "https://github.com/jakejarvis/stitches-normalize.git"
|
|
||||||
},
|
|
||||||
"files": [
|
"files": [
|
||||||
"index.js",
|
"dist"
|
||||||
"index.d.ts"
|
|
||||||
],
|
],
|
||||||
"main": "index.js",
|
"source": "./src/index.ts",
|
||||||
"types": "./index.d.ts",
|
"main": "./dist/index.cjs",
|
||||||
|
"module": "./dist/index.js",
|
||||||
|
"exports": {
|
||||||
|
"require": "./dist/index.cjs",
|
||||||
|
"import": "./dist/index.js"
|
||||||
|
},
|
||||||
|
"types": "./dist/index.d.ts",
|
||||||
|
"scripts": {
|
||||||
|
"build": "microbundle --no-sourcemap --no-compress --format cjs,esm",
|
||||||
|
"test": "eslint .",
|
||||||
|
"prepublishOnly": "yarn build"
|
||||||
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@stitches/react": "^1.2.7"
|
"@jakejarvis/eslint-config": "*",
|
||||||
|
"@stitches/react": "^1.2.7",
|
||||||
|
"@typescript-eslint/eslint-plugin": "^5.15.0",
|
||||||
|
"@typescript-eslint/parser": "^5.15.0",
|
||||||
|
"eslint": "^8.11.0",
|
||||||
|
"microbundle": "^0.14.2",
|
||||||
|
"typescript": "^4.6.2"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"@stitches/react": "1.x"
|
"@stitches/react": "1.x"
|
||||||
},
|
},
|
||||||
|
"peerDependenciesMeta": {
|
||||||
|
"@stitches/react": {
|
||||||
|
"optional": true
|
||||||
|
}
|
||||||
|
},
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"stitches",
|
"stitches",
|
||||||
"css-in-js",
|
"css-in-js",
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
|
/*! stitches-normalize | MIT License | https://github.com/jakejarvis/stitches-normalize */
|
||||||
/*! modern-normalize v1.1.0 | MIT License | https://github.com/sindresorhus/modern-normalize */
|
/*! modern-normalize v1.1.0 | MIT License | https://github.com/sindresorhus/modern-normalize */
|
||||||
// ...as of this commit:
|
|
||||||
// https://github.com/sindresorhus/modern-normalize/blob/b59ec0d3d8654cbb6843bc9ea45aef5f1d680108/modern-normalize.css
|
|
||||||
|
|
||||||
/** @type {Record<string, import("@stitches/react").CSSProperties>[]} */
|
import type * as Stitches from "@stitches/react";
|
||||||
module.exports = [
|
|
||||||
|
const normalizeCss: Record<string, Stitches.CSSProperties>[] = [
|
||||||
{
|
{
|
||||||
"*, ::before, ::after": {
|
"*, ::before, ::after": {
|
||||||
boxSizing: "border-box",
|
boxSizing: "border-box",
|
||||||
@ -11,6 +11,7 @@ module.exports = [
|
|||||||
html: {
|
html: {
|
||||||
lineHeight: 1.15,
|
lineHeight: 1.15,
|
||||||
tabSize: 4,
|
tabSize: 4,
|
||||||
|
// @ts-ignore
|
||||||
WebkitTextSizeAdjust: "100%",
|
WebkitTextSizeAdjust: "100%",
|
||||||
},
|
},
|
||||||
body: {
|
body: {
|
||||||
@ -60,6 +61,7 @@ module.exports = [
|
|||||||
textTransform: "none",
|
textTransform: "none",
|
||||||
},
|
},
|
||||||
"button, [type='button'], [type='reset'], [type='submit']": {
|
"button, [type='button'], [type='reset'], [type='submit']": {
|
||||||
|
// @ts-ignore
|
||||||
WebkitAppearance: "button",
|
WebkitAppearance: "button",
|
||||||
},
|
},
|
||||||
"::-moz-focus-inner": {
|
"::-moz-focus-inner": {
|
||||||
@ -83,9 +85,11 @@ module.exports = [
|
|||||||
},
|
},
|
||||||
"[type='search']": {
|
"[type='search']": {
|
||||||
outlineOffset: -2,
|
outlineOffset: -2,
|
||||||
|
// @ts-ignore
|
||||||
WebkitAppearance: "textfield",
|
WebkitAppearance: "textfield",
|
||||||
},
|
},
|
||||||
"::-webkit-search-decoration": {
|
"::-webkit-search-decoration": {
|
||||||
|
// @ts-ignore
|
||||||
WebkitAppearance: "none",
|
WebkitAppearance: "none",
|
||||||
},
|
},
|
||||||
"::-webkit-inner-spin-button, ::-webkit-outer-spin-button": {
|
"::-webkit-inner-spin-button, ::-webkit-outer-spin-button": {
|
||||||
@ -93,7 +97,10 @@ module.exports = [
|
|||||||
},
|
},
|
||||||
"::-webkit-file-upload-button": {
|
"::-webkit-file-upload-button": {
|
||||||
font: "inherit",
|
font: "inherit",
|
||||||
|
// @ts-ignore
|
||||||
WebkitAppearance: "button",
|
WebkitAppearance: "button",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
export default normalizeCss;
|
Loading…
x
Reference in New Issue
Block a user