Skip to content

Commit b3608f3

Browse files
committed
chore(): add deprecation messages to all bower commands.
1 parent 2a3269b commit b3608f3

File tree

5 files changed

+32
-2
lines changed

5 files changed

+32
-2
lines changed

lib/ionic/add.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,12 @@ function installBowerComponent(componentName) {
4545
*/
4646
function run(ionic, argv) {
4747

48+
// This command will be deprecated in the future.
49+
var deprecationMsg = 'This command has been ' + 'deprecate'.red + '. All ' +
50+
'resources are currently available in NPM and we recommend that you use NPM to manage these.\n' +
51+
'More information is available here: https://github.com/driftyco/ionic-cli/wiki/Migrating-to-NPM-from-bower\n';
52+
log.info(deprecationMsg.bold);
53+
4854
if (!bower.checkForBower()) {
4955
appLibUtils.fail(bower.installMessage, 'add');
5056
return;

lib/ionic/lib.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,12 @@ var settings = {
3232

3333
function run(ionic, argv) {
3434

35+
// This command will be deprecated in the future.
36+
var deprecationMsg = 'This command has been ' + 'deprecate'.red + '. All ' +
37+
'resources are currently available in NPM and we recommend that you use NPM to manage these.\n' +
38+
'More information is available here: https://github.com/driftyco/ionic-cli/wiki/Migrating-to-NPM-from-bower\n';
39+
log.info(deprecationMsg.bold);
40+
3541
if (!fs.existsSync(path.resolve('www'))) {
3642
return appLibUtils.fail('"www" directory cannot be found. Make sure the working directory ' +
3743
'is at the top level of an Ionic project.', 'lib');

lib/ionic/list.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,12 @@ function listComponents() {
3737
*/
3838
function run() {
3939

40+
// This command will be deprecated in the future.
41+
var deprecationMsg = 'This command has been ' + 'deprecate'.red + '. All ' +
42+
'resources are currently available in NPM and we recommend that you use NPM to manage these.\n' +
43+
'More information is available here: https://github.com/driftyco/ionic-cli/wiki/Migrating-to-NPM-from-bower\n';
44+
log.info(deprecationMsg.bold);
45+
4046
try {
4147
listComponents();
4248
} catch (error) {

lib/ionic/remove.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,12 @@ function uninstallBowerComponent(componentName) {
4242
*/
4343
function run(ionic, argv) {
4444

45+
// This command will be deprecated in the future.
46+
var deprecationMsg = 'This command has been ' + 'deprecate'.red + '. All ' +
47+
'resources are currently available in NPM and we recommend that you use NPM to manage these.\n' +
48+
'More information is available here: https://github.com/driftyco/ionic-cli/wiki/Migrating-to-NPM-from-bower\n';
49+
log.info(deprecationMsg.bold);
50+
4551
if (!bower.checkForBower()) {
4652
appLibUtils.fail(bower.installMessage, 'remove');
4753
return;

lib/ionic/service.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,8 +166,14 @@ function removeService(serviceName) {
166166
// For each plugins - call 'ionic add plugin <current-required-plugin>'
167167
function run(ionic, argv) {
168168

169-
if (!bower.IonicBower.checkForBower()) {
170-
fail(bower.IonicBower.installMessage, 'service');
169+
// This command will be deprecated in the future.
170+
var deprecationMsg = 'This command has been ' + 'deprecate'.red + '. All ' +
171+
'resources are currently available in NPM and we recommend that you use NPM to manage these.\n' +
172+
'More information is available here: https://github.com/driftyco/ionic-cli/wiki/Migrating-to-NPM-from-bower\n';
173+
log.info(deprecationMsg.bold);
174+
175+
if (!bower.checkForBower()) {
176+
fail(bower.installMessage, 'service');
171177
return;
172178
}
173179

0 commit comments

Comments
 (0)