Skip to content

Commit e4c9857

Browse files
authored
hello world extension
1 parent e5e5969 commit e4c9857

File tree

3 files changed

+44
-1
lines changed

3 files changed

+44
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Quick start and create a new extension by using this template. Follow the below 4 steps:
44

5-
Refer this [link](https://github.com/phcode-dev/phoenix/wiki/How-To-Write-Extensions-And-Themes) for detailed extension docs after following the below 3 steps:
5+
Refer this [link](https://github.com/phcode-dev/phoenix/wiki/How-To-Write-Extensions-And-Themes) for detailed extension docs after following the below steps:
66

77
## step 1
88

main.js

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
/*global define, brackets, $ */
2+
3+
// See detailed docs in https://github.com/phcode-dev/phoenix/wiki/How-To-Write-Extensions-And-Themes
4+
5+
define(function (require, exports, module) {
6+
"use strict";
7+
8+
// Brackets modules
9+
var AppInit = brackets.getModule("utils/AppInit"),
10+
DefaultDialogs = brackets.getModule("widgets/DefaultDialogs"),
11+
Dialogs = brackets.getModule("widgets/Dialogs");
12+
13+
// Initialize extension once shell is finished initializing.
14+
AppInit.appReady(function () {
15+
console.log("hello world");
16+
Dialogs.showModalDialog(
17+
DefaultDialogs.DIALOG_ID_INFO,
18+
"hello", "world"
19+
);
20+
});
21+
22+
});
23+

package.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"title": "Name of the extension",
3+
"name": "github-<owner>-<repo>",
4+
"description": "A sample extension.",
5+
"version": "0.0.1",
6+
"license": "MIT",
7+
"author": "your name (https://github.com/<your github id>)",
8+
"homepage": "<project web page url or this github repo url if no website available>",
9+
"engines": {
10+
"brackets": ">=2.0.0"
11+
},
12+
"categories": "demo",
13+
"keywords": [
14+
"phcode", "extension", "demo"
15+
],
16+
"files": [
17+
"main.js"
18+
]
19+
}
20+

0 commit comments

Comments
 (0)