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

spin.js breaks whole build process #522

Closed
9mm opened this issue Sep 4, 2014 · 8 comments
Closed

spin.js breaks whole build process #522

9mm opened this issue Sep 4, 2014 · 8 comments
Labels

Comments

@9mm
Copy link

9mm commented Sep 4, 2014

So this person decided to name their bower package with a file extension... really kind of stupid I think.

What is the easiest way to fix all this? The original problem was with rev, i tried a hacky fix and now the problem is with usemin:js.

Is there a way to rename a folder with bower or something, or an easier way I'm not thinking of? Thanks!

@JaKXz
Copy link
Collaborator

JaKXz commented Sep 4, 2014

I think #420 is related, give that a shot?

@kingcody
Copy link
Member

kingcody commented Sep 8, 2014

@9mm in your grunt file, does the usemin config have this line:

    usemin: {
      ...
      js: ['<%= yeoman.dist %>/public/{,*/}*.js'],
      ...
    }

same with rev:

    rev: {
      dist: {
        files: {
          src: [
            '<%= yeoman.dist %>/public/{,*/}*.js',
            ...
          ]
        }
      }
    }

If so, I'm wondering if changing them to:

'<%= yeoman.dist %>/public/**/*.js'

might help?

@9mm
Copy link
Author

9mm commented Sep 8, 2014

Still doesn't fix. I had to change them to this and break them out separately:

          //'<%= yeoman.dist %>/public/{,*/}*.js',        // original line (spin.js breaks)
            '<%= yeoman.dist %>/public/app/{,*/}*.js',    // replacement
            '<%= yeoman.dist %>/public/assets/{,*/}*.js', // replacement

@jameymyates
Copy link

This seems like it could be a common issue if Bower allows package names to contain file extensions.

Using <%= yeoman.dist %>/public/**/*.js seemed to work for me, but is there any danger of this causing other problems the way this app is put together? I assume that the {,*/} was put in for some reason.

@programming-kid
Copy link

using <%= yeoman.dist %>/public/**/*.js doesn't work either i am using typeahead.js which is causing this issue

@pirhoo
Copy link

pirhoo commented Jan 2, 2015

I've got the same issue with animate.css. I solved it by excluding directories with .css or .js at the first level of bower_components:

rev: {
  dist: {
    files: {
      src: [
        '<%= yeoman.dist %>/public/{,*/}*.js',
        '<%= yeoman.dist %>/public/{,*/}*.css',
        '<%= yeoman.dist %>/public/assets/images/{,*/}*.{png,jpg,jpeg,gif,webp,svg}',
        '<%= yeoman.dist %>/public/assets/fonts/*',
        '!<%= yeoman.dist %>/public/bower_components/*.{css,js}'
      ]
    }
  }
}

@Unitiser
Copy link

I had a similar issue, stefbach pointed out that this issue was resolved in v3 of usemin. I did not try it, but this could be a great improvement!
http://stackoverflow.com/questions/28442613/uglify-cant-parse-flow-js/28709677#28709677

@ascheucher
Copy link

If you do not want to exclude the whole bower_components directory, you can exclude the affected library's folder and include the libraries .js files again. Here an example for 'auth0.js':

        '<%= yeoman.dist %>/public/{,*/}*.js',
        '!<%= yeoman.dist %>/public/bower_components/auth0.js',
        '<%= yeoman.dist %>/public/bower_components/auth0.js/{,*/}*.js',

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

No branches or pull requests

9 participants