package.json contains a list of locale files, that was manually updated until
now. This PR adds a grunt task to update package.json and registers it to run
on release.
fixes #1766
// Task to be run when releasing a new version
grunt.registerTask('release', [
'jshint', 'nodeunit', 'concat', 'embedLocales',
- 'component', 'uglify'
+ 'component', 'package_json', 'uglify'
]);
};
--- /dev/null
+module.exports = function (grunt) {
+ grunt.registerTask('package_json', function () {
+ var config = JSON.parse(grunt.file.read('package.json'));
+
+ config.spm.output = grunt.file.expand('locale/*.js');
+
+ grunt.file.write('package.json', JSON.stringify(config, true, 4) + '\n');
+ });
+}