Vousk-prod 5649ac7f98 updating gulpfile 10 years ago
..
.gitignore 4b41b80f1d Add Gulp for buiding babylon cross platform 11 years ago
gulp-shaders.js 8c887847b2 #258 Gulp build strips out the first character in all shaders 11 years ago
gulpfile.js 5649ac7f98 updating gulpfile 10 years ago
package.json a7d3e64732 Updating gulp to tsc 1.4.0 10 years ago
readme.md 3e4b214a88 gulp instruction - minor fix 10 years ago

readme.md

Build Babylon.js with Gulp

Build Babylon.js with gulp and npm (nodejs), easy and cross-platform

(Paths in this file are relative to this file location.)

How to use it

First install gulp :

npm install -g gulp

Install some dependencies :

npm install

Update dependencies if necessary :

npm update

Update gulpfile.js (task scripts) if you want to add your own files:

/**
 * Concat all js files in order into one big js file and minify it.
 * The list is based on https://github.com/BabylonJS/Babylon.js/wiki/Creating-the-minified-version
 * Do not hesistate to update it if you need to add your own files.
 */
gulp.task('scripts', ['shaders'] ,function() {
return gulp.src([
      '../../Babylon/Math/babylon.math.js',
      '../../Babylon/Math/babylon.axis.js',

      ....

From the javascript source

Build Babylon.js from the javascript files:

gulp

Will be generated :

  • build/babylon.js
  • build/babylon.min.js

Build Babylon.js when you save a javascript file:

gulp watch

From the typescript source

Build Babylon.js from the typescript files:

gulp typescript

Will be generated :

  • build/babylon.js
  • build/babylon.d.ts
  • build/babylon.min.js

Be aware that all js files content will be overwrite.

Build Babylon.js when you save a typescript file:

gulp watch-typescript

Compile all the typscript files to their javascript respective files

gulp typescript-to-js

Be aware that all js files content will be overwrite.

Build the typescript declaration file

gulp typescript-declaration