Skip to content

Commit

Permalink
fix(importer): support scoped packages
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander-Taran committed Feb 18, 2018
1 parent ceb7860 commit 859df5b
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions lib/commands/install/package-argument-parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,16 +42,17 @@ class PackageArgumentParser {
}

parseVersioned(argument) {
let split = argument.split('@');
let versionIndex = argument.lastIndexOf('@')

return {
argument: argument,
name: split[0],
version: split[1]
name: argument.substr(0,versionIndex),
version: argument.substr(versionIndex+1)
};
}

hasVersion(argument) {
return argument.indexOf('@') > -1;
return argument.indexOf('@') > 0;
}

isGitUrl(argument) {
Expand Down

0 comments on commit 859df5b

Please sign in to comment.