Created
February 27, 2016 21:04
-
-
Save surma/1722ed144410be0bd48c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/gulpfile.js b/gulpfile.js | |
index e027df5..8b8bd35 100644 | |
--- a/gulpfile.js | |
+++ b/gulpfile.js | |
@@ -112,7 +112,10 @@ function build() { | |
entries: ENTRY_FILE, | |
debug: true | |
}) | |
- .transform(babelify.configure({presets: ["stage-0","es2015"]})) | |
+ .transform(babelify.configure({ | |
+ presets: ["stage-0","es2015"], | |
+ plugins: ["babel-plugin-transform-decorators-legacy"] | |
+ })) | |
.bundle().on('error', function(error){ | |
gutil.log(gutil.colors.red('[Build Error]', error.message)); | |
this.emit('end'); | |
diff --git a/package.json b/package.json | |
index 00a67e4..98fa4d2 100644 | |
--- a/package.json | |
+++ b/package.json | |
@@ -33,6 +33,7 @@ | |
"yargs": "^3.16.1" | |
}, | |
"dependencies": { | |
+ "babel-plugin-transform-decorators-legacy": "^1.3.4", | |
"babel-preset-stage-0": "^6.5.0", | |
"needlepoint": "^1.0.5", | |
"phaser": "^2.4.1" | |
diff --git a/src/Test2.js b/src/Test2.js | |
index f8dc7f4..d407a55 100644 | |
--- a/src/Test2.js | |
+++ b/src/Test2.js | |
@@ -1,4 +1,4 @@ | |
-import {Test1} from 'Test1.js' | |
+import Test1 from 'Test1.js' | |
import {dependencies} from 'needlepoint'; | |
@dependencies(Test1) | |
diff --git a/src/index.js b/src/index.js | |
index f610cd8..08000d4 100644 | |
--- a/src/index.js | |
+++ b/src/index.js | |
@@ -1,8 +1,13 @@ | |
//import Game from 'Game.js'; | |
//import SystemLoader from 'SystemLoader.js' | |
import {container} from 'needlepoint'; | |
-import {Test2} from 'Test2'; | |
+import Test1 from 'Test1'; | |
+import Test2 from 'Test2'; | |
+var test1 = container.resolve(Test1); | |
+console.log('!!', test1); | |
var test2 = container.resolve(Test2); | |
+console.log('!!', test2); | |
+ | |
//var systemLoader = container.resolve(SystemLoader); | |
//systemLoader.startGame(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment