Config files for builder of FreeIPA UI layer

* Added package configuration and build profile of FreeIPA UI layer for
  Dojo Builder.
* Added script (util/make-ui.sh) which builds the layer

https://fedorahosted.org/freeipa/ticket/112
This commit is contained in:
Petr Vobornik 2012-11-26 13:14:58 +01:00
parent 9d3364719d
commit 339790ec8e
4 changed files with 164 additions and 0 deletions

View File

@ -0,0 +1,16 @@
//
// Dojo builder profile file
//
var profile = (function(){
return {
resourceTags: {
// all JavaScript files are AMD modules
amd: function(filename, mid) {
return /\.js$/.test(filename);
}
}
};
})();

View File

@ -0,0 +1,39 @@
{
"name": "freeipa",
"description": "Web UI for FreeIPA, an integrated security information management solution.",
"version": "1.0",
"keywords": ["FreeIPA","Identity management", "Red Hat", "Web UI"],
"maintainers": [{
"name": "Petr Vobornik"
},{
"name": "Endi Sukma Dewata"
}],
"contributors": [{
"name": "Petr Vobornik"
},{
"name": "Endi Sukma Dewata"
},{
"name": "Adam Young"
},{
"name": "Pavel Zuna"
}],
"licenses": [{
"type": "GPLv3",
"url": "http://www.gnu.org/licenses/gpl-3.0.html"
},{
"type": "GPLv2",
"url": "http://www.gnu.org/licenses/gpl-2.0.html"
}],
"bugs": "https://fedorahosted.org/freeipa/",
"repositories": [{
"type": "git",
"url": "git://git.fedorahosted.org/git/freeipa.git ",
"path": "install/ui/js/freeipa"
}],
"dependencies": {
"dojo": "~1.8.1"
},
"main": "src",
"homepage": "http://freeipa.org/",
"dojoBuild": "freeipa.profile.js"
}

View File

@ -0,0 +1,74 @@
//
// Web UI application profile
//
var profile = (function(){
return {
basePath: ".",
releaseDir: "../release",
releaseName: "lib",
action: "release",
// Remove just comments. Don't use Shrinksave or Clusure, we don't
// pack it, it would raise error.
// Additional optimization can be done by uglify.js.
layerOptimize: "comments",
optimize: "comments",
cssOptimize: "comments",
mini: true,
stripConsole: "warn",
selectorEngine: "lite",
defaultConfig: {
hasCache:{
"config-deferredInstrumentation": 0,
"config-dojo-loader-catches": 0,
"config-tlmSiblingOfDojo": 0,
"dojo-amd-factory-scan": 0,
"dojo-combo-api": 0,
"dojo-config-api": 1,
"dojo-config-require": 0,
"dojo-debug-messages": 0,
"dojo-dom-ready-api": 1,
"dojo-firebug": 0,
"dojo-guarantee-console": 1,
"dojo-has-api": 1,
"dojo-inject-api": 1,
"dojo-loader": 1,
"dojo-log-api": 0,
"dojo-modulePaths": 0,
"dojo-moduleUrl": 0,
"dojo-publish-privates": 0,
"dojo-requirejs-api": 0,
"dojo-sniff": 0,
"dojo-sync-loader": 0, //all modules should be AMD
"dojo-test-sniff": 0,
"dojo-timeout-api": 0,
"dojo-trace-api": 0,
"dojo-undef-api": 0,
"dojo-v1x-i18n-Api": 1,
"dom": 1,
"host-browser": 1,
"extend-dojo": 1
},
async: 1
},
// Dojo package and layer is not included to not pollute release dir.
// It will raise some dependency errors. #TODO:update builder to be
// able to specify dependencies to ignore
packages:[
{
name: "freeipa",
location: "freeipa"
}
],
layers: {
"freeipa/app": {
include: ["freeipa/app"]
}
}
};
})();

35
install/ui/util/make-ui.sh Executable file
View File

@ -0,0 +1,35 @@
#!/bin/bash
# Authors:
# Petr Vobornik <pvoborni@redhat.com>
#
# Copyright (C) 2012 Red Hat
# see file 'COPYING' for use and warranty information
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# Build script for FreeIPA Web UI
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
IPA_DIR=$DIR/../build/freeipa
if [ ! -d $IPA_DIR ] ; then
mkdir $IPA_DIR
fi
$DIR/clean.sh
$DIR/build.sh webui
# don't stop at error. Some dependency errors are expected.
$DIR/compile.sh --release lib --layer freeipa/app --output $IPA_DIR/app.js
$DIR/clean.sh