Skip to content
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

Grunt outputs to build instead of release #1498

Closed
dotnetwise opened this issue Oct 31, 2014 · 2 comments
Closed

Grunt outputs to build instead of release #1498

dotnetwise opened this issue Oct 31, 2014 · 2 comments

Comments

@dotnetwise
Copy link

This lets you guys get it wrong e.g. You do a build via grunt and forget to copy it manually to release folder.
Then npm publish will not have the updated version.

This is what happened to 0.2.11 as the release/angular-ui-router.js is not the same as build/angular-ui-router.js and it doesn't contain the code about html5Mode

release/angular-ui-router.js

var isHtml5 = $locationProvider.html5Mode();
var url = urlMatcher.format(params);
        options = options || {};

        if (!isHtml5 && url !== null) {
          url = "#" + $locationProvider.hashPrefix() + url;
        }

build/angular-ui-router.js

 var isHtml5 = $locationProvider.html5Mode();
        if (angular.isObject(isHtml5)) { //*** THIS IS MISSING FROM NPM 0.2.11 release/angular-ui-router.js 
          isHtml5 = isHtml5.enabled;
        }

        var url = urlMatcher.format(params);
        options = options || {};

        if (!isHtml5 && url !== null) {
          url = "#" + $locationProvider.hashPrefix() + url;
        }

So please make grunt to output in the release folder so we won't be seeing this error prone behavior in future

@nateabele
Copy link
Contributor

@dotnetwise
Copy link
Author

Not sure why do you show me those lines?

Did you see the soruce code?
https://github.com/angular-ui/ui-router/blob/master/src/urlRouter.js#L383-L391

Did you see the crappy release not containing the source code?
https://github.com/angular-ui/ui-router/blob/master/release/angular-ui-router.js#L1712-L1716

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants