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

Embedded scripts url? #105

Closed
levipadre opened this issue Mar 4, 2016 · 3 comments
Closed

Embedded scripts url? #105

levipadre opened this issue Mar 4, 2016 · 3 comments

Comments

@levipadre
Copy link

Hi,
I'm using this configuration:

gulp.task('webserver', function() {
    gulp.src('app')
        .pipe(webserver({
            livereload: true,
            port: 12345,
            directoryListing: false,
            open: true,
            fallback: 'index.html'
        }));
});

The werbserver is working, but I need to add some js files to my index.html, and the scripts live outside the app folder (e.g. bower_components, dist).
How can I add these files? E.g:
<script src="/bower_components/angular/angular.min.js"></script>

Thanks

@levipadre
Copy link
Author

Does anybody know about this configuration?

@tfrijsewijk
Copy link

You can't. You have to start the webserver from the root of your project (gulp.src('.')), and go from there: Navigate your browser to localhost:12345/app and src="../bower_components/...".

@levipadre
Copy link
Author

Thank you, this helped a lot, perfect!

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