@@ -986,84 +986,6 @@ Blueprint.prototype.removePackagesFromProject = function(packages) {
986
986
} ) ;
987
987
} ;
988
988
989
- /**
990
- Used to add a package to the projects `bower.json`.
991
-
992
- Generally, this would be done from the `afterInstall` hook, to
993
- ensure that a package that is required by a given blueprint is
994
- available.
995
-
996
- `localPackageName` and `target` may be thought of as equivalent
997
- to the key-value pairs in the `dependency` or `devDepencency`
998
- objects contained within a bower.json file.
999
-
1000
- Examples:
1001
-
1002
- addBowerPackageToProject('jquery', '~1.11.1');
1003
- addBowerPackageToProject('old_jquery', 'jquery#~1.9.1');
1004
- addBowerPackageToProject('bootstrap-3', 'http://twitter.github.io/bootstrap/assets/bootstrap');
1005
-
1006
- @method addBowerPackageToProject
1007
- @param {String } localPackageName
1008
- @param {String } target
1009
- @param {Object } installOptions
1010
- @return {Promise }
1011
- */
1012
- Blueprint . prototype . addBowerPackageToProject = function ( localPackageName , target , installOptions ) {
1013
- // var lpn = localPackageName;
1014
- // var tar = target;
1015
- // if (localPackageName.indexOf('#') >= 0) {
1016
- // if (arguments.length === 1) {
1017
- // var parts = localPackageName.split('#');
1018
- // lpn = parts[0];
1019
- // tar = parts[1];
1020
- // this.ui.writeDeprecateLine('passing ' + localPackageName +
1021
- // ' directly to `addBowerPackageToProject` will soon be unsupported. \n' +
1022
- // 'You may want to replace this with ' +
1023
- // '`addBowerPackageToProject(\'' + lpn + '\', \'' + tar + '\')`');
1024
- // } else {
1025
- // this.ui.writeDeprecateLine('passing ' + localPackageName +
1026
- // ' directly to `addBowerPackageToProject` will soon be unsupported');
1027
- // }
1028
- // }
1029
- // var packageObject = bowEpParser.json2decomposed(lpn, tar);
1030
- // return this.addBowerPackagesToProject([packageObject], installOptions);
1031
- return Promise . resolve ( ) ;
1032
- } ;
1033
-
1034
- /**
1035
- Used to add an array of packages to the projects `bower.json`.
1036
-
1037
- Generally, this would be done from the `afterInstall` hook, to
1038
- ensure that a package that is required by a given blueprint is
1039
- available.
1040
-
1041
- Expects each array item to be an object with a `name`. Each object
1042
- may optionally have a `target` to specify a specific version.
1043
-
1044
- @method addBowerPackagesToProject
1045
- @param {Array } packages
1046
- @param {Object } installOptions
1047
- @return {Promise }
1048
- */
1049
- Blueprint . prototype . addBowerPackagesToProject = function ( packages , installOptions ) {
1050
- var task = this . taskFor ( 'bower-install' ) ;
1051
- var installText = ( packages . length > 1 ) ? 'install bower packages' : 'install bower package' ;
1052
- var packageNames = [ ] ;
1053
- var packageNamesAndVersions = packages . map ( function ( pkg ) {
1054
- pkg . source = pkg . source || pkg . name ;
1055
- packageNames . push ( pkg . name ) ;
1056
- return pkg ;
1057
- } ) . map ( bowEpParser . compose ) ;
1058
-
1059
- this . _writeStatusToUI ( chalk . green , installText , packageNames . join ( ', ' ) ) ;
1060
-
1061
- return task . run ( {
1062
- verbose : true ,
1063
- packages : packageNamesAndVersions ,
1064
- installOptions : installOptions
1065
- } ) ;
1066
- } ;
1067
989
1068
990
/**
1069
991
Used to retrieve a task with the given name. Passes the new task
0 commit comments