-
Notifications
You must be signed in to change notification settings - Fork 11
/
bower_install.js
35 lines (31 loc) · 1.01 KB
/
bower_install.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
var bower = require('bower'),
path = require('path');
// Error
process.on('uncaughtException', function(err) {
console.log("Exception", err.stack);
});
console.log('Starting directory: ' + process.cwd());
// Install for site
// ./views/layout.jade
bower.commands
.install([path.resolve(".")+"/bower.json"])
.on('end', function (installed) {
console.log(installed);
console.log("Finish Installing Site Components")
try {
process.chdir(path.resolve(".")+"/public/scripts/admin/");
console.log('New directory: ' + process.cwd());
}
catch (err) {
console.log('chdir: ' + err);
}
// Install for admin pandel deps
// ./views/layout-admin.jade
bower.commands
.install([path.resolve(".")+"/bower.json"])
//.install([path.resolve(".")+"/public/scripts/admin/bower.json"], { cwd: path.resolve(".")+"/public/scripts/admin/" })
.on('end', function (installed) {
console.log("Installing admin panel dependencies")
console.log(installed);
});
});