Improved Bower support
improved bower support using nodejs native module instead of custom logic used on former approachs. Change-Id: Icf1cea6b78d385cf085432937b5373c6958f6fd0
This commit is contained in:
parent
aecd18597d
commit
79746e577e
|
@ -70,7 +70,7 @@ function site_init {
|
|||
php artisan db:seed --env=$LARAVEL_ENV
|
||||
# run bower
|
||||
if [ -f "bower.json' ]; then
|
||||
bower install --config.interactive=false
|
||||
bower install --allow-root --config.interactive=false
|
||||
fi
|
||||
# activate site
|
||||
rm -rf $SITE_ROOT/w
|
||||
|
@ -180,7 +180,7 @@ function site_update {
|
|||
php artisan migrate --env=$LARAVEL_ENV
|
||||
# run bower
|
||||
if [ -f "bower.json' ]; then
|
||||
bower install --config.interactive=false
|
||||
bower install --allow-root --config.interactive=false
|
||||
fi
|
||||
# activate site
|
||||
rm -rf $SITE_ROOT/w
|
||||
|
|
|
@ -74,41 +74,7 @@ class openstackid (
|
|||
ensure => present,
|
||||
}
|
||||
|
||||
# add node js and npm for bower installation
|
||||
package { 'nodejs':
|
||||
ensure => present,
|
||||
}
|
||||
|
||||
package { 'npm':
|
||||
ensure => present,
|
||||
require => Package['nodejs','curl'],
|
||||
}
|
||||
|
||||
# update node repo
|
||||
exec { 'update-node-repo':
|
||||
cwd => '/',
|
||||
path => '/usr/bin:/bin:/usr/local/bin:/usr/lib/node_modules/npm/bin',
|
||||
logoutput => on_failure,
|
||||
command => 'npm config set registry http://registry.npmjs.org/',
|
||||
require => Package['npm'],
|
||||
}
|
||||
|
||||
# install node version manager (https://www.npmjs.com/package/n)
|
||||
exec { 'install-node-version-manager':
|
||||
cwd => '/',
|
||||
path => '/usr/bin:/bin:/usr/local/bin:/usr/lib/node_modules/npm/bin',
|
||||
logoutput => on_failure,
|
||||
command => 'npm install -g n',
|
||||
require => Exec['update-node-repo'],
|
||||
}
|
||||
|
||||
# install latest node js version
|
||||
exec { 'install-latest-nodejs':
|
||||
cwd => '/',
|
||||
path => '/usr/bin:/bin:/usr/local/bin:/usr/lib/node_modules/npm/bin',
|
||||
logoutput => on_failure,
|
||||
command => 'n stable',
|
||||
require => Exec['install-node-version-manager'],
|
||||
class { '::nodejs':
|
||||
}
|
||||
|
||||
# install bower
|
||||
|
@ -117,7 +83,7 @@ class openstackid (
|
|||
path => '/usr/bin:/bin:/usr/local/bin:/usr/lib/node_modules/npm/bin',
|
||||
logoutput => on_failure,
|
||||
command => 'npm install -g bower',
|
||||
require => Exec['install-latest-nodejs'],
|
||||
require => Class['::nodejs'],
|
||||
}
|
||||
|
||||
group { 'openstackid':
|
||||
|
|
Loading…
Reference in New Issue