Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

add JSX templates

  • Loading branch information...
commit 691023fdd02f6ff2e822ffaabad9f9e57f822d59 1 parent baffdea
@gfx gfx authored
View
2  plugin/jsx.vim
@@ -5,3 +5,5 @@
autocmd! BufRead,BufNewFile *.jsx setlocal filetype=jsx
+autocmd! BufNewFile *.jsx 0r <sfile>:h/../template/jsx-app.jsx
+autocmd! BufNewFile t/*.jsx 0r <sfile>:h/../template/jsx-test.jsx
View
11 template/jsx-app.jsx
@@ -0,0 +1,11 @@
+/***
+ * A JSX application.
+ */
+
+class _Main {
+ static function main(args : string[]) : void {
+ log "Hello, world!";
+ }
+}
+
+// vim: set tabstop=2 shiftwidth=2 expandtab:
View
25 template/jsx-module.jsx
@@ -0,0 +1,25 @@
+/***
+ * A JSX module.
+ */
+
+/**
+ * The class of this module.
+ */
+class Foo {
+
+ /**
+ * The constructor.
+ */
+ function constructor() {
+ }
+
+ /**
+ * Do nothing.
+ */
+ function method() : void {
+
+ }
+}
+
+// vim: set tabstop=2 shiftwidth=2 expandtab:
+
View
11 template/jsx-test.jsx
@@ -0,0 +1,11 @@
+import "test-case.jsx";
+
+class _Test extends TestCase {
+ function testHello() : void {
+ var got = "foo bar";
+ this.expect(got).toBe("Hello, world!");
+ }
+}
+
+// vim: set tabstop=2 shiftwidth=2 expandtab:
+
Please sign in to comment.
Something went wrong with that request. Please try again.