Commit Graph

65 Commits

Author SHA1 Message Date
7f651b9666 REFACTOR: Deprecate Discourse.Site and Discourse.User 2019-11-12 10:53:22 -05:00
6e481851e7 REFACTOR: Don't generate Discourse constants for mixins 2019-11-12 10:21:43 -05:00
920f8c6d75 REFACTOR: Remove Discourse.Route in lieu of importing 2019-11-08 15:18:13 -05:00
f03edb36be REFACTOR: Remove Discourse.Model 2019-11-08 14:13:35 -05:00
fa71919693 REFACTOR: Don't transpile Discourse.Session 2019-11-08 13:48:18 -05:00
7ac2a55588 REFACTOR: Remove Discourse.Category constants 2019-11-08 13:31:00 -05:00
7e44065bcb REFACTOR: Migrate Discourse.Post to imports 2019-11-08 13:13:13 -05:00
932c169d46 REFACTOR: Remove Discourse.NavItem constants 2019-11-08 12:56:13 -05:00
779ee3558d REFACTOR: Remove Discourse.UserAction from code 2019-11-08 12:52:39 -05:00
1990baa457 REFACTOR: Remove constant definition for discourse/routes/grouped 2019-11-08 12:47:39 -05:00
d74546f50e REFACTOR: Remove Discourse.Topic constant 2019-11-07 15:46:58 -05:00
9d457fa51f REFACTOR: Remove Discourse.TrustLevel constant 2019-11-07 15:26:26 -05:00
30990006a9 DEV: enable frozen string literal on all files
This reduces chances of errors where consumers of strings mutate inputs
and reduces memory usage of the app.

