Skip to content

Commit

Permalink
feat: init project
Browse files Browse the repository at this point in the history
  • Loading branch information
KID-joker committed Oct 7, 2023
1 parent e705b5d commit d52fe55
Show file tree
Hide file tree
Showing 27 changed files with 4,684 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "@antfu"
}
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
node_modules
.DS_Store
dist
playgrounds/*/pnpm-lock.yaml
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ignore-workspace-root-check=true
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# vue-masonry-grid
10 changes: 10 additions & 0 deletions build.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { defineBuildConfig } from 'unbuild'

export default defineBuildConfig({
entries: ['src/index'],
declaration: true,
clean: true,
rollup: {
emitCJS: true,
},
})
81 changes: 81 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
{
"name": "vue-masonry-grid",
"type": "module",
"version": "0.0.0",
"packageManager": "[email protected]",
"description": "",
"author": "KID-joker <[email protected]>",
"license": "MIT",
"homepage": "https://github.com/KID-joker/vue-masonry-grid#readme",
"repository": {
"type": "git",
"url": "git+https://github.com/KID-joker/vue-masonry-grid.git"
},
"bugs": "https://github.com/KID-joker/vue-masonry-grid/issues",
"sideEffects": false,
"exports": {
".": {
"types": "./dist/index.d.ts",
"require": "./dist/index.cjs",
"import": "./dist/index.mjs"
}
},
"main": "./dist/index.mjs",
"module": "./dist/index.mjs",
"types": "./dist/index.d.ts",
"typesVersions": {
"*": {
"*": [
"./dist/*",
"./dist/index.d.ts"
]
}
},
"files": [
"dist"
],
"scripts": {
"build": "unbuild",
"dev": "unbuild --stub",
"lint": "eslint .",
"play:2.7": "nr -C playgrounds/vue2.7 dev",
"play:3": "nr -C playgrounds/vue3 dev",
"prepublishOnly": "nr build",
"release": "bumpp && npm publish",
"start": "esno src/index.ts",
"typecheck": "vue-tsc --noEmit"
},
"peerDependencies": {
"@vue/composition-api": "^1.0.0",
"vue": "^2.6.0 || >=3.0.0"
},
"peerDependenciesMeta": {
"@vue/composition-api": {
"optional": true
}
},
"dependencies": {
"vue-demi": "^0.14.6"
},
"devDependencies": {
"@antfu/eslint-config": "^0.38.6",
"@antfu/ni": "^0.21.8",
"@types/node": "^18.18.4",
"bumpp": "^9.2.0",
"eslint": "^8.51.0",
"esno": "^0.16.3",
"lint-staged": "^13.3.0",
"pnpm": "^8.8.0",
"simple-git-hooks": "^2.9.0",
"typescript": "^5.2.2",
"unbuild": "^1.2.1",
"vue": "^3.3.4",
"vue-tsc": "^1.8.16"
},
"simple-git-hooks": {
"pre-commit": "pnpm lint-staged"
},
"lint-staged": {
"*": "eslint --fix"
}
}
1 change: 1 addition & 0 deletions playgrounds/vue2.7/env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/// <reference types="vite/client" />
13 changes: 13 additions & 0 deletions playgrounds/vue2.7/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" href="/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite App</title>
</head>
<body>
<div id="app"></div>
<script type="module" src="/src/main.ts"></script>
</body>
</html>
29 changes: 29 additions & 0 deletions playgrounds/vue2.7/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"name": "vue2-ts",
"version": "0.0.0",
"scripts": {
"dev": "vite",
"build": "run-p type-check build-only",
"preview": "vite preview --port 4173",
"build-only": "vite build",
"type-check": "vue-tsc --noEmit"
},
"dependencies": {
"vue": "^2.7.7",
"vue-masonry-grid": "file:../../dist"
},
"devDependencies": {
"@types/node": "^16.11.45",
"@vitejs/plugin-legacy": "^2.0.0",
"@vitejs/plugin-vue2": "^1.1.2",
"@vue/tsconfig": "^0.1.3",
"npm-run-all": "^4.1.5",
"terser": "^5.14.2",
"typescript": "~4.7.4",
"vite": "^3.0.2",
"vue-tsc": "^0.38.8"
},
"resolutions": {
"vue-masonry-grid": "file:../../dist"
}
}
7 changes: 7 additions & 0 deletions playgrounds/vue2.7/src/App.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<script setup lang="ts">
import HelloWorld from 'vue-masonry-grid'
</script>

<template>
<HelloWorld />
</template>
6 changes: 6 additions & 0 deletions playgrounds/vue2.7/src/main.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import Vue from 'vue'
import App from './App.vue'

new Vue({
render: h => h(App),
}).$mount('#app')
8 changes: 8 additions & 0 deletions playgrounds/vue2.7/tsconfig.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"extends": "@vue/tsconfig/tsconfig.node.json",
"include": ["vite.config.*", "vitest.config.*", "cypress.config.*"],
"compilerOptions": {
"composite": true,
"types": ["node"]
}
}
16 changes: 16 additions & 0 deletions playgrounds/vue2.7/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"extends": "@vue/tsconfig/tsconfig.web.json",
"include": ["env.d.ts", "src/**/*", "src/**/*.vue"],
"compilerOptions": {
"baseUrl": ".",
"paths": {
"@/*": ["./src/*"]
}
},

"references": [
{
"path": "./tsconfig.config.json"
}
]
}
14 changes: 14 additions & 0 deletions playgrounds/vue2.7/vite.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { defineConfig } from 'vite'
import legacy from '@vitejs/plugin-legacy'
import vue2 from '@vitejs/plugin-vue2'

// https://vitejs.dev/config/
export default defineConfig({
plugins: [
vue2(),
legacy({
targets: ['ie >= 11'],
additionalLegacyPolyfills: ['regenerator-runtime/runtime'],
}),
],
})
1 change: 1 addition & 0 deletions playgrounds/vue3/env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/// <reference types="vite/client" />
13 changes: 13 additions & 0 deletions playgrounds/vue3/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<link rel="icon" href="/favicon.ico">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Vite App</title>
</head>
<body>
<div id="app"></div>
<script type="module" src="/src/main.ts"></script>
</body>
</html>
29 changes: 29 additions & 0 deletions playgrounds/vue3/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"name": "vue3-ts",
"version": "0.0.0",
"private": true,
"scripts": {
"dev": "vite",
"build": "run-p type-check \"build-only {@}\" --",
"preview": "vite preview",
"build-only": "vite build",
"type-check": "vue-tsc --noEmit -p tsconfig.app.json --composite false"
},
"dependencies": {
"vue": "^3.3.4",
"vue-masonry-grid": "file:../../dist"
},
"devDependencies": {
"@tsconfig/node18": "^18.2.2",
"@types/node": "^18.17.17",
"@vitejs/plugin-vue": "^4.3.4",
"@vue/tsconfig": "^0.4.0",
"npm-run-all2": "^6.0.6",
"typescript": "~5.2.0",
"vite": "^4.4.9",
"vue-tsc": "^1.8.11"
},
"resolutions": {
"vue-masonry-grid": "file:../../dist"
}
}
7 changes: 7 additions & 0 deletions playgrounds/vue3/src/App.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<script setup lang="ts">
import HelloWorld from 'vue-masonry-grid'
</script>

<template>
<HelloWorld />
</template>
4 changes: 4 additions & 0 deletions playgrounds/vue3/src/main.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import { createApp } from 'vue'
import App from './App.vue'

createApp(App).mount('#app')
12 changes: 12 additions & 0 deletions playgrounds/vue3/tsconfig.app.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"extends": "@vue/tsconfig/tsconfig.dom.json",
"include": ["env.d.ts", "src/**/*", "src/**/*.vue"],
"exclude": ["src/**/__tests__/*"],
"compilerOptions": {
"composite": true,
"baseUrl": ".",
"paths": {
"@/*": ["./src/*"]
}
}
}
11 changes: 11 additions & 0 deletions playgrounds/vue3/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"files": [],
"references": [
{
"path": "./tsconfig.node.json"
},
{
"path": "./tsconfig.app.json"
}
]
}
16 changes: 16 additions & 0 deletions playgrounds/vue3/tsconfig.node.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"extends": "@tsconfig/node18/tsconfig.json",
"include": [
"vite.config.*",
"vitest.config.*",
"cypress.config.*",
"nightwatch.conf.*",
"playwright.config.*"
],
"compilerOptions": {
"composite": true,
"module": "ESNext",
"moduleResolution": "Bundler",
"types": ["node"]
}
}
16 changes: 16 additions & 0 deletions playgrounds/vue3/vite.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { URL, fileURLToPath } from 'node:url'

import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'

// https://vitejs.dev/config/
export default defineConfig({
plugins: [
vue(),
],
resolve: {
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url)),
},
},
})
Loading

0 comments on commit d52fe55

Please sign in to comment.