diff --git a/index.html b/index.html
index a888544..6f5830a 100644
--- a/index.html
+++ b/index.html
@@ -4,7 +4,7 @@
-
Vite App
+ starscore example
diff --git a/lib/index.d.ts b/lib/index.d.ts
new file mode 100644
index 0000000..c9247d4
--- /dev/null
+++ b/lib/index.d.ts
@@ -0,0 +1,2 @@
+
+export { }
diff --git a/package.json b/package.json
index b810d33..80c560a 100644
--- a/package.json
+++ b/package.json
@@ -15,7 +15,8 @@
"import": "./lib/starscore.js",
"require": "./lib/starscore.cjs",
"types": "./lib/index.d.ts"
- }
+ },
+ "./lib/style.css": "./lib/style.css"
},
"keywords": [
"star",
@@ -25,6 +26,10 @@
"files": [
"lib"
],
+ "repository": {
+ "url": "https://github.com/vcjs-dev/starscore"
+ },
+ "homepage": "https://github.com/vcjs-dev/starscore",
"scripts": {
"dev": "vite",
"build": "run-p type-check build-only",
@@ -60,6 +65,7 @@
"prettier": "^3.0.0",
"rollup": "^3.28.0",
"rollup-plugin-dts": "^5.3.1",
+ "sass": "^1.65.1",
"typescript": "~5.1.6",
"vite": "^4.4.6",
"vitest": "^0.33.0",
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index eedc77e..6274a15 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -58,15 +58,18 @@ devDependencies:
rollup-plugin-dts:
specifier: ^5.3.1
version: 5.3.1(rollup@3.28.0)(typescript@5.1.6)
+ sass:
+ specifier: ^1.65.1
+ version: 1.65.1
typescript:
specifier: ~5.1.6
version: 5.1.6
vite:
specifier: ^4.4.6
- version: 4.4.6(@types/node@18.17.0)
+ version: 4.4.6(@types/node@18.17.0)(sass@1.65.1)
vitest:
specifier: ^0.33.0
- version: 0.33.0(jsdom@22.1.0)
+ version: 0.33.0(jsdom@22.1.0)(sass@1.65.1)
vue:
specifier: ^3.3.4
version: 3.3.4
@@ -729,7 +732,7 @@ packages:
vite: ^4.0.0
vue: ^3.2.25
dependencies:
- vite: 4.4.6(@types/node@18.17.0)
+ vite: 4.4.6(@types/node@18.17.0)(sass@1.65.1)
vue: 3.3.4
dev: true
@@ -2396,6 +2399,10 @@ packages:
engines: {node: '>= 4'}
dev: true
+ /immutable@4.3.2:
+ resolution: {integrity: sha512-oGXzbEDem9OOpDWZu88jGiYCvIsLHMvGw+8OXlpsvTFvIQplQbjg1B1cvKg8f7Hoch6+NGjpPsH1Fr+Mc2D1aA==}
+ dev: true
+
/import-fresh@3.3.0:
resolution: {integrity: sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==}
engines: {node: '>=6'}
@@ -3553,6 +3560,16 @@ packages:
resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==}
dev: true
+ /sass@1.65.1:
+ resolution: {integrity: sha512-9DINwtHmA41SEd36eVPQ9BJKpn7eKDQmUHmpI0y5Zv2Rcorrh0zS+cFrt050hdNbmmCNKTW3hV5mWfuegNRsEA==}
+ engines: {node: '>=14.0.0'}
+ hasBin: true
+ dependencies:
+ chokidar: 3.5.3
+ immutable: 4.3.2
+ source-map-js: 1.0.2
+ dev: true
+
/saxes@6.0.0:
resolution: {integrity: sha512-xAg7SOnEhrm5zI3puOOKyy1OMcMlIJZYNJY7xLBwSze0UjhPLnWfj2GF2EpT0jmzaJKIWKHLsaSSajf35bcYnA==}
engines: {node: '>=v12.22.7'}
@@ -4027,7 +4044,7 @@ packages:
spdx-expression-parse: 3.0.1
dev: true
- /vite-node@0.33.0(@types/node@18.17.0):
+ /vite-node@0.33.0(@types/node@18.17.0)(sass@1.65.1):
resolution: {integrity: sha512-19FpHYbwWWxDr73ruNahC+vtEdza52kA90Qb3La98yZ0xULqV8A5JLNPUff0f5zID4984tW7l3DH2przTJUZSw==}
engines: {node: '>=v14.18.0'}
hasBin: true
@@ -4037,7 +4054,7 @@ packages:
mlly: 1.4.0
pathe: 1.1.1
picocolors: 1.0.0
- vite: 4.4.6(@types/node@18.17.0)
+ vite: 4.4.6(@types/node@18.17.0)(sass@1.65.1)
transitivePeerDependencies:
- '@types/node'
- less
@@ -4049,7 +4066,7 @@ packages:
- terser
dev: true
- /vite@4.4.6(@types/node@18.17.0):
+ /vite@4.4.6(@types/node@18.17.0)(sass@1.65.1):
resolution: {integrity: sha512-EY6Mm8vJ++S3D4tNAckaZfw3JwG3wa794Vt70M6cNJ6NxT87yhq7EC8Rcap3ahyHdo8AhCmV9PTk+vG1HiYn1A==}
engines: {node: ^14.18.0 || >=16.0.0}
hasBin: true
@@ -4081,11 +4098,12 @@ packages:
esbuild: 0.18.20
postcss: 8.4.27
rollup: 3.28.0
+ sass: 1.65.1
optionalDependencies:
fsevents: 2.3.2
dev: true
- /vitest@0.33.0(jsdom@22.1.0):
+ /vitest@0.33.0(jsdom@22.1.0)(sass@1.65.1):
resolution: {integrity: sha512-1CxaugJ50xskkQ0e969R/hW47za4YXDUfWJDxip1hwbnhUjYolpfUn2AMOulqG/Dtd9WYAtkHmM/m3yKVrEejQ==}
engines: {node: '>=v14.18.0'}
hasBin: true
@@ -4138,8 +4156,8 @@ packages:
strip-literal: 1.3.0
tinybench: 2.5.0
tinypool: 0.6.0
- vite: 4.4.6(@types/node@18.17.0)
- vite-node: 0.33.0(@types/node@18.17.0)
+ vite: 4.4.6(@types/node@18.17.0)(sass@1.65.1)
+ vite-node: 0.33.0(@types/node@18.17.0)(sass@1.65.1)
why-is-node-running: 2.2.2
transitivePeerDependencies:
- less
diff --git a/public/.nojekyll b/public/.nojekyll
new file mode 100644
index 0000000..e69de29
diff --git a/src/App.vue b/src/App.vue
index 7905b05..a43d49c 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -1,85 +1,7 @@
-
-
-
-
-
-
-
-
-
- Home
- About
-
-
-
-
-
+
diff --git a/src/assets/base.css b/src/assets/base.css
index d3de42e..05bfd77 100644
--- a/src/assets/base.css
+++ b/src/assets/base.css
@@ -50,24 +50,6 @@
}
}
-*,
-*::before,
-*::after {
- box-sizing: border-box;
- margin: 0;
- font-weight: normal;
-}
-body {
- min-height: 100vh;
- color: var(--color-text);
- background: var(--color-background);
- transition: color 0.5s, background-color 0.5s;
- line-height: 1.6;
- font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu,
- Cantarell, 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
- font-size: 15px;
- text-rendering: optimizeLegibility;
- -webkit-font-smoothing: antialiased;
- -moz-osx-font-smoothing: grayscale;
-}
+
+
diff --git a/src/assets/main.css b/src/assets/main.css
index e8667cd..a1e1556 100644
--- a/src/assets/main.css
+++ b/src/assets/main.css
@@ -1,35 +1 @@
-@import './base.css';
-
-#app {
- max-width: 1280px;
- margin: 0 auto;
- padding: 2rem;
-
- font-weight: normal;
-}
-
-a,
-.green {
- text-decoration: none;
- color: hsla(160, 100%, 37%, 1);
- transition: 0.4s;
-}
-
-@media (hover: hover) {
- a:hover {
- background-color: hsla(160, 100%, 37%, 0.2);
- }
-}
-
-@media (min-width: 1024px) {
- body {
- display: flex;
- place-items: center;
- }
-
- #app {
- display: grid;
- grid-template-columns: 1fr 1fr;
- padding: 0 2rem;
- }
-}
+@import './base.css';
\ No newline at end of file
diff --git a/src/components/HelloWorld.vue b/src/components/HelloWorld.vue
deleted file mode 100644
index 38d821e..0000000
--- a/src/components/HelloWorld.vue
+++ /dev/null
@@ -1,41 +0,0 @@
-
-
-
-
-
{{ msg }}
-
- You’ve successfully created a project with
- Vite +
- Vue 3 . What's next?
-
-
-
-
-
diff --git a/src/components/TheWelcome.vue b/src/components/TheWelcome.vue
deleted file mode 100644
index a70765c..0000000
--- a/src/components/TheWelcome.vue
+++ /dev/null
@@ -1,86 +0,0 @@
-
-
-
-
-
-
-
- Documentation
-
- Vue’s
- official documentation
- provides you with all information you need to get started.
-
-
-
-
-
-
- Tooling
-
- This project is served and bundled with
- Vite . The
- recommended IDE setup is
- VSCode +
- Volar . If
- you need to test your components and web pages, check out
- Cypress and
- Cypress Component Testing .
-
-
-
- More instructions are available in README.md
.
-
-
-
-
-
-
- Ecosystem
-
- Get official tools and libraries for your project:
- Pinia ,
- Vue Router ,
- Vue Test Utils , and
- Vue Dev Tools . If
- you need more resources, we suggest paying
- Awesome Vue
- a visit.
-
-
-
-
-
-
- Community
-
- Got stuck? Ask your question on
- Vue Land , our official
- Discord server, or
- StackOverflow . You should also subscribe to
- our mailing list and follow
- the official
- @vuejs
- twitter account for latest news in the Vue world.
-
-
-
-
-
-
- Support Vue
-
- As an independent project, Vue relies on community backing for its sustainability. You can help
- us by
- becoming a sponsor .
-
-
diff --git a/src/components/WelcomeItem.vue b/src/components/WelcomeItem.vue
deleted file mode 100644
index 6d7086a..0000000
--- a/src/components/WelcomeItem.vue
+++ /dev/null
@@ -1,87 +0,0 @@
-
-
-
-
-
diff --git a/src/components/__tests__/HelloWorld.spec.ts b/src/components/__tests__/HelloWorld.spec.ts
deleted file mode 100644
index 2533202..0000000
--- a/src/components/__tests__/HelloWorld.spec.ts
+++ /dev/null
@@ -1,11 +0,0 @@
-import { describe, it, expect } from 'vitest'
-
-import { mount } from '@vue/test-utils'
-import HelloWorld from '../HelloWorld.vue'
-
-describe('HelloWorld', () => {
- it('renders properly', () => {
- const wrapper = mount(HelloWorld, { props: { msg: 'Hello Vitest' } })
- expect(wrapper.text()).toContain('Hello Vitest')
- })
-})
diff --git a/src/components/icons/IconCommunity.vue b/src/components/icons/IconCommunity.vue
deleted file mode 100644
index 2dc8b05..0000000
--- a/src/components/icons/IconCommunity.vue
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
diff --git a/src/components/icons/IconDocumentation.vue b/src/components/icons/IconDocumentation.vue
deleted file mode 100644
index 6d4791c..0000000
--- a/src/components/icons/IconDocumentation.vue
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
diff --git a/src/components/icons/IconEcosystem.vue b/src/components/icons/IconEcosystem.vue
deleted file mode 100644
index c3a4f07..0000000
--- a/src/components/icons/IconEcosystem.vue
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
diff --git a/src/components/icons/IconSupport.vue b/src/components/icons/IconSupport.vue
deleted file mode 100644
index 7452834..0000000
--- a/src/components/icons/IconSupport.vue
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
diff --git a/src/components/icons/IconTooling.vue b/src/components/icons/IconTooling.vue
deleted file mode 100644
index 660598d..0000000
--- a/src/components/icons/IconTooling.vue
+++ /dev/null
@@ -1,19 +0,0 @@
-
-
-
-
-
-
diff --git a/src/lib/Starscore.ts b/src/lib/Starscore.ts
new file mode 100644
index 0000000..32b1e72
--- /dev/null
+++ b/src/lib/Starscore.ts
@@ -0,0 +1,23 @@
+import type {
+ StarscoreInstance,
+ CreateStarscore,
+ StarscoreOptions,
+} from './interfaces/core'
+
+class Starscore implements StarscoreInstance {
+ options: Required = {
+ container: '',
+ }
+
+ constructor(opts: StarscoreOptions) {
+ this.options = Object.assign(this.options, opts)
+ }
+
+ render() {}
+}
+
+const createStarscore: CreateStarscore = (opts) => {
+ return new Starscore(opts)
+}
+
+export { Starscore, createStarscore }
diff --git a/src/lib/interfaces/core.ts b/src/lib/interfaces/core.ts
new file mode 100644
index 0000000..fbd62a5
--- /dev/null
+++ b/src/lib/interfaces/core.ts
@@ -0,0 +1,9 @@
+export interface StarscoreOptions {
+ container: string | HTMLElement
+}
+
+export interface StarscoreInstance {
+ render(): void
+}
+
+export type CreateStarscore = (opts: StarscoreOptions) => StarscoreInstance
diff --git a/src/lib/main.ts b/src/lib/main.ts
index e69de29..efddf3d 100644
--- a/src/lib/main.ts
+++ b/src/lib/main.ts
@@ -0,0 +1,5 @@
+import { createStarscore, Starscore } from './Starscore'
+
+import './styles/main.scss'
+
+export { Starscore, createStarscore }
diff --git a/src/lib/styles/main.scss b/src/lib/styles/main.scss
new file mode 100644
index 0000000..e69de29
diff --git a/src/router/index.ts b/src/router/index.ts
index a49ae50..5bca242 100644
--- a/src/router/index.ts
+++ b/src/router/index.ts
@@ -1,5 +1,4 @@
import { createRouter, createWebHistory } from 'vue-router'
-import HomeView from '../views/HomeView.vue'
const router = createRouter({
history: createWebHistory(import.meta.env.BASE_URL),
@@ -7,17 +6,9 @@ const router = createRouter({
{
path: '/',
name: 'home',
- component: HomeView
+ component: () => import('@/views/HomeView.vue'),
},
- {
- path: '/about',
- name: 'about',
- // route level code-splitting
- // this generates a separate chunk (About.[hash].js) for this route
- // which is lazy-loaded when the route is visited.
- component: () => import('../views/AboutView.vue')
- }
- ]
+ ],
})
export default router
diff --git a/src/views/AboutView.vue b/src/views/AboutView.vue
deleted file mode 100644
index 756ad2a..0000000
--- a/src/views/AboutView.vue
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
-
This is an about page
-
-
-
-
diff --git a/src/views/HomeView.vue b/src/views/HomeView.vue
index d5c0217..d5499d4 100644
--- a/src/views/HomeView.vue
+++ b/src/views/HomeView.vue
@@ -1,9 +1,5 @@
-
-
-
+ hello
diff --git a/tsconfig.app.json b/tsconfig.app.json
index 3e5b621..5c71fd6 100644
--- a/tsconfig.app.json
+++ b/tsconfig.app.json
@@ -7,6 +7,7 @@
"baseUrl": ".",
"paths": {
"@/*": ["./src/*"]
- }
+ },
+ "moduleResolution": "Node"
}
-}
+}
\ No newline at end of file
diff --git a/types/index.d.ts b/types/index.d.ts
index e69de29..6f70f0d 100644
--- a/types/index.d.ts
+++ b/types/index.d.ts
@@ -0,0 +1,9 @@
+import type {
+ StarscoreInstance,
+ StarscoreOptions,
+ CreateStarscore,
+} from '../src/lib/interfaces/core'
+
+declare const createStarscore: CreateStarscore
+
+export { StarscoreInstance, StarscoreOptions, createStarscore }