Skip to content

Commit

Permalink
Merge branch 'release/v3.0.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
AleksueiR committed Nov 19, 2014
2 parents a0b7eb1 + 9962276 commit c828e3c
Show file tree
Hide file tree
Showing 6 changed files with 72 additions and 21 deletions.
72 changes: 55 additions & 17 deletions Gruntfile.coffee
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
fs = require("fs")

module.exports = (grunt) ->

@registerTask(
'default'
'Default task create a distribution package.'
Expand Down Expand Up @@ -43,6 +43,7 @@ module.exports = (grunt) ->
'copy:assetsBuild'
'copy:proxyBuild'
'copy:localesBuild'
'mergeLocales'
'copy:templatesBuild'
'notify:assets'
]
Expand Down Expand Up @@ -226,7 +227,7 @@ module.exports = (grunt) ->
contents = contents.replace 'js/lib/lib.js', 'js/lib/lib.min.js'
contents = contents.replace 'css/lib/lib.css', 'css/lib/lib.min.css'
contents = contents.replace 'css/theme.less.css', 'css/theme.less.min.css'
contents = contents.replace /((?=\/wet-boew\/)[^\"]+?\.)(js|css)/g, '$1min.$2'
contents = contents.replace(/((?=\/wet-boew\/)[^\"]+?\.)(js|css)/g, '$1min.$2')

grunt.file.write file, contents
)
Expand Down Expand Up @@ -314,6 +315,28 @@ module.exports = (grunt) ->
done()
)

@registerTask(
'mergeLocales'
'INTERNAL'
->
locales = ['en-CA', 'fr-CA']
tasks = []

locales.forEach(
( locale ) ->
grunt.config 'merge-json.locale-' + locale,
src: [
'build/locales/' + locale + '/translation.json'
'src/locales/' + locale + '/translation.json'
]
dest: 'build/locales/' + locale + '/translation.json'

tasks.push 'merge-json:locale-' + locale
)

grunt.task.run tasks
)

@registerTask(
'thanks'
->
Expand Down Expand Up @@ -422,13 +445,13 @@ module.exports = (grunt) ->
configDist:
files: [
expand: true
cwd: 'src'
cwd: '<%= corepath %>src'
src: 'config.*.json'
dest: 'dist/'
# overrider core config with local if exists
,
expand: true
cwd: '<%= corepath %>src'
cwd: 'src'
src: 'config.*.json'
dest: 'dist/'
]
Expand Down Expand Up @@ -510,22 +533,13 @@ module.exports = (grunt) ->
cwd: '<%= corepath %>src/locales'
src: '**/*.json'
dest: 'build/locales'
,
expand: true
cwd: 'src/locales'
src: '**/*.json'
dest: 'build/locales'
]

localesDist:
files: [
expand: true
cwd: '<%= corepath %>src/locales'
src: '**/*.json'
dest: 'dist/locales'
,
expand: true
cwd: 'src/locales'
#cwd: '<%= corepath %>src/locales'
cwd: 'build/locales'
src: '**/*.json'
dest: 'dist/locales'
]
Expand Down Expand Up @@ -613,6 +627,15 @@ module.exports = (grunt) ->
src: '**/*.*'
dest: '<%= pkg.deployFolder %>/'

'merge-json':
locales:
src: [
'<%= corepath %>src/locales/en-CA/translation.json'
'src/locales/en-CA/translation.json'
]
dest: 'build/locales/en-CA/translation.json'


assemble:
options:
data: [
Expand All @@ -639,7 +662,7 @@ module.exports = (grunt) ->
i18next:
countryCode: 'CA'
debug: false
localePath: '<%= corepath %>src/locales'
localePath: 'build/locales'
languages: ['en', 'fr']

ramp:
Expand Down Expand Up @@ -1209,7 +1232,20 @@ module.exports = (grunt) ->
options:
output: '<%= corepkg.ramp.docco.outdir %>'


bump:
options:
files: [
'package.json'
'bower.json'
]
commitFiles: [
'package.json'
'bower.json'
]
commit: true
commitMessage: 'Release v%VERSION%',
createTag: false
push: false

# These plugins provide necessary tasks.
@loadNpmTasks 'assemble'
Expand All @@ -1227,8 +1263,10 @@ module.exports = (grunt) ->
@loadNpmTasks 'grunt-contrib-uglify'
@loadNpmTasks 'grunt-contrib-watch'
@loadNpmTasks 'grunt-contrib-yuidoc'
@loadNpmTasks 'grunt-merge-json'
@loadNpmTasks 'grunt-docco'
@loadNpmTasks 'grunt-hub'
@loadNpmTasks 'grunt-bump'
@loadNpmTasks 'grunt-jscs'
@loadNpmTasks 'grunt-json-minify'
@loadNpmTasks 'grunt-newer'
Expand Down
4 changes: 2 additions & 2 deletions bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ramp-theme-intranet",
"version": "3.0.1",
"version": "3.0.2",
"homepage": "http://ramp-pcar.github.io",
"authors": [
"BeSD - SA Team"
Expand All @@ -24,7 +24,7 @@
"./lib"
],
"dependencies": {
"ramp-pcar": "https://github.com/RAMP-PCAR/RAMP-PCAR.git#v3.0.1",
"ramp-pcar": "https://github.com/RAMP-PCAR/RAMP-PCAR.git#v3.0.2",
"theme-gc-intranet": "https://github.com/wet-boew/theme-gc-intranet.git#4.0.5"
},
"moduleType": [
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "ramp-theme-intranet",
"subname": "Reusable Accessible Mapping Platform - Intranet Theme",
"version": "3.0.1",
"version": "3.0.2",
"description": "RAMP GIS viewer - Canada Goose; Sample of an implementation of RAMP with Intranet Theme",
"main": "index.js",
"url": "http://tfs.int.ec.gc.ca:8080/tfs/dc/_git/RAMP",
Expand Down Expand Up @@ -48,6 +48,7 @@
"grunt-contrib-uglify": "~0.4.0",
"grunt-contrib-watch": "~0.6.1",
"grunt-contrib-yuidoc": "~0.5.2",
"grunt-merge-json": "~0.9.5",
"grunt-docco": "~0.3.3",
"grunt-hub": "~0.7.0",
"grunt-jscs": "~0.7.1",
Expand Down
2 changes: 1 addition & 1 deletion site/pages/ramp.hbs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
{
"altLangPrefix": "ramp",
"dateModified": "2014-09-22",
"dateModified": "2014-11-04",
"sitesearch": "false",
"breadcrumb": "false",
"subsite_title": "false"
Expand Down
6 changes: 6 additions & 0 deletions src/locales/en-CA/translation.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"page": {
"title": "Reusable Accessible Mapping Platform (RAMP) - Intranet Theme",
"siteTitle": "Reusable Accessible Mapping Platform (RAMP) - Intranet Theme"
}
}
6 changes: 6 additions & 0 deletions src/locales/fr-CA/translation.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"page": {
"title": "Plateforme de cartographie accessible et réutilisable (PCAR) - Thème d'intranet",
"siteTitle": "Plateforme de cartographie accessible et réutilisable - Thème d'intranet"
}
}

0 comments on commit c828e3c

Please sign in to comment.