Skip to content

Instantly share code, notes, and snippets.

@naoyashiga
Created February 24, 2016 11:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save naoyashiga/1f32f5bbc161c315691a to your computer and use it in GitHub Desktop.
Save naoyashiga/1f32f5bbc161c315691a to your computer and use it in GitHub Desktop.
MyFirst p5.js env
var gulp = require('gulp'),

sass = require('gulp-ruby-sass')

notify = require("gulp-notify")

webserver = require('gulp-webserver');
gulp.task('server', function() {
gulp.src('./')
.pipe(webserver({
livereload: true,
port: 8001,
fallback: 'index.html',
open: true
}));
});
// Rerun the task when a file changes

gulp.task('watch', function() {

 gulp.watch('script.js', ['']);

});


gulp.task('default', ['watch','server']);
<html>
<head>
<script src="http://cdnjs.cloudflare.com/ajax/libs/p5.js/0.4.22/p5.js"></script>
<script src="script.js"> </script>
</head>
<body>
</body>
</html>
function setup() {
}
function draw() {
ellipse(50, 50, 80, 80);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment