Commit 8c70cd69 authored by peterh's avatar peterh

Get the distmaker working with npm and bower.

We're going to start distributing the node_modules and bower_modules
using npm and bower now instead of having them in packages because we
feel that those are a better way to manage backages than the packages
repository. So the distmaker needs to copy those directories to the
distribution after running 'npm install' to get the packages downloaded.

Also I needed to put a resolution for the angular version in the
bower.json file because some of the angular plugins were resolving to
angular 1.2.x and we want 1.3.x. I also changed the version numbers to
start at 1.3.8, but allow minor version updates because that's what
we're using.
parent 09a09949
......@@ -5,13 +5,16 @@
"license": "AGPL-3.0",
"private": true,
"dependencies": {
"angular": "1.3.x",
"angular": "~1.3.8",
"angular-file-upload": "~1.1.5",
"angular-jquery-dialog-service": "totten/angular-jquery-dialog-service#jquery-closure",
"angular-mocks": "1.3.x",
"angular-route": "1.3.x",
"angular-mocks": "~1.3.8",
"angular-route": "~1.3.8",
"angular-ui-sortable": "0.12.x",
"angular-ui-utils": "0.1.x",
"angular-unsavedChanges": "~0.1.1"
},
"resolutions": {
"angular": "~1.3.8"
}
}
......@@ -4,6 +4,7 @@ DM_GENFILESDIR= <Set this to directory where generated files should reside>
DM_TMPDIR= <Set this to temporary directory>
DM_TARGETDIR= <Set this to directory where tarballs should land>
DM_NPM= <Set this to your npm binary>
DM_PHP= <Set this to your php binary>
DM_RSYNC= <set this to your rsync binary>
DM_ZIP= <set this to your zip binary>
......
......@@ -156,6 +156,9 @@ case $1 in
esac
## Install npm packages
dm_npm_install "$DM_SOURCEDIR"
## Make sure we have the right branch or tag
dm_git_checkout "$DM_SOURCEDIR" "$DM_REF_CORE"
dm_git_checkout "$DM_SOURCEDIR/packages" "$DM_REF_PACKAGES"
......
......@@ -51,7 +51,7 @@ function dm_install_core() {
local repo="$1"
local to="$2"
for dir in css i js PEAR templates bin CRM api extern Reports install settings Civi partials ; do
for dir in css i js PEAR templates bin CRM api extern Reports install settings Civi partials node_modules bower_components ; do
[ -d "$repo/$dir" ] && dm_install_dir "$repo/$dir" "$to/$dir"
done
......@@ -177,3 +177,11 @@ function dm_git_checkout() {
git checkout "$2"
popd
}
## Install npm packages
## usage: dm_npm_install <path>
function dm_npm_install() {
pushd "$1"
$DM_NPM install
popd
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment