first commit
This commit is contained in:
24
.gitignore
vendored
Normal file
24
.gitignore
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
# build output
|
||||
dist/
|
||||
# generated types
|
||||
.astro/
|
||||
|
||||
# dependencies
|
||||
node_modules/
|
||||
|
||||
# logs
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
pnpm-debug.log*
|
||||
|
||||
|
||||
# environment variables
|
||||
.env
|
||||
.env.production
|
||||
|
||||
# macOS-specific files
|
||||
.DS_Store
|
||||
|
||||
# jetbrains setting folder
|
||||
.idea/
|
6
index.ts
Normal file
6
index.ts
Normal file
@@ -0,0 +1,6 @@
|
||||
// Do not write code directly here, instead use the `src` folder!
|
||||
// Then, use this file to export everything you want your user to access.
|
||||
|
||||
import MyComponent from './src/MyComponent.astro';
|
||||
|
||||
export default MyComponent;
|
7268
package-lock.json
generated
Normal file
7268
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
26
package.json
Normal file
26
package.json
Normal file
@@ -0,0 +1,26 @@
|
||||
{
|
||||
"name": "",
|
||||
"version": "0.0.1",
|
||||
"type": "module",
|
||||
"exports": {
|
||||
".": "./index.ts"
|
||||
},
|
||||
"files": [
|
||||
"src",
|
||||
"index.ts"
|
||||
],
|
||||
"keywords": [
|
||||
"astro-component"
|
||||
],
|
||||
"scripts": {},
|
||||
"devDependencies": {
|
||||
"astro": "^4.8.3"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"astro": "^4.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"@astrojs/check": "^0.6.0",
|
||||
"typescript": "^5.4.5"
|
||||
}
|
||||
}
|
8
src/MyComponent.astro
Normal file
8
src/MyComponent.astro
Normal file
@@ -0,0 +1,8 @@
|
||||
---
|
||||
// Write your component code in this file!
|
||||
interface Props {
|
||||
prefix?: string;
|
||||
}
|
||||
---
|
||||
|
||||
<div>{Astro.props.prefix} My special component</div>
|
6
tsconfig.json
Normal file
6
tsconfig.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"extends": "astro/tsconfigs/strict",
|
||||
"compilerOptions": {
|
||||
"jsx": "preserve"
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user