Test suite passes now, but there may be some stuff left, so we will run
a few sites on a branch prior to merging
2019-05-13 09:31:32 +08:00
9248ad1905 DEV: Enable Style/SingleLineMethods and Style/Semicolon in Rubocop (#6717) 2018-12-04 11:48:13 +08:00
8b2a379e4e DEV: transpile certain ES6 files without producing a module (#6460)
`.js.no-module.es6` files will be transpiled without producing a module.

import/export statements are deliberately not supported, so one would still need to use 
`const module = require('moduleName').default.`
2018-10-09 09:18:23 +08:00
dffb1fc4ee FEATURE: Use Glimmer compiler for widget templates
Widgets can now specify a template which is precompiled using Glimmer's
AST and then converted into our virtual dom code.

Example:

```javascript
createWidget('post-link-arrow', {
  template: hbs`
    {{#if attrs.above}}
      <a class="post-info arrow" title={{i18n "topic.jump_reply_up"}}>
        {{fa-icon "arrow-up"}}
      </a>
    {{else}}
      <a class="post-info arrow" title={{i18n "topic.jump_reply_down"}}>
        {{fa-icon "arrow-down"}}
      </a>
    {{/if}}
  `,

  click() {
    DiscourseURL.routeTo(this.attrs.shareUrl);
  }
});
```
2017-09-01 09:28:16 -04:00
5012d46cbd Add rubocop to our build. (#5004) 2017-07-28 10:20:09 +09:00
ac9c8ccf3b Fix broken specs. 2017-07-20 13:17:45 +09:00
0edb0018ff Dispose of heap when we reset the context. 2017-07-20 13:10:56 +09:00
198f308f7b Remove unused module transpiler 2017-07-06 17:17:56 -04:00
754c1e5438 Upgrade to Babel 6 2017-07-05 15:25:23 -04:00
2f480e21a0 Stop using Babel source gem, which is no longer updated 2017-07-05 14:19:16 -04:00
Sam
6e5296a510 FEATURE: upgrade sprockets to latest stable
This unlocks Rails upgrades, so we can now upgrade to latest Rails
2017-04-17 10:12:05 -04:00
Sam
7e43e73df6 FIX: properly reset all contexts after forking
Fixes hang on backup
2016-11-02 13:34:20 +11:00
a546395397 REFACTOR: Migrate markdown functionality in ES6 2016-07-11 12:57:05 -04:00
Sam
695773db1c FEATURE: upgrade from therubyracer to mini_racer
This pushes our internal V8 JavaScript engine from Chrome 32 to 50.

It also resolves some long standing issues we had with the old wrapper.
2016-05-23 09:57:15 +10:00
ed446ca487 increase transpiler timeout to 15 sec 2016-04-21 16:52:25 -07:00
8f59917f6b increase es6 transpiler timeout from 5 to 10 sec 2016-03-29 16:43:04 -07:00
b4f306ce03 FEATURE: Site Customizations can use the plugin api 2016-03-18 14:41:48 -04:00
d1e85bdd8b FEATURE: Use virtual dom framework for faster post rendering 2016-02-11 11:00:40 -05:00
Sam
aa2f802247 PERF: DISCOURSE_NO_CONSTANTS removed
we minimize the amount of constants we decalre see: https://meta.discourse.org/t/deprecating-es6-compatibility-layer/35821
2015-12-01 10:58:01 +11:00
Sam
5c899c765b Revert "Revert "REFACTOR: support booting discourse with DISCOURSE_NO_CONSTANTS""
This reverts commit c21457d6a7a369fb52dfd3cd01b3882055c85d62.
2015-11-21 12:27:06 +11:00
c21457d6a7 Revert "REFACTOR: support booting discourse with DISCOURSE_NO_CONSTANTS"
This reverts commit c0b277d273536f6aab1df67d908ed5e306868b2a.
2015-11-20 10:00:12 -05:00
Sam
c0b277d273 REFACTOR: support booting discourse with DISCOURSE_NO_CONSTANTS
This change is discussed here: https://meta.discourse.org/t/deprecating-es6-compatibility-layer/35821

Prior to this change we were not booting correctly with DISCOURSE_NO_CONSTANTS
2015-11-21 00:14:50 +11:00
Sam
09bedfd4c0 Make DISCOURSE_NO_CONSTANTS work in anon for home page 2015-11-20 00:29:56 +11:00
a89241f0b9 Don't include code in files for jshint anymore, eslint is run on command
line
2015-08-13 15:19:27 -04:00
22844b9e46 Ember 1.12 support 2015-08-13 11:14:16 -04:00
3c742918fe FIX: Transpile unicode to fix opera issue 2015-07-30 15:16:07 -04:00
bb93a345eb UX: Use smaller messages for moderator actions. 2015-07-27 10:09:21 -04:00
4706b77940 Backwards compatibility with deprecation for Discourse.PostMenuView 2015-07-07 15:18:19 -04:00
aee12fd6ef Ember Deprecations for Topics 2015-05-11 11:18:37 -04:00
788b66e4a3 Update SourceURL to work better 2015-04-16 16:51:49 -04:00
c7d367996a PERF: Concatenate scripts in development mode
This improves my DOMContentLoaded from 9s+ to less than 4s.
Pinging @SamSaffron on this because this was previously controversial.

This implementation adds the `@sourceURL` directive so chrome correctly
identifies the source files.
2015-04-16 15:40:23 -04:00
a83a19f6ce ES6 module migrations 2015-04-15 14:54:36 -04:00
f50280a889 Split out bulk operations modal and Discourse.Route.showModal
This makes it easier to share bulk topic operations, for example
from a plugin's custom topic list.
2015-03-10 15:40:56 -04:00
4691fe35b3 FIX: 6to5 was renamed to Babel
I can't believe they just pulled the old gem and broke people deploying
our site to production. I get it, your name changed, but don't break
other people's apps with no deprecations.
2015-03-05 13:08:32 -05:00
cf3582bedb FIX: JSHint wasn't validating ES6 files, this fixes a bunch of errors. 2015-02-10 17:21:16 -05:00
9584990477 Whitelist specific ES6 features we want for now. 2015-02-06 13:44:17 -05:00
a65e0a80ba Add support for more ES6 features 2015-02-06 13:26:33 -05:00
9a07945a16 FIX: Don't add constants for ES6 modules in plugins
If you're using ES6 in a plugin, you shouldn't be depending on the
backwards compatibility layer. That's for proper Discourse only.
2015-02-03 13:14:05 -05:00