This time, I am more exact on exactly what files are processed for the version info. So if you want to start adding it to more files then you will need to make sure that its processed by the grunt file.
}
},
+ 'string-replace': {
+ dist: {
+ files: {
+ 'dist/assets/css/':'dist/assets/css/*.css',
+ 'dist/assets/js/':'dist/assets/js/*js',
+ 'dist/assets/js/foundation/':'dist/assets/js/foundation/*js',
+ 'dist/assets/scss/foundation/components/':'dist/assets/scss/foundation/components/*.scss',
+ 'dist/docs/assets/css/':'dist/docs/assets/css/*.css',
+ 'dist/docs/assets/js/':'dist/docs/assets/js/*.js'
+ },
+ options: {
+ replacements: [
+ {pattern: /{{\s*VERSION\s*}}/g, replacement: '<%= pkg.version %>'}
+ ]
+ }
+ }
+ },
+
concat: {
dist: {
files: {
grunt.loadNpmTasks('grunt-rsync');
grunt.loadNpmTasks('grunt-sass');
grunt.loadNpmTasks('grunt-contrib-jst');
+ grunt.loadNpmTasks('grunt-string-replace');
grunt.task.registerTask('watch_start', ['karma:dev_watch:start', 'watch']);
- grunt.registerTask('build:assets', ['clean', 'sass', 'concat', 'uglify', 'copy', 'jst']);
+ grunt.registerTask('build:assets', ['clean', 'sass', 'concat', 'uglify', 'copy', 'jst', 'string-replace']);
grunt.registerTask('build', ['build:assets', 'assemble']);
grunt.registerTask('travis', ['build', 'karma:continuous']);
grunt.registerTask('develop', ['travis', 'watch_start']);
{
"name": "foundation",
- "version": "5.3.3",
+ "version": "5.4.1",
"main": [
"css/foundation.css",
"js/foundation.js"
Foundation.libs.abide = {
name : 'abide',
- version : '5.4.1',
+ version : '{{VERSION}}',
settings : {
live_validate : true,
Foundation.libs.accordion = {
name : 'accordion',
- version : '5.4.1',
+ version : '{{VERSION}}',
settings : {
active_class: 'active',
Foundation.libs.alert = {
name : 'alert',
- version : '5.4.1',
+ version : '{{VERSION}}',
settings : {
callback: function (){}
Foundation.libs.clearing = {
name : 'clearing',
- version: '5.4.1',
+ version: '{{VERSION}}',
settings : {
templates : {
Foundation.libs.dropdown = {
name : 'dropdown',
- version : '5.4.1',
+ version : '{{VERSION}}',
settings : {
active_class: 'open',
Foundation.libs.equalizer = {
name : 'equalizer',
- version : '5.4.1',
+ version : '{{VERSION}}',
settings : {
use_tallest: true,
Foundation.libs.interchange = {
name : 'interchange',
- version : '5.4.1',
+ version : '{{VERSION}}',
cache : {},
Foundation.libs.joyride = {
name : 'joyride',
- version : '5.4.1',
+ version : '{{VERSION}}',
defaults : {
expose : false, // turn on or off the expose feature
window.Foundation = {
name : 'Foundation',
- version : '5.3.3',
+ version : '{{VERSION}}',
media_queries : {
small : S('.foundation-mq-small').css('font-family').replace(/^[\/\\'"]+|(;\s?})+|[\/\\'"]+$/g, ''),
Foundation.libs['magellan-expedition'] = {
name : 'magellan-expedition',
- version : '5.4.1',
+ version : '{{VERSION}}',
settings : {
active_class: 'active',
Foundation.libs.offcanvas = {
name : 'offcanvas',
- version : '5.4.1',
+ version : '{{VERSION}}',
settings : {
open_method: 'move',
Foundation.libs.orbit = {
name: 'orbit',
- version: '5.3.3',
+ version: '{{VERSION}}',
settings: {
animation: 'slide',
Foundation.libs.reveal = {
name : 'reveal',
- version : '5.4.1',
+ version : '{{VERSION}}',
locked : false,
Foundation.libs.slider = {
name : 'slider',
- version : '5.4.1',
+ version : '{{VERSION}}',
settings: {
start: 0,
Foundation.libs.tab = {
name : 'tab',
- version : '5.4.1',
+ version : '{{VERSION}}',
settings : {
active_class: 'active',
Foundation.libs.tooltip = {
name : 'tooltip',
- version : '5.4.1',
+ version : '{{VERSION}}',
settings : {
additional_inheritable_classes : [],
Foundation.libs.topbar = {
name : 'topbar',
- version: '5.4.1',
+ version: '{{VERSION}}',
settings : {
index : 0,
{
"name": "zurb-foundation",
- "version": "5.3.3",
+ "version": "5.4.1",
"devDependencies": {
"assemble": "~0.4.37",
"grunt": "~0.4.4",
// Forward slash placed around everything to convince PhantomJS to read the value.
meta.foundation-version {
- font-family: "/5.4.1/";
+ font-family: "/{{VERSION}}/";
}
meta.foundation-mq-small {