Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-24609

Replace uglifyjs usage with babel to parse ES6+ code

    Details

      Description

      When we build apps, we run jsanalyze from our titanium-sdk node modules. That file is specifically used to:

      • Parse the JS file (validity check)
      • Walk the AST and collect/record Ti.* API usages
      • Optionally, minify the code

      Unfortunately, uglifyjs hasn't supported ES6 and has lagged for years. Nowadays, people typically use babel and related projects. We should replace our usage of uglifyjs with babel-related modules so that we can parse ES6+ code.

      Specifically we can use babylon for parsing, babel-traverse/babel-core/babel-types for AST walking, and babili preset for minification.

        Attachments

          Activity

            People

            • Assignee:
              cwilliams Christopher Williams
              Reporter:
              cwilliams Christopher Williams
              Reviewer:
              Hans Knöchel
              Tester:
              Abir Mukherjee
            • Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

                • Backbone Issue Sync is enabled for your project, but we do not have any synchronization info for this issue.

                  Git Source Code