Skip to content

Commit 56edca7

Browse files
Merge pull request #14 from sduduzog/improve-composition
Improve composition
2 parents 85b131f + c153dda commit 56edca7

36 files changed

+12277
-83
lines changed

.eslintignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
node_modules
2+
dist

.eslintrc.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
module.exports = {
2+
parser: "@typescript-eslint/parser",
3+
extends: ["prettier"],
4+
plugins: ["@typescript-eslint", "prettier"],
5+
rules: {
6+
"prettier/prettier": ["error"],
7+
},
8+
};

.npmignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
examples

.prettierrc.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
module.exports = {
2+
trailingComma: "es5",
3+
arrowParens: "avoid",
4+
};

examples/vue2-demo/.browserslistrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
> 1%
2+
last 2 versions
3+
not dead

examples/vue2-demo/.gitignore

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
.DS_Store
2+
node_modules
3+
/dist
4+
5+
6+
# local env files
7+
.env.local
8+
.env.*.local
9+
10+
# Log files
11+
npm-debug.log*
12+
yarn-debug.log*
13+
yarn-error.log*
14+
pnpm-debug.log*
15+
16+
# Editor directories and files
17+
.idea
18+
.vscode
19+
*.suo
20+
*.ntvs*
21+
*.njsproj
22+
*.sln
23+
*.sw?

examples/vue2-demo/README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# vue2 + composition-api + Supabase
2+
3+
## Getting Started
4+
5+
- Run `yarn install` to pull all the required dependencies
6+
- Create a `.env` file on the root of this project i.e. `../vue3-vite-demo/.env`
7+
- Add the variable `VUE_APP_SUPABSE_URL` and set its value
8+
- Add the variable `VUE_APP_SUPABASE_KEY` and set its value
9+
- Run `yarn serve`
10+
11+
## How `yarn serve` works
12+
13+
The scripts starts by looking for and removing any tarballs on the root directory of this project. The next step, the root project _vue-supabase_ is packed into a tarball, the version is then removed from the name. The script then uses that tarball to install _vue-supabase_ as a dependency.

examples/vue2-demo/babel.config.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
module.exports = {
2+
presets: [
3+
'@vue/cli-plugin-babel/preset'
4+
]
5+
}

examples/vue2-demo/package.json

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
"name": "vue2-demo",
3+
"version": "0.1.0",
4+
"private": true,
5+
"scripts": {
6+
"clean": "rimraf ./*.tgz",
7+
"pack-parent": "cd ../.. && npm pack --pack-destination=examples/vue2-demo",
8+
"rename-tarball": "rename *.tgz vue-supabase",
9+
"install-tarball": "yarn add ./vue-supabase.tgz",
10+
"serve": "yarn clean && yarn pack-parent && yarn rename-tarball && yarn install-tarball && vue-cli-service serve"
11+
},
12+
"dependencies": {
13+
"@vue/composition-api": "^1.2.4",
14+
"core-js": "^3.6.5",
15+
"vue": "^2.6.11",
16+
"vue-class-component": "^7.2.3",
17+
"vue-property-decorator": "^9.1.2",
18+
"vue-supabase": "./vue-supabase.tgz"
19+
},
20+
"devDependencies": {
21+
"@vue/cli-plugin-babel": "~4.5.0",
22+
"@vue/cli-plugin-typescript": "~4.5.0",
23+
"@vue/cli-service": "~4.5.0",
24+
"rename-cli": "^6.2.1",
25+
"rimraf": "^3.0.2",
26+
"typescript": "~4.1.5",
27+
"vue-template-compiler": "^2.6.11"
28+
}
29+
}
4.19 KB
Binary file not shown.

0 commit comments

Comments
 (0)