Gruntfile.js revision 70d8a4cd915fa76367aa333a591c15ca34d3e25d
/**
* The contents of this file are subject to the terms of the Common Development and
* Distribution License (the License). You may not use this file except in compliance with the
* License.
*
* You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the
* specific language governing permission and limitations under the License.
*
* When distributing Covered Software, include this CDDL Header Notice in each file and include
* the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL
* Header, with the fields enclosed by brackets [] replaced by your own identifying
* information: "Portions copyright [year] [name of copyright owner]".
*
* Copyright 2015 ForgeRock AS.
*/
});
});
// please update environment variable OPENAM_VERSION after realise, for fix cache issue
// you can use version value from main pom file, ex. 13.0.0-SNAPSHOT
replace: {
ria_html: {
src: ['openam-ui-ria/src/main/resources/index.html'],
dest: '<%= destination %>/XUI/index.html',
replacements: [{
from: '${version}',
to: '<%= buildNumber %>'
}]
},
ria_style: {
src: ['openam-ui-ria/src/main/resources/css/styles.less'],
dest: '<%= destination %>/XUI/css/styles.less',
replacements: [{
from: '${version}',
to: '<%= buildNumber %>'
}]
},
ria_test: {
// temporary fix for test
src: ['openam-ui-ria/src/main/resources/css/styles.less'],
dest: '<%= destination %>/../www/css/styles.less',
replacements: [{
from: '?v=@{openam-version}',
to: ''
}]
},
script_html: {
dest: '<%= destination %>/scripts/index.html',
replacements: [{
from: '${version}',
to: '<%= buildNumber %>'
}]
},
script_style: {
dest: '<%= destination %>/scripts/css/styles.less',
replacements: [{
from: '${version}',
to: '<%= buildNumber %>'
}]
},
script_test: {
// temporary fix for test
dest: '<%= destination %>/../www/css/styles.less',
replacements: [{
from: '?v=@{openam-version}',
to: ''
}]
},
policy_html: {
dest: '<%= destination %>/policyEditor/index.html',
replacements: [{
from: '${version}',
to: '<%= buildNumber %>'
}]
},
policy_style: {
dest: '<%= destination %>/policyEditor/css/styles.less',
replacements: [{
from: '${version}',
to: '<%= buildNumber %>'
}]
},
policy_test: {
// temporary fix for test
dest: '<%= destination %>/../www/css/styles.less',
replacements: [{
from: '?v=@{openam-version}',
to: ''
}]
}
},
sync: {
ria: {
files: [
{
cwd: '<%= forgerockui %>/forgerock-ui-commons/src/main/js',
src: ['**/*'],
dest: '<%= destination %>/XUI'
},
{
cwd: '<%= forgerockui %>/forgerock-ui-commons/src/main/resources',
src: ['**/*'],
dest: '<%= destination %>/XUI'
},
{
cwd: '<%= forgerockui %>/forgerock-ui-user/src/main/js',
src: ['**/*'],
dest: '<%= destination %>/XUI'
},
{
cwd: '<%= forgerockui %>/forgerock-ui-user/src/main/resources',
src: ['**/*'],
dest: '<%= destination %>/XUI'
},
{
src: ['**/*'],
dest: '<%= destination %>/XUI'
},
{
cwd: 'openam-ui-common/src/main/js',
src: ['**/*'],
dest: '<%= destination %>/XUI'
},
{
cwd: 'openam-ui-ria/src/main/resources',
src: ['**/*'],
dest: '<%= destination %>/XUI'
},
{
cwd: 'openam-ui-ria/src/main/js',
src: ['**/*'],
dest: '<%= destination %>/XUI'
}
],
verbose: true
},
files: [
{
src: ['**'],
},
{
},
{
cwd: 'openam-ui-scripts/test/libs',
src: ['**'],
},
{
cwd: 'openam-ui-scripts/src/main/js',
src: ['**'],
},
{
src: ['**'],
},
{
src: ['**'],
},
{
cwd: 'openam-ui-scripts/src/test/js',
src: ['**'],
}
],
verbose: true
},
files: [
{
src: ['css/**/*.css'],
}
],
verbose: true
},
files: [
{
cwd: '<%= forgerockui %>/forgerock-ui-commons/src/main/js',
src: ['**/*'],
dest: '<%= destination %>/scripts'
},
{
cwd: '<%= forgerockui %>/forgerock-ui-commons/src/main/resources',
src: ['**/*'],
dest: '<%= destination %>/scripts'
},
{
src: ['**/*'],
dest: '<%= destination %>/scripts'
},
{
cwd: 'openam-ui-common/src/main/js',
src: ['**/*'],
dest: '<%= destination %>/scripts'
},
{
src: ['**/*'],
dest: '<%= destination %>/scripts'
},
{
cwd: 'openam-ui-scripts/src/main/js',
src: ['**/*'],
dest: '<%= destination %>/scripts'
}
/*
,
{
src: ['**'],
dest: '<%= destination %>/../test'
},
{
src: ['**'],
dest: '<%= destination %>/../www'
}*/
],
verbose: true
},
files: [
{
src: ['**'],
},
{
cwd: 'openam-ui-policy/test/libs',
src: ['**'],
},
{
cwd: 'openam-ui-policy/src/main/js',
src: ['**'],
},
{
src: ['**'],
},
{
src: ['**'],
},
{
cwd: 'openam-ui-policy/src/test/js',
src: ['**'],
}
],
verbose: true
},
files: [
{
cwd: 'openam-ui-policy/target/www',
src: ['css/**/*.css'],
}
],
verbose: true
},
files: [
{
cwd: '<%= forgerockui %>/forgerock-ui-commons/src/main/js',
src: ['**/*'],
dest: '<%= destination %>/policyEditor'
},
{
cwd: '<%= forgerockui %>/forgerock-ui-commons/src/main/resources',
src: ['**/*'],
dest: '<%= destination %>/policyEditor'
},
{
src: ['**/*'],
dest: '<%= destination %>/policyEditor'
},
{
cwd: 'openam-ui-common/src/main/js',
src: ['**/*'],
dest: '<%= destination %>/policyEditor'
},
{
src: ['**/*'],
dest: '<%= destination %>/policyEditor'
},
{
cwd: 'openam-ui-policy/src/main/js',
src: ['**/*'],
dest: '<%= destination %>/policyEditor'
}
/*,
{
src: ['**'],
dest: '<%= destination %>/../test'
},
{
src: ['**'],
dest: '<%= destination %>/../www'
}*/
],
verbose: true
}
},
watch: {
frCommons: {
files: [
'<%= forgerockui %>/forgerock-ui-commons/src/main/js/**',
'<%= forgerockui %>/forgerock-ui-commons/src/main/resources/**'
],
tasks: ['sync']
},
frUser : {
files: [
'<%= forgerockui %>/forgerock-ui-user/src/main/js/**',
'<%= forgerockui %>/forgerock-ui-user/src/main/resources/**'
],
tasks: ['sync']
},
common : {
files: [
'openam-ui-common/src/main/js/**',
'openam-ui-common/src/main/resources/**'
],
tasks: ['sync']
},
ria: {
files: [
'openam-ui-ria/src/main/js/**',
'openam-ui-ria/src/main/resources/**'
],
},
scripts: {
files: [
'openam-ui-scripts/src/main/js/**',
'openam-ui-scripts/src/main/resources/**',
'openam-ui-scripts/src/test/js/**',
],
},
policy: {
files: [
'openam-ui-policy/src/main/js/**',
'openam-ui-policy/src/main/resources/**',
'openam-ui-policy/src/test/js/**',
'openam-ui-policy/src/test/resources/**'
],
}
}
});
'sync',
'replace',
'selectiveWatch:frCommons:frUser:common:ria'
]);
};