Skip to content

Commit e27a3e6

Browse files
committed
update
1 parent b953bd1 commit e27a3e6

File tree

2 files changed

+166
-65
lines changed

2 files changed

+166
-65
lines changed

snippets/script copy.json

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
{
2+
"{NSVue} app import": {
3+
"prefix": "nsapp",
4+
"body": [
5+
"import * as app from 'tns-core-modules/application';",
6+
"$0"
7+
],
8+
"description": "isIOS import sentence"
9+
},
10+
"{NSVue} Vue instance": {
11+
"prefix": "nsvue",
12+
"body": [
13+
"export default {",
14+
" data () {",
15+
" return {};",
16+
" },",
17+
" methods: {",
18+
" }",
19+
"};"
20+
],
21+
"description": "Vue instance object"
22+
},
23+
"{NSVue} HTTP fetch": {
24+
"prefix": "nsfetch",
25+
"body": [
26+
"import { fetch } from 'tns-core-modules/fetch';",
27+
"fetch('$1')",
28+
" .then((response) => {",
29+
" })",
30+
" .catch((error) => {",
31+
" console.error(error);",
32+
" });"
33+
],
34+
"description": "Fetch sentence for getting results"
35+
},
36+
"{NSVue} isAndroid import": {
37+
"prefix": "nsisandroid",
38+
"body": [
39+
"import { isAndroid } from 'tns-core-modules/platform';",
40+
"$0"
41+
],
42+
"description": "isAndroid import sentence"
43+
},
44+
"{NSVue} isIOS import": {
45+
"prefix": "nsisios",
46+
"body": [
47+
"import { isIOS } from 'tns-core-modules/platform';",
48+
"$0"
49+
],
50+
"description": "isIOS import sentence"
51+
},
52+
"{NSVue} launchEvent": {
53+
"prefix": "nslaunchevent",
54+
"body": [
55+
"import * as app from 'tns-core-modules/application';",
56+
"",
57+
"app.on(app.launchEvent, ({ android, ios }) => {",
58+
" if (android) {",
59+
" console.log(`Launched Android app with the following intent: ${android}`);",
60+
" } else if (ios !== undefined) {",
61+
" console.log(`Launched iOS application with options: ${ios}`);",
62+
" }",
63+
"});",
64+
"$0"
65+
],
66+
"description": "launchEvent block"
67+
},
68+
"{NSVue}-vue $navigateTo": {
69+
"prefix": "nsnavigate",
70+
"body": [
71+
"this.$$navigateTo($1);",
72+
"$0"
73+
],
74+
"description": "Navigate to another page using {NSVue}-vue"
75+
},
76+
"{NSVue}-vue register component": {
77+
"prefix": "nsvuecomponent",
78+
"body": [
79+
"Vue.component($1, $2)",
80+
"$0"
81+
],
82+
"description": "Register a component in {NSVue}-vue"
83+
},
84+
"{NSVue} http module import": {
85+
"prefix": "nshttp",
86+
"body": [
87+
"import * as http from 'tns-core-modules/http';",
88+
"$0"
89+
],
90+
"description": "Import the {NSVue} http module"
91+
},
92+
"{NSVue} navigate back": {
93+
"prefix": "nsnavigateback",
94+
"body": [
95+
"import * as frameModule from 'tns-core-modules/ui/frame';",
96+
"frameModule.topmost().goBack();",
97+
"$0"
98+
],
99+
"description": "Navigate back to the previous page"
100+
}
101+
}

snippets/script.json

