Introduce React/TypeScript/TSLint into app for new UI components

npm run transpile
  Works on files under js/react/
  Outputs files right next to the .tsx file

This is part of our `grunt dev` task, as well as the default grunt task,
which does everything else necessary to get a raw git checkout ready to
run.
This commit is contained in:
Scott Nonnenberg 2018-03-26 11:44:45 -07:00
parent f86a6ef752
commit 893fb1cb9e
No known key found for this signature in database
GPG key ID: 5F82280C35134661
10 changed files with 739 additions and 27 deletions

View file

@ -108,6 +108,7 @@ module.exports = function(grunt) {
'!js/backup.js',
'!js/modules/**/*.js',
'!js/views/conversation_search_view.js',
'!js/react/**/*.js',
'!js/views/debug_log_view.js',
'!js/signal_protocol_store.js',
'!js/database.js',
@ -162,6 +163,7 @@ module.exports = function(grunt) {
'!js/libsignal-protocol-worker.js',
'!js/components.js',
'!js/modules/**/*.js',
'!js/react/**/*.js',
'test/**/*.js',
'!test/blanket_mocha.js',
'!test/modules/**/*.js',
@ -190,10 +192,17 @@ module.exports = function(grunt) {
files: ['<%= jscs.all.src %>'],
tasks: ['jscs']
},
transpile: {
files: ['./js/react/**/*.js'],
tasks: ['exec:transpile']
}
},
exec: {
'tx-pull': {
cmd: 'tx pull'
},
'transpile': {
cmd: 'npm run transpile',
}
},
'test-release': {
@ -477,5 +486,8 @@ module.exports = function(grunt) {
grunt.registerTask('copy_dist', ['gitinfo', 'copy:res', 'copy:src']);
grunt.registerTask('date', ['gitinfo', 'getExpireTime']);
grunt.registerTask('prep-release', ['gitinfo', 'clean-release', 'fetch-release']);
grunt.registerTask('default', ['concat', 'copy:deps', 'sass', 'date']);
grunt.registerTask(
'default',
['concat', 'copy:deps', 'sass', 'date', 'exec:transpile']
);
};