Show app version in Account menu

This commit is contained in:
Mo Bitar
2019-05-11 18:26:55 -05:00
parent 0d6777780c
commit 47a316409b
6 changed files with 64 additions and 9 deletions

View File

@@ -149,6 +149,19 @@ module.exports = function(grunt) {
dest: 'dist/javascripts/compiled.min.js'
}
},
ngconstant: {
options: {
name: 'app',
dest: 'app/assets/javascripts/app/constants.js',
deps: false,
constants: {
appVersion: grunt.file.readJSON('package.json').version
}
},
build: {
}
},
});
grunt.loadNpmTasks('grunt-newer');
@@ -162,10 +175,13 @@ module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-babel');
grunt.loadNpmTasks('grunt-browserify');
grunt.loadNpmTasks('grunt-ng-constant');
grunt.registerTask('default', ['haml', 'ngtemplates', 'sass', 'concat:app', 'babel', 'browserify',
'concat:lib', 'concat:dist', 'ngAnnotate', 'concat:css', 'uglify']);
'concat:lib', 'concat:dist', 'ngAnnotate', 'concat:css', 'uglify', 'ngconstant:build']);
grunt.registerTask('vendor', ['concat:app', 'sass', 'babel', 'browserify',
'concat:lib', 'concat:dist', 'ngAnnotate', 'concat:css', 'uglify']);
grunt.registerTask('constants', ['ngconstant:build'])
};