Skip to content
This repository was archived by the owner on Sep 15, 2019. It is now read-only.

buildFileSys

tones31 edited this page Oct 17, 2016 · 1 revision

A convenient way to create objects that reflect the file system paths of your project. This can make accessing your source and build files through the build script much eaiser.

Example

This will build up an object containing all source paths (not files) for a project.

var src = {};
src.root = 'C:/web/project/';
buildFileSys(src, 'assets');

buildFileSys will add assets as a property of src and automatically add five predefined paths. The resulting object is:

src.assets = {
   js : 'C:/web/project/assets/js/',
   css : 'C:/web/project/assets/css/',
   fonts : 'C:/web/project/assets/fonts/',
   html : 'C:/web/project/assets/html/',
   img : 'C:/web/project/assets/img/'
};

You can also add exta paths as a last argument.

buildFileSys(src, 'myApp', {docs : 'docs/'});

Clone this wiki locally