Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Created the resource-router-mapping transform #53

Merged
merged 1 commit into from
Jun 30, 2015

Conversation

marcioj
Copy link
Collaborator

@marcioj marcioj commented Jun 28, 2015

Fixes #50

@marcioj marcioj changed the title Created the resource-router-mapping tranform Created the resource-router-mapping transform Jun 28, 2015
@knownasilya
Copy link
Collaborator

Nice!

@abuiles
Copy link
Owner

abuiles commented Jun 29, 2015

@marcioj Thanks! I'll give it a whole review tomorrow morning and release :)

}

function isRoute(route) {
return route.type === 'ExpressionStatement' &&
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@marcioj can you use recast's API to check the type ?

You can do something like

var types            = recast.types.namedTypes;

type. ExpressionStatement.check(route)
type.CallExpression.check(route.expression.callee)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, I was mixing the two forms. I updated to use the recast namedTypes though

@abuiles
Copy link
Owner

abuiles commented Jun 30, 2015

@marcioj thanks!

abuiles added a commit that referenced this pull request Jun 30, 2015
Created the resource-router-mapping transform
@abuiles abuiles merged commit 0fcf5d7 into abuiles:master Jun 30, 2015
@marcioj marcioj deleted the convert-resource branch July 1, 2015 01:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants