Giter Site home page Giter Site logo

Comments (5)

justinfagnani avatar justinfagnani commented on May 17, 2024

I just tried building with the transformer, and makes the output about 1/3 the size.

from security_monkey.

justinfagnani avatar justinfagnani commented on May 17, 2024

Also removing package:js results in a 4.5x size reduction.

from security_monkey.

scriptsrc avatar scriptsrc commented on May 17, 2024

After removing package:js and adding the angular transformer, I'm now getting an error in the javascript version of the application that I'm not getting in the dartium version:

No getter for 'revisions_ctrl'.

STACKTRACE:
Error
    at dart.b (http://127.0.0.1:8080/main.dart.js:3262:3)
    at bL.DA (http://127.0.0.1:8080/main.dart.js:6998:20)
    at IP.Zw (http://127.0.0.1:8080/main.dart.js:6133:5)
    at xmX.RH (http://127.0.0.1:8080/main.dart.js:6313:32)
    at xmX.FP (http://127.0.0.1:8080/main.dart.js:6303:38)
    at xmX.Js (http://127.0.0.1:8080/main.dart.js:6285:8)
    at xmX.Cj (http://127.0.0.1:8080/main.dart.js:6283:18)
    at xmX.p2 (http://127.0.0.1:8080/main.dart.js:6274:8)
    at xmX.nT (http://127.0.0.1:8080/main.dart.js:6269:8)
    at xmX.PB (http://127.0.0.1:8080/main.dart.js:6262:8) 

I think I'll have to figure out how to debug the compiled javascript before I can check this in. Any ideas?

from security_monkey.

scriptsrc avatar scriptsrc commented on May 17, 2024

I see a similar issue on Stack Overflow:
http://stackoverflow.com/questions/23263222/why-do-i-get-js-execution-errors-with-angular-dart-0-10-and-ng-view

Changed the pubspec.yaml to this:

name: SecurityMonkey
description: An AWS Policy Monitoring Tool
dependencies:
  angular: '0.12.0'
  browser: '0.10.0+2'
  http_server: '0.9.2+1'
dev_dependencies:
  unittest: '0.11.0+2'
transformers:
- angular:
    html_files:
      - web/views/searchpage.html
      - web/views/settings.html
      - web/views/signout.html
- $dart2js:
    minify: true

Re-built the javascript and am still having the issue. =(

from security_monkey.

scriptsrc avatar scriptsrc commented on May 17, 2024

Added the pub transformer in commit 3ab881a.
Package:js was replaced with dart:js in d1de5a5.

The "No getter for 'revisions_ctrl'." was fixed by replacing the controllers for search, settings, and signout, with components in commit a67a708.

main.dart.js was reduced from about 3.6MB to about 845KB.

from security_monkey.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.