Skip to content

Commit 1b37f07

Browse files
author
PeterHdd
committed
Initial Commit
0 parents  commit 1b37f07

14 files changed

+3709
-0
lines changed

.eslintrc.json

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"env": {
3+
"browser": false,
4+
"commonjs": true,
5+
"es6": true,
6+
"node": true
7+
},
8+
"parserOptions": {
9+
"ecmaFeatures": {
10+
"jsx": true
11+
},
12+
"sourceType": "module"
13+
},
14+
"rules": {
15+
"no-const-assign": "warn",
16+
"no-this-before-super": "warn",
17+
"no-undef": "warn",
18+
"no-unreachable": "warn",
19+
"no-unused-vars": "warn",
20+
"constructor-super": "warn",
21+
"valid-typeof": "warn"
22+
}
23+
}

.gitignore

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
node_modules
2+
.vscode-test/
3+
*.vsix
4+
test

.vscode/extensions.json

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
// See http://go.microsoft.com/fwlink/?LinkId=827846
3+
// for the documentation about the extensions.json format
4+
"recommendations": [
5+
"dbaeumer.vscode-eslint"
6+
]
7+
}

.vscode/launch.json

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
// A launch configuration that launches the extension inside a new window
2+
// Use IntelliSense to learn about possible attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
{
6+
"version": "0.2.0",
7+
"configurations": [
8+
{
9+
"name": "Extension",
10+
"type": "extensionHost",
11+
"request": "launch",
12+
"runtimeExecutable": "${execPath}",
13+
"args": [
14+
"--extensionDevelopmentPath=${workspaceFolder}"
15+
]
16+
},
17+
{
18+
"name": "Extension Tests",
19+
"type": "extensionHost",
20+
"request": "launch",
21+
"runtimeExecutable": "${execPath}",
22+
"args": [
23+
"--extensionDevelopmentPath=${workspaceFolder}",
24+
"--extensionTestsPath=${workspaceFolder}/test"
25+
]
26+
}
27+
]
28+
}

.vscode/settings.json

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// Place your settings in this file to overwrite default and user settings.
2+
{
3+
}

.vscodeignore

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
.vscode/**
2+
.vscode-test/**
3+
test/**
4+
.gitignore
5+
jsconfig.json
6+
vsc-extension-quickstart.md
7+
.eslintrc.json

CHANGELOG.md

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Change Log
2+
All notable changes to the "firebase-firestore-snippets" extension will be documented in this file.
3+
4+
Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how to structure this file.
5+
6+
## [Unreleased]
7+
- Initial release

LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2015 Charalampos Karypidis
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

+81
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
# Firebase
2+
## VS Code Firebase and Firestore snippets
3+
-------------------
4+
[![Version](https://vsmarketplacebadge.apphb.com/version/peterhdd.firebase-firestore-snippets.svg)](https://marketplace.visualstudio.com/items?itemName=peterhdd.firebase-firestore-snippets)
5+
6+
## Supported Languages
7+
* JavaScript (.js)
8+
* TypeScript (.ts)
9+
* JavaScript React (.jsx)
10+
* TypeScript React (.tsx)
11+
* Html (.html)
12+
* Vue (.vue)
13+
14+
## Snippets
15+
16+
### Firebase
17+
| Trigger | Description |
18+
| -------: | ------- |
19+
| `fireconfig` | Configure Firebase |
20+
| `firereference` | Get a reference to the firebase service |
21+
| `fireset` | Set data to the firebase database |
22+
| `fireretrieve` | Retrieve data from firebase |
23+
| `fireretrieveloop` | Retrieve data and loop inside the direct children |
24+
| `firebaseval` | Using `val()` method to retrieve the data inside a listener |
25+
| `fireretrieveonce` | Retrieve data once |
26+
| `firekey` | Create a key and simultaneously retrieve the key |
27+
| `fireupdate` | Updating specific fields |
28+
| `fireremove` | Remove data at a certain location |
29+
| `firetransaction` | firebase transactions |
30+
| `fireorderBychild` | Order results by the value of a specified child key or nested child path |
31+
| `fireorderByvalue` | Order results by child values |
32+
| `fireorderBykey` | Order results by child keys |
33+
| `firelimittofirst` | Sets the maximum number of items to return from the end of the ordered list of results |
34+
| `firelimittolast` | Sets the maximum number of items to return from the beginning of the ordered list of results |
35+
| `firestartAt"` | Return items greater than or equal to the specified key or value, depending on the order-by method chosen |
36+
| `fireendat` | Return items less than or equal to the specified key or value, depending on the order-by method chosen |
37+
| `fireequalto` | Return items equal to the specified key or value, depending on the order-by method chosen |
38+
| `fireexists` | Returns true if this dataSnapshot contains any data |
39+
| `firehaschild` | Returns true if this datasnapshot contains the specified child |
40+
| `firehaschildren` | Returns true is this datasnapshot contains any children |
41+
| `firenumchildren` | Returns the number of child properties of this datasnapshot |
42+
| `firedetach` | Removing a listener |
43+
| `firestorageref` |Get a reference to the storage service, which is used to create references in your storage bucket |
44+
| `firestoragechildref` | Create a reference to a location lower in the tree, say `images.jpg` |
45+
| `firestorageurlref` | Create a reference from a Google Cloud Storage URI or https url |
46+
| `firestoragedownloadfile` | Getting the download file from firebase storage |
47+
| `firestoragedeletefile` | Delete a file |
48+
| `firesignupemail` | Authenticate a new user using email and password |
49+
| `firesigninemail` | Sign in an existing user |
50+
| `fireauthstate` | Attach an observer using onAuthStateChanged to retrieve user infomration |
51+
| `firecurrentuser` | Retrieves the currently logged in user |
52+
| `fireuserprofile` | Retrieves the user information |
53+
| `fireupdateprofile` | Updates the user profile |
54+
| `fireproviderinfo` | Retrieves information from sign in provider |
55+
| `fireupdateemail` | Set a user email address, the user must have signed in recently|
56+
| `fireemailverify` | Send an email verification to the user |
57+
| `firesetpass` | Set a user password, the user must have signed in recently |
58+
| `firepassreset` | Send a password reset email to a user |
59+
| `firedeleteuser` | Delete a user account with the delete method |
60+
| `firesignout` | Sign out the user |
61+
| `firegoogleinstance` | Get instance of the google provider |
62+
| `fireprovidersignin` | eSign in with google |
63+
| `firefacebookinstance` | Get instance of facebook provider |
64+
| `firetwitterinstance` | Get instance of twitter provider |
65+
| `firegithubinstance` | Get instance of github provider |
66+
| `firecustomauth` | Sign in the user using custom authentication |
67+
68+
### Firestore
69+
| Trigger | Description |
70+
| -------: | ------- |
71+
| `initializefirestore` | Initialize Cloud Firestore through Firebase |
72+
| `adddatafirestore` | Creating a new collection and document in firestore |
73+
| `readdatafirestore` | Read data from a collection in firestore |
74+
| `referencefirestore` | Add firestore reference |
75+
| `updatefirestore` | Update the document in firestore |
76+
| `deletedocfirestore` | Delete a document in firestore |
77+
| `deletefieldfirestore` | Delete a field in firestore document |
78+
| `wherefirestore` | where query in firestore |
79+
| `limitfirestore` | Retrieves the first three value of the field |
80+
| `ordermultifirestore` | Order by multiple fields in firestore |
81+

images/firebase.png

2.59 KB
Loading

jsconfig.json

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"compilerOptions": {
3+
"module": "commonjs",
4+
"target": "es6",
5+
"checkJs": true, /* Typecheck .js files. */
6+
"lib": [
7+
"es6"
8+
]
9+
},
10+
"exclude": [
11+
"node_modules"
12+
]
13+
}

0 commit comments

Comments
 (0)