Lines changed: 65 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,58 @@
11
{
2-
"{NSVue} app import": {
3-
"prefix": "nsapp",
4-
"body": [
5-
"import * as app from 'tns-core-modules/application';",
2+
"{NSVue} app import": {
3+
"prefix": "nsapp",
4+
"body": [
5+
"import * as app from 'tns-core-modules/application';",
66
"$0"
7-
],
8-
"description": "isIOS import sentence"
9-
},
7+
],
8+
"description": "🔩 Code Snippets\n\nisIOS import sentence\n\n"
9+
},
1010
"{NSVue} Vue instance": {
11-
"prefix": "nsvue",
12-
"body": [
13-
"export default {",
11+
"prefix": "nsvue",
12+
"body": [
13+
"export default {",
1414
" data () {",
1515
" return {};",
1616
" },",
1717
" methods: {",
1818
" }",
1919
"};"
20-
],
21-
"description": "Vue instance object"
22-
},
23-
"{NSVue} HTTP fetch": {
24-
"prefix": "nsfetch",
25-
"body": [
26-
"import { fetch } from 'tns-core-modules/fetch';",
27-
"fetch('$1')",
20+
],
21+
"description": "🔩 Code Snippets\n\nVue instance object\n\n"
22+
},
23+
"{NSVue} HTTP fetch": {
24+
"prefix": "nsfetch",
25+
"body": [
26+
"import { fetch } from 'tns-core-modules/fetch';",
27+
"fetch('$1')",
2828
" .then((response) => {",
2929
" })",
3030
" .catch((error) => {",
3131
" console.error(error);",
3232
" });"
33-
],
34-
"description": "Fetch sentence for getting results"
35-
},
36-
"{NSVue} isAndroid import": {
37-
"prefix": "nsisandroid",
38-
"body": [
39-
"import { isAndroid } from 'tns-core-modules/platform';",
33+
],
34+
"description": "🔩 Code Snippets\n\nFetch sentence for getting results\n\n"
35+
},
36+
"{NSVue} isAndroid import": {
37+
"prefix": "nsisandroid",
38+
"body": [
39+
"import { isAndroid } from 'tns-core-modules/platform';",
4040
"$0"
41-
],
42-
"description": "isAndroid import sentence"
43-
},
44-
"{NSVue} isIOS import": {
45-
"prefix": "nsisios",
46-
"body": [
47-
"import { isIOS } from 'tns-core-modules/platform';",
41+
],
42+
"description": "🔩 Code Snippets\n\nisAndroid import sentence\n\n"
43+
},
44+
"{NSVue} isIOS import": {
45+
"prefix": "nsisios",
46+
"body": [
47+
"import { isIOS } from 'tns-core-modules/platform';",
4848
"$0"
49-
],
50-
"description": "isIOS import sentence"
51-
},
52-
"{NSVue} launchEvent": {
53-
"prefix": "nslaunchevent",
54-
"body": [
55-
"import * as app from 'tns-core-modules/application';",
49+
],
50+
"description": "🔩 Code Snippets\n\nisIOS import sentence\n\n"
51+
},
52+
"{NSVue} launchEvent": {
53+
"prefix": "nslaunchevent",
54+
"body": [
55+
"import * as app from 'tns-core-modules/application';",
5656
"",
5757
"app.on(app.launchEvent, ({ android, ios }) => {",
5858
" if (android) {",
@@ -62,40 +62,40 @@
6262
" }",
6363
"});",
6464
"$0"
65-
],
66-
"description": "launchEvent block"
67-
},
68-
"{NSVue}-vue $navigateTo": {
69-
"prefix": "nsnavigate",
70-
"body": [
71-
"this.$$navigateTo($1);",
65+
],
66+
"description": "🔩 Code Snippets\n\nlaunchEvent block\n\n"
67+
},
68+
"{NSVue}-vue $navigateTo": {
69+
"prefix": "nsnavigate",
70+
"body": [
71+
"this.$$navigateTo($1);",
7272
"$0"
73-
],
74-
"description": "Navigate to another page using {NSVue}-vue"
75-
},
76-
"{NSVue}-vue register component": {
77-
"prefix": "nsvuecomponent",
78-
"body": [
79-
"Vue.component($1, $2)",
73+
],
74+
"description": "🔩 Code Snippets\n\nNavigate to another page using {NSVue}-vue\n\n"
75+
},
76+
"{NSVue}-vue register component": {
77+
"prefix": "nsvuecomponent",
78+
"body": [
79+
"Vue.component($1, $2)",
8080
"$0"
81-
],
82-
"description": "Register a component in {NSVue}-vue"
81+
],
82+
"description": "🔩 Code Snippets\n\nRegister a component in {NSVue}-vue\n\n"
8383
},
84-
"{NSVue} http module import": {
85-
"prefix": "nshttp",
86-
"body": [
87-
"import * as http from 'tns-core-modules/http';",
84+
"{NSVue} http module import": {
85+
"prefix": "nshttp",
86+
"body": [
87+
"import * as http from 'tns-core-modules/http';",
8888
"$0"
89-
],
90-
"description": "Import the {NSVue} http module"
89+
],
90+
"description": "🔩 Code Snippets\n\nImport the {NSVue} http module\n\n"
9191
},
9292
"{NSVue} navigate back": {
93-
"prefix": "nsnavigateback",
94-
"body": [
93+
"prefix": "nsnavigateback",
94+
"body": [
9595
"import * as frameModule from 'tns-core-modules/ui/frame';",
9696
"frameModule.topmost().goBack();",
9797
"$0"
98-
],
99-
"description": "Navigate back to the previous page"
98+
],
99+
"description": "🔩 Code Snippets\n\nNavigate back to the previous page\n\n"
100100
}
101101
}

0 commit comments

Comments
 (0)