Skip to content
Jayson Harshbarger edited this page Nov 18, 2016 · 2 revisions

Project X uses gulp as a task running.

Gulp Tasks

  • gulp dev, run development server (building is not required)
  • gulp build, build into the dist directory
  • gulp dist, build and run server from dist directory
  • gulp deploy, build and push to gh-pages
  • gulp dev-electron, run development server, open in electron
  • gulp dist-electron, build and run server from dist directory, open in electron
  • gulp build-electron, build into the dist directory, then build electron app

Separation of template and dataset

By default all content in the app directory will be served by the development server when running gulp dev and built into the dist folder when running gulp build. However, to encourage contribution back to the project-χ repository and enable using the same project-χ source across multiple projects the developer may put project specific resources and configuration into a separate directory. This folder can then be served and built along with the project-χ core. For example, if you create an extra folder inside the dataset directory the following commands will work as indicated:

  • gulp dev --dataset=./dataset/extra

    runs the development server, serving the combination of the app directory and dataset/extra directories as the web root. Files in dataset/extra/app override app and dataset/extra/gulp/config.js augments (deep-extends) gulp/config.js. If no dataset is given ./dataset/example is assumed. Note that the dataset path as a file system path relative to the current working directory.

  • The gulp build, gulp dist, gulp deploy all work similarly.