-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Introduce React, TypeScript, TSLint and React-StyleGuidist #2219
Changes from all commits
26f69b6
e32dad2
1ad2b08
f86a6ef
893fb1c
1326b26
3899eb8
104a1ca
ed12e1b
887abd7
be91a89
1052341
23293a3
bb73d47
2384092
61a7846
cdd16c9
e5322e8
76be135
50d4dba
2353754
0530323
96bd90a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,3 +22,6 @@ js/libtextsecure.js | |
stylesheets/*.css | ||
test/test.js | ||
libtextsecure/test/test.js | ||
|
||
# React / TypeScript | ||
ts/**/*.js |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,7 +13,6 @@ assets | |
|
||
# examples | ||
example | ||
examples | ||
|
||
# code coverage directories | ||
coverage | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -98,19 +98,19 @@ module.exports = function(grunt) { | |
'Gruntfile.js', | ||
'js/**/*.js', | ||
'!js/background.js', | ||
'!js/backup.js', | ||
'!js/components.js', | ||
'!js/database.js', | ||
'!js/jquery.js', | ||
'!js/libtextsecure.js', | ||
'!js/WebAudioRecorderMp3.js', | ||
'!js/Mp3LameEncoder.min.js', | ||
'!js/libsignal-protocol-worker.js', | ||
'!js/components.js', | ||
'!js/libtextsecure.js', | ||
'!js/logging.js', | ||
'!js/backup.js', | ||
'!js/modules/**/*.js', | ||
'!js/Mp3LameEncoder.min.js', | ||
'!js/signal_protocol_store.js', | ||
'!js/views/conversation_search_view.js', | ||
'!js/views/debug_log_view.js', | ||
'!js/signal_protocol_store.js', | ||
'!js/database.js', | ||
'!js/WebAudioRecorderMp3.js', | ||
'_locales/**/*' | ||
], | ||
options: { jshintrc: '.jshintrc' }, | ||
|
@@ -149,38 +149,19 @@ module.exports = function(grunt) { | |
}, | ||
src: { | ||
files: [{ expand: true, dest: 'dist/', src: ['<%= dist.src %>'] }], | ||
options: { | ||
process: function(content, srcpath) { | ||
if (srcpath.match('background.js')) { | ||
return content.replace( | ||
/textsecure-service-staging.whispersystems.org/g, | ||
'textsecure-service-ca.whispersystems.org'); | ||
} else if (srcpath.match('expire.js')) { | ||
var gitinfo = grunt.config.get('gitinfo'); | ||
var commited = gitinfo.local.branch.current.lastCommitTime; | ||
var time = Date.parse(commited) + 1000 * 60 * 60 * 24 * 90; | ||
return content.replace( | ||
/var BUILD_EXPIRATION = 0/, | ||
"var BUILD_EXPIRATION = " + time | ||
); | ||
} else { | ||
return content; | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
jscs: { | ||
all: { | ||
src: [ | ||
'Gruntfile', | ||
'js/**/*.js', | ||
'!js/libtextsecure.js', | ||
'!js/WebAudioRecorderMp3.js', | ||
'!js/Mp3LameEncoder.min.js', | ||
'!js/libsignal-protocol-worker.js', | ||
'!js/components.js', | ||
'!js/libsignal-protocol-worker.js', | ||
'!js/libtextsecure.js', | ||
'!js/modules/**/*.js', | ||
'!js/Mp3LameEncoder.min.js', | ||
'!js/WebAudioRecorderMp3.js', | ||
'test/**/*.js', | ||
'!test/blanket_mocha.js', | ||
'!test/modules/**/*.js', | ||
|
@@ -202,17 +183,24 @@ module.exports = function(grunt) { | |
tasks: ['copy_dist'] | ||
}, | ||
scripts: { | ||
files: ['<%= jshint.files %>', './js/**/*.js'], | ||
files: ['<%= jshint.files %>'], | ||
tasks: ['jshint'] | ||
}, | ||
style: { | ||
files: ['<%= jscs.all.src %>', './js/**/*.js'], | ||
files: ['<%= jscs.all.src %>'], | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In the past, I’ve liked using There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not sure what you're suggesting here. We've already specified, in detail, what the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Apologies if I wasn’t clear. I meant that we often reference |
||
tasks: ['jscs'] | ||
}, | ||
transpile: { | ||
files: ['./ts/**/*.js'], | ||
tasks: ['exec:transpile'] | ||
} | ||
}, | ||
exec: { | ||
'tx-pull': { | ||
cmd: 'tx pull' | ||
}, | ||
'transpile': { | ||
cmd: 'npm run transpile', | ||
} | ||
}, | ||
'test-release': { | ||
|
@@ -496,5 +484,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'] | ||
); | ||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,6 +20,12 @@ | |
<title>Signal</title> | ||
<link href='images/icon_128.png' rel='shortcut icon'> | ||
<link href="stylesheets/manifest.css" rel="stylesheet" type="text/css" /> | ||
|
||
<!-- When making changes to these templates, be sure to update these two places: | ||
1) test/styleguide/legacy_templates.js | ||
2) test/index.html | ||
--> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 👏 👏 👏 Super helpful! |
||
|
||
<script type='text/x-tmpl-mustache' id='app-migration-screen'> | ||
<div class='content'> | ||
<img src='images/icon_128.png'> | ||
|
@@ -909,8 +915,8 @@ <h3>{{ message }}</h3> | |
<script type='text/javascript' src='js/expire.js'></script> | ||
<script type='text/javascript' src='js/conversation_controller.js'></script> | ||
<script type='text/javascript' src='js/emoji_util.js'></script> | ||
<script type='text/javascript' src='js/i18n.js'></script> | ||
|
||
<script type='text/javascript' src='js/views/backbone_wrapper_view.js'></script> | ||
<script type='text/javascript' src='js/views/whisper_view.js'></script> | ||
<script type='text/javascript' src='js/views/last_seen_indicator_view.js'></script> | ||
<script type='text/javascript' src='js/views/scroll_down_button_view.js'></script> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎆