Giter Club home page Giter Club logo

gulp-personium's Introduction

gulp-personium

Build Status Code Climate Coverage Status

This project is gulp plugin for personium.io client development.

Install

npm install --save-dev gulp-personium

Usage

Options

Set below options in constructor.

baseUrl (required)

Base URL to upload file.

baseDir (required)

Base directory to upload file.

Upload URL = baseUrl + '/' + baseDir + relative path from baseDir

token (optional)

Request token (not contains 'Bearer').

user (optional)

Account name for Basic authentication.
If either user property and token property are appointed, ignore user property.
So request to personium.io with 'Bearer' authentication scheme.

password (optional)

Password for Basic authentication.

Support extension

This plugins support below extensions.

  • js
  • html
  • css

Sample

Upload WebDAV files.

Upload WebDAV files to WebDAV corrections.
Note that you must create WebDAV corrections in advance.

var gulp = require('gulp');
var Personium = require('gulp-personium');
var personium = new Personium({
  baseUrl: 'http://fqdn/todo-app',
  baseDir: 'app',
  token : 'masterToken'
});

gulp.task('upload', function() {
  gulp.src(['app/**/*.html', 'app/**/*.js', 'app/**/*.css'])
    .pipe(personium.upload());
});

gulp.task('default', ['upload']);

Upload WebDAV files and send a change notification for LiveReload.

Upload WebDAV files to WebDAV corrections when watching files are changed.
Note that you must create WebDAV correction in advance.

var gulp = require('gulp');
var Personium = require('gulp-personium');
var livereload = require('gulp-livereload');
var personium = new Personium({
  baseUrl: 'http://fqdn/todo-app',
  baseDir: 'app',
  token : 'masterToken'
});
var source = ['app/**/*.html', 'app/**/*.js', 'app/**/*.css'];


gulp.task('upload', function() {
  gulp.src(source)
    .pipe(personium.upload());
});

gulp.task('watch', ['upload'], function() {
  livereload.listen();

  gulp.watch(source)
    .on('change', function(event) {
      personium.upload(event, livereload.changed);
    });
});

gulp.task('default', ['watch']);

Basic authentication.

Setup for Basic authentication.

var Personium = require('gulp-personium');
var personium = new Personium({
  baseUrl: 'http://fqdn/dc1-core/todo-app',
  baseDir: 'app',
  user : 'account name',
  password: 'password'
});

gulp-personium's People

Contributors

m-tajima avatar mid0111 avatar

Stargazers

 avatar

Watchers

 avatar  avatar

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.