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

cwd help #257

Open
davidrhoderick opened this issue Sep 27, 2016 · 0 comments
Open

cwd help #257

davidrhoderick opened this issue Sep 27, 2016 · 0 comments

Comments

@davidrhoderick
Copy link

So I'm trying to clean up my application structure by putting bower_components in a vendor folder like this:

project
|-app
||-vendor
|||-bower_components

Inside my vendor folder, I have the bower.json and the .bowerrc files, and I've installed all my dependencies. I'm basing my wiredep code off of an Angular Yeoman generator, so maybe I'm messing it up a bit but it looks like this now:

// Automatically inject Bower components into the app
    wiredep: {
      app: {
        bowerJson: require('./vendor/bower.json'),
        directory: './vendor/bower_components',
        cwd: 'vendor',
        src: ['<%= yeoman.app %>/index.html'],
        ignorePath:  /\.\.\//
      },
      test: {
        bowerJson: require('./vendor/bower.json'),
        directory: './vendor/bower_components',
        cwd: 'vendor',
        devDependencies: true,
        src: '<%= karma.unit.configFile %>',
        ignorePath:  /\.\.\//,
        fileTypes:{
          js: {
            block: /(([\s\t]*)\/{2}\s*?bower:\s*?(\S*))(\n|\r|.)*?(\/{2}\s*endbower)/gi,
              detect: {
                js: /'(.*\.js)'/gi
              },
              replace: {
                js: '\'{{filePath}}\','
              }
            }
          }
      },
      sass: {
        bowerJson: require('./vendor/bower.json'),
        directory: './vendor/bower_components',
        cwd: 'vendor',
        src: ['<%= yeoman.app %>/styles/{,*/}*.{scss,sass}'],
        ignorePath: /(\.\.\/){1,2}bower_components\//
      }
    },

I added some configuration so that the bower.json and .bowerrc files would be found correctly inside the vendor folder because that was stopping grunt from running, but I'm now stuck on linking. When I run the serve task, which uses wiredep, the html is pointing to the vendor/bower_components/ folder for each dependency but not finding any of the files. I feel like maybe I messed something up, how do I fix this?

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

1 participant