
/*	========================================================================
 *
 *	GULPFILE configuration by Future Processing Design Team
 *
 *	======================================================================== */

'use strict';

module.exports = function() {

	var

	/*	----------------------------------------------------------------
	 *	FUNCTIONALITY CONFIGURATION
	 */

	// Saves uncompressed (unminified) files next to compressed ones
	// Accept values: true, false

		saveUncompressedCopies	= true,


	// Add source maps to JS & CSS files (function in development)
	// Accept values: true, false

		saveSourceMaps			= false,


	// Save all JS files concatenated (merged together) to one dist file (scripts.js)
	// Accept values: true, false

		saveJSConcatenated		= true,


	// Save all JS files separately in dist folder.
	// Accept values: true, false

		saveJSSeparately		= false,


	// Enable sound when an error occurs
	// Accept values: true, false
		errorHandlerBeep		= true,


	// Enable notify when an error occurs
	// Accept values: true, false

		errorHandlerNotify		= true,

	// Sound type when an error occurs
	// See: https://github.com/mikaelbr/node-notifier#all-notification-options-with-their-defaults

		errorHandlerNotifySound		= 'Sosumi',


	/*	----------------------------------------------------------------
	 *	AUTOPREFIXER
	 *  HOW TO USE: https://shp.future-processing.com/my/personal/mbobola/Blog/Lists/Posts/Post.aspx?ID=7
	 *  SETTINGS TEST: http://autoprefixer.github.io/
	 *  OPTIONS: https://github.com/postcss/autoprefixer#options
	 */

		compatibility = [
			'last 2 versions',
			'ie >= 9',
			'Android >= 2.3',
			'ios >= 7'
		],


	/*	----------------------------------------------------------------
	 *  DOMAIN
	 */

		domain = 'https://czarogrody.loc/',


	/*	----------------------------------------------------------------
	 *	BASE PATHS
	 */

		basePaths = {
			assets		: 'assets/',
			dist		: 'dist/',
			},


	/*	----------------------------------------------------------------
	*	PATHS
	*/

		paths = {

			assets: {
				scripts	: 'scripts/',
				styles	: 'styles/',
				images	: 'images/',
				video	: 'video/',
				fonts	: 'fonts/'
			},

			dist: {
				scripts	: 'scripts/',
				styles	: 'styles/',
				images	: 'images/',
				video	: 'video/',
				fonts	: 'fonts/'
			},

				dist_maintenance: {
				styles	: 'styles/',
				images	: 'images/',
				fonts	: 'fonts/'
			}
		},


		/*	----------------------------------------------------------------
	 *	FILE & EXTENSIONS LISTS
	 */

		// List of JS file names to compile.
		// Can be: '**/*.js' to compile all JS files basing on its names
		// or ['file1.js', 'file2.js', ...]

		jsFiles = {

		// JS loaded on the front-end
		front: [
			'node_modules/foundation-sites/dist/js/foundation.js',
			'node_modules/scroll-parallax/dist/Parallax.js',
			'node_modules/lightbox2/dist/js/lightbox.js',
			'node_modules/swiper/js/swiper.js',
			'node_modules/@fortawesome/fontawesome-free/js/all.js',
			basePaths.assets + paths.assets.scripts + 'custom.js'
		],

			// JS loaded on admin panel
			back: [
				basePaths.assets + paths.assets.scripts + '**/admin/admin.js'
			],

			// JS shouldn't be concated with other JS
			separated: [
				'node_modules/jquery/dist/jquery.js'
			]
		},


		// List of file extensions to filter files while moving them
		// from assets to dist. You can write list of extensions this way:
		// '{ext1,ext2,ext3...}' or just put '*' (don't use spaces)
		// Remember that this option is case sensitive.

		fileExtensions = {
			fonts		: '{ttf,otf,svg,woff,woff2,eot,TTF,OTF,SVG,WOFF,WOFF2,EOT}',
			images		: '{jpg,jpeg,png,gif,svg,JPG,JPEG,PNG,GIF,SVG}',
			video		: '{mp4,ogg,MP4,OGG}',
			watched		: '{php,PHP}'
		};


	// Return all configured variables. If you added new variable put it below.

	return {
		saveUncompressedCopies	: saveUncompressedCopies,
		saveSourceMaps			: saveSourceMaps,
		saveJSConcatenated		: saveJSConcatenated,
		saveJSSeparately		: saveJSSeparately,
		domain					: domain,
		basePaths				: basePaths,
		paths					: paths,
		jsFiles					: jsFiles,
		fileExtensions			: fileExtensions,
		compatibility			: compatibility,
		errorHandlerBeep		: errorHandlerBeep,
		errorHandlerNotify		: errorHandlerNotify,
		errorHandlerNotifySound	: errorHandlerNotifySound

	};
};
