Skip to content

Commit

Permalink
chore(deps): remove hack for route-recognizer import
Browse files Browse the repository at this point in the history
Closes angular#1
  • Loading branch information
btford committed Dec 17, 2014
1 parent c58ce6f commit a1669ad
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 13 deletions.
5 changes: 3 additions & 2 deletions karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,16 @@ module.exports = function(config) {

// All the specs and sources are included dynamically from `test/main.js`.
{pattern: 'src/**/*.ats', included: false},
{pattern: 'node_modules/route-recognizer/dist/route-recognizer.amd.js', included: false},
{pattern: 'node_modules/route-recognizer/lib/**/*.js', included: false},
{pattern: 'test/**/*.ats', included: false},

// The runtime assertion library.
{pattern: 'node_modules/rtts-assert/dist/amd/assert.js', included: false}
],

preprocessors: {
'**/*.ats': ['traceur']
'**/*.ats': ['traceur'],
'node_modules/route-recognizer/lib/**/*.js': ['traceur']
},

browsers: ['Chrome'],
Expand Down
8 changes: 2 additions & 6 deletions src/router.ats
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,8 @@ export class Router {
this.ports = {};
this.children = [];
this.context = null;

// this is a hack
var RouteRecognizerConstructor = (RouteRecognizer.default || RouteRecognizer);

this.recognizer = new RouteRecognizerConstructor();
this.childRecognizer = new RouteRecognizerConstructor();
this.recognizer = new RouteRecognizer();
this.childRecognizer = new RouteRecognizer();
}


Expand Down
6 changes: 1 addition & 5 deletions test/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,7 @@ require.config({

paths: {
assert: './node_modules/rtts-assert/dist/amd/assert',
'route-recognizer': './node_modules/route-recognizer/dist/route-recognizer.amd'
},

bundles: {
'route-recognizer': [ 'route-recognizer/dsl' ]
'route-recognizer': './node_modules/route-recognizer/lib/route-recognizer'
},

// Dynamically load all test files.
Expand Down

0 comments on commit a1669ad

Please sign in to comment.