# gulp-devtools-live

> Gulp plugin to run a Server with Live Edition and Live Reload with Devtools Live

Latest version **0.1.9** (published 2017-03-30) · MIT license · 0 weekly downloads

## Install

```sh
npm install gulp-devtools-live
pnpm add gulp-devtools-live
yarn add gulp-devtools-live
bun add gulp-devtools-live
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.9 |
| Published | 2017-03-30 |
| First published | 2016-02-18 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=0.10.0 |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Maintainers | steed |
| Keywords | gulpfriendly, live, liveedit, livereload, webserver, hot, reload, server |

## Links

- npm: https://www.npmjs.com/package/gulp-devtools-live
- Repository: https://github.com/StudioLabs/gulp-devtools-live
- Homepage: https://github.com/StudioLabs/gulp-devtools-live#readme
- Issues: https://github.com/StudioLabs/gulp-devtools-live/issues
- npm.io page: https://npm.io/package/gulp-devtools-live

## Dependencies (1)

- [devtools-live](https://npm.io/package/devtools-live.md) ^0.2.2

## Recent versions

- 0.1.9 (latest) — 2017-03-30
- 0.1.8 — 2017-03-28
- 0.1.7 — 2016-05-31
- 0.1.6 — 2016-05-31
- 0.1.5 — 2016-04-29
- 0.1.3 — 2016-03-19
- 0.1.2 — 2016-02-18
- 0.1.1 — 2016-02-18

## README

> Gulp plugin to run a webserver (with LiveReload)


## Install

```
npm install --save-dev gulp-live
```

## Usage

```js
module.exports = function($, gulp, config) {

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

    //var handlebars = require('handlebars');

    var css  = require('./css')($, gulp, config);

    return {
        server: function() {
            process.env.PORT = 3000;
            process.env.ROOT = config.path.build.client;

            require(config.path.root + '/src/server');

            return live.open('http://localhost:' + process.env.PORT);
        },
        connect: function() {
            return live.connect({
                port:3000,
                open: true,
                root: config.path.build.client
            });
        },
        devtools: function() {
            return live.devtools({
                src: './src/client/',
                dest: config.path.build.client,
                port:8888,
                debug:true,
                verbose:true,
                resolve: {
                    '.js': {
                        resolver: 'browserify',
                        map: config.path.build.client + '/src'
                    },
                    '.scss': {
                        resolver: 'sass',
                        cmd: css.live.edit,
                        map: config.path.build.client + '/sass'
                    },

                    // '.ect': {
                    //     resolver: 'ect',
                    //     data: config
                    // }
                }
            });

        },
        watch: function() {

            config.isWatching = true;
            console.log('start watching :');
            console.log(config.path.src.js.files);
            console.log(config.path.src.sass.files);
            console.log(config.path.src.client);

            // gulp.watch(config.path.src.js.files).on('change', [live.edit]);
            // gulp.watch(config.path.src.sass.files).on('change', live.edit);
            // gulp.watch(config.path.src.client).on('change', live.edit);

            gulp.watch(config.path.src.js.files, ['reload:js']);
            gulp.watch(config.path.src.sass.files, ['reload:css']);
            gulp.watch(config.path.src.client, ['reload:index']);
        },
        reload: function() {
            return live.reload();
        }
    };
};


```

---
_Source: https://npm.io/package/gulp-devtools-live · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
