Git Product home page Git Product logo

Comments (8)

ocombe avatar ocombe commented on May 25, 2024

My bower file:

{
  "name": "angular-brunch-seed-no-fuss",
  "version": "0.6.0",
  "dependencies": {
    "modernizr": "~2.8.3",
    "angular": "~1.3.8",
    "angular-resource": "~1.3.8",
    "angular-sanitize": "~1.3.8",
    "angular-mocks": "~1.3.8",
    "angular-ui-router": "0.2.13",
    "jquery": "~2.1.3",
    "lodash": "~2.4.1",
    "ocModal": "~0.1.9",
    "bootstrap-sass-official": "~3.3.1"
  },
  "overrides": {
    "angular-mocks": {
      "main": []
    },
    "modernizr": {
      "main": "modernizr.js"
    },
    "lodash": {
      "main": "dist/lodash.js"
    },
    "bootstrap-sass-official": {
      "main": [
        "assets/stylesheets/_bootstrap.scss",
        "assets/fonts/bootstrap/glyphicons-halflings-regular.eot",
        "assets/fonts/bootstrap/glyphicons-halflings-regular.svg",
        "assets/fonts/bootstrap/glyphicons-halflings-regular.ttf",
        "assets/fonts/bootstrap/glyphicons-halflings-regular.woff",
        "assets/javascripts/bootstrap.js"
        ]
    }
  },
  "resolutions": {
    "angular": "~1.3.8"
  }
}

But If I just override angular it works (it takes 31s... but it works)

{
  "name": "angular-brunch-seed-no-fuss",
  "version": "0.6.0",
  "dependencies": {
    "modernizr": "~2.8.3",
    "angular": "~1.3.8",
    "angular-resource": "~1.3.8",
    "angular-sanitize": "~1.3.8",
    "angular-mocks": "~1.3.8",
    "angular-ui-router": "0.2.13",
    "jquery": "~2.1.3",
    "lodash": "~2.4.1",
    "ocModal": "~0.1.9",
    "bootstrap-sass-official": "~3.3.1"
  },
  "overrides": {
    "angular": {
      "main": []
    },
    "angular-mocks": {
      "main": []
    },
    "modernizr": {
      "main": "modernizr.js"
    },
    "lodash": {
      "main": "dist/lodash.js"
    },
    "bootstrap-sass-official": {
      "main": [
        "assets/stylesheets/_bootstrap.scss",
        "assets/fonts/bootstrap/glyphicons-halflings-regular.eot",
        "assets/fonts/bootstrap/glyphicons-halflings-regular.svg",
        "assets/fonts/bootstrap/glyphicons-halflings-regular.ttf",
        "assets/fonts/bootstrap/glyphicons-halflings-regular.woff",
        "assets/javascripts/bootstrap.js"
        ]
    }
  },
  "resolutions": {
    "angular": "~1.3.8"
  }
}

from babel-brunch.

ocombe avatar ocombe commented on May 25, 2024

If there was a way to ignore to bower_components (see #4) it would probably fix my problem, but it might be interesting to see why it takes so long to compile angular... Maybe it's just because the lib has a lot of code, but if that's the case then the 6to5 compiler is really inefficient!

from babel-brunch.

es128 avatar es128 commented on May 25, 2024

I realized sometime later after creating this plugin that even though it is theoretically harmless, 6to5 is not designed for processing code that was already targeting ES5 standards.

#4 needs to be resolved to account for this (with a default value that excludes bower_components without requiring any user intervention).

If you think 6to5 ought to investigate why it is so slow to process angular.js (I don't), you could raise the topic in the core 6to5 issue tracker.

from babel-brunch.

ocombe avatar ocombe commented on May 25, 2024

I switched to Traceur for the moment, I'll take another look at 6to5 when #4 gets resolved. Anyway I think that Traceur is probably better for Angular code since Angular 2 uses Traceur.

from babel-brunch.

es128 avatar es128 commented on May 25, 2024

Anyway I think that Traceur is probably better for Angular code since Angular 2 uses Traceur.

I would assert that the primary motivation there is that they're both Google products. 6to5 has many advantages over Traceur for any ES6 code (including angular apps) when evaluated objectively.

from babel-brunch.

ocombe avatar ocombe commented on May 25, 2024

Yes but 6to5 only includes validated specs and AtScript won't get validated for now. Traceur supports AtScript since they need it for Angular 2...

from babel-brunch.

es128 avatar es128 commented on May 25, 2024

Yeah if you're intending to use AtScript it's an entirely different story.

from babel-brunch.

ocombe avatar ocombe commented on May 25, 2024

Yes, I want my project to be Angular2-ready :)

from babel-brunch.

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.