GithubHelp home page GithubHelp logo

gulp-open's People

Contributors

apaleslimghost avatar marcellodesales avatar stephan281094 avatar stephenlacy avatar stevelacy avatar thedancingcode avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

gulp-open's Issues

Can't find gulp-open

Hi all,

Just a quick question.

I installed Gulp-open with the following codes on gulpfiles.js:

gulp.task( 'open', function() {
var options = {
uri: uri,
app: 'chrome' || 'google chrome' // may need to sniff for Windows/OSX to determine Chrome string
};
gulp.src( './build/' )
.pipe( open( options ) );
});

I also have gulp-connect and gulp-yargs with the following:

var src = './build',
dist = './build',
baseURL = ( argv.production === undefined ) ? src : dist,
port = ( argv.production === undefined ) ? 8000 : 8001,
uri = 'http://localhost:' + port;

gulp.task( 'connect', function() {
connect.server( {
root: baseURL,
livereload: true,
port: port
} );
} );

I'm not sure what is happening, on the package.json the dependency is there, but gulp can't find it.

Any ideas what's happening?

Thank you in advance.

Kind regards,

Fernando Fas

Incorrect docs for app option

Love the plugin, used it on a few projects for a while now.

The Issue
Here is my gulp task which does not open chrome:

gulp.task('open', function() {
    return gulp.src('./index.html')
        .pipe(open('', {
            url: 'http://localhost:8000',
            app: 'chrome'  // "chrome" per the docs
        }));
});

The Fix
Using app: 'google chrome' does work and is case insensitive.

System Info
Mac OSX Mavericks (10.10.1)

gulp-open 0.3.1

Gulp
CLI version 3.8.9
Local version 3.8.10

Thanks!

Process does not exit

When I add .pipe( open() ) to my gulp task, the process never exits - I must hit Cmd+C in order to type the next prompt. Without this addition, it does exit.

Not working for me

Maybe I'm doing something wrong, but following the examples doesn't work for me. I've tried Chrome, Firefox and the default (which is Chrome) and it doesn't open anything.

Any way to target a specific google chrome profile?

First thanks for a great package.

My issue is that i use google chrome profiles to target different user logins on various sites and I wanted to know if it was possible to target a specific profile?

My env is Windows 7, Visual Studio Code, my typical usage is developing SharePoint Spfx solutions to test on lots of different dev/test Office 365 tenants (hence why I have a ton of google chrome profiles and it would be awesome to know if I can target a specific profile).

TIA

'open' defaults to parallels desktop on mac

Hi! This plugin could be very useful for me. I have a weird issue, though: In every browser I try it opens the url using parallels desktop, when it should just open it on my osx. Any ideas? Here is my code:

gulp.task('app', function(){
  var browser = os.platform() === 'linux' ? 'google-chrome' : (
    os.platform() === 'darwin' ? 'google chrome' : (
    os.platform() === 'win32' ? 'chrome' : 'firefox'));

  var options = {
    uri: 'localhost:3000',
    app: browser
  };
  gulp.src('./')
  .pipe( open(options) );
});

Update readme option.app

Hi, can you add the google chrome browser definition for OS X to the readme?

'google-chrome' // Linux
'chrome' // Windows
'Google Chrome' // OS X
'firefox'

`node-open` breaks on Linux - switch to `opn`?

You mentioned in #18 that you were considering opn over node-open.

Presently, node-open is broken on Linux - I get Error: spawn open ENOENT because the open command doesn't exist on Linux. A workaround for my use case has been to symlink xdg-open to open, but that's super inelegant, and might well break for other use cases.

Since node-open is deprecated anyway, do you anticipate making a switch anytime soon? I'm happy to submit a PR.

Some way to specify incognito?

This would be useful to me.

Also, would it ever be possible to run post-open commands (for instance should I want to open developer tools, load a specific snippet, etc. after the file is open)?

not working under windows 7

Hi,

grunt open was working for me by setting %CHROME_BIN%
but the gulp version is not, I followed the readme, but no win.

open IE

Hi, I would like to know if it is possible to open IE with gulp-open?
thanks

Don't check `file.isNull`

This line checks whether the file is null and throws an error if it's not. This prevents users from passing { read: false } to gulp.src (because in that case, file.isNull() returns true), but since this task doesn't use the contents of the file, you should be able to pass { read: false } to optimize the flow (you only need the file path to open it). I realize that means it's possible to attempt to open a file that doesn't exist, but in that case, you'll just get an error, which is no different than the current behavior.

Open new tab in browser

Hi,

I'm simply trying to open a path with the default OS browser (using Node v4.2.0).

I noticed though that if the browser already has other tabs opened nothing happens: what am I doing wrong?

gulp.task('open', function(){
  gulp.src(__filename).pipe($.open({uri: 'localhost:4050'}));
});

Thanks!

Refresh Browser

There should be some way to refresh the currently opened browser so that you can reload/refresh the page when some file changes. This would make it easier for developing static websites and phonegap/cordova applications

Open multiple files

My pipeline function

function openhtml(done){
    return gulp.src('dist/**/*.html')
        .pipe(open({app: 'chrome'}, done));
}

First file will open, but next files this error ocurres:

Opening my.html using the app chrome
The following tasks did not complete: dev, openhtml
Did you forget to signal async completion?

Can't use directory as uri anymore

In version 2.1.0 I was still able to use directory paths (e.g. "../") as uri and they would open correctly in the desired app (that is atom).

In version 3.0 the directory is opened in the default app instead (that is finder), although the output in the terminal states that it will be opened in the desired app, and the task runs forever instead of exiting correctly.

I am on macOS.

Open url not working for me

Hello,

Open an url doesn't work, I don't see what I forgot or not?

This is my code:

var gulp = require('gulp');
var open = require('gulp-open');

gulp.task('open', function () {
  var options = {
    url: 'http://localhost:9000',
    app: 'google chrome' // OSX
  };

  gulp.src('./app/scripts/index.html')
    .pipe(open('', options));
});

Chrome doesn't open

Hi question about chrome on OS X 10.9.5 (13F34).
My Code:

gulp.task("open", function(){
  var platform = os.platform();
  var chrome = platform === 'win32'?'chrome':'google-chrome';
  var browsers = [chrome,'safari','firefox'];
  browsers.forEach(function(mybrowser){
    var options = {
      url: "http://localhost:"+connectPort,
      app: mybrowser
    };
    console.log(options);
    gulp.src(rootApp+"/index.html")
      .pipe(open("", options));
  })
});

firefox safari open the tap but chrome doesn`t i do something wrong ?

my log returns :

[17:29:45] Server started http://localhost:9100
[17:29:45] LiveReload started on port 35729
{ url: 'http://localhost:9100', app: 'google-chrome' }
{ url: 'http://localhost:9100', app: 'safari' }
{ url: 'http://localhost:9100', app: 'firefox' }

Feature Request: options arguments

It would be really nice to be able to pass options arguments to the plugin

i.e.,

gulp.task('open-chrome', function(){
  var options = {
    uri: 'http://localhost:3000',
    app: 'chrome',
    options: '--open-fullscreen'
  };
  gulp.src(__filename)
  .pipe(open(options));
});

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.