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

[QUESTION] Use of Relative Root Option / Files are not Replaced #30

Closed
360disrupt opened this issue Mar 1, 2018 · 1 comment
Closed

Comments

@360disrupt
Copy link

How to set the relative path in order to replace the included js files?

Folder structure:

  • src
    • frontend
      • index.html
  • dist
    • frontend
      • index.html
  • bower_components
return gulp.src(paths.tmp + '/serve/**/index.html')
   .pipe($.inject(partialsInjectFile, partialsInjectOptions))
   .pipe($.cdnizer({
     nodeModules: false,
     allowMin: true,
     relativeRoot: 'frontend/', //tried 'dist/frontend/' & none
     files: ['../../bower_components*'] //also tried ['**/*'] & ['**/*.js']
   }))
  ...
 .pipe(gulp.dest(paths.dist + '/'))

Compiled index.html

    <!-- bower:js -->
    <script src="../../bower_components/jquery/dist/jquery.js"></script>
    <script src="../../bower_components/angular/angular.js"></script>
@OverZealous
Copy link
Owner

This is the wrong repo for questions about cdnizer itself (this doesn't appear to be related to using it within Gulp).

I'm pretty sure this is a duplicate of this bug, which is an issue with an external library that we can't fix. I've included some suggestions there, or you can switch to using absolute paths, which don't have the same issues.

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

No branches or pull requests

2 participants