forked from fbsamples/fbinstant-samples
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgulpfile.js
32 lines (27 loc) · 956 Bytes
/
gulpfile.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/**
Copyright (c) Facebook, Inc. and its affiliates.
All rights reserved.
This source code is licensed under the license found in the
LICENSE file in the root directory of this source tree.
*/
'use strict';
const gulp = require('gulp');
const minimist = require('minimist');
const fs = require('fs');
const path = require('path');
const uuid = require('uuid/v1');
const TASKS_FOLDER = 'tasks';
const config = require('./config.json');
const commandLineOptions = {
string: ['project', 'zip'],
default: {project: 'hello-world', 'zip': uuid() + '.zip'},
alias: {'project': 'p', 'zip': 'z'}
};
var providedArguments = minimist(process.argv.slice(2), commandLineOptions);
function importAllTasks () {
const taskNames = ["clean", "common", "make", "replace-sdk", "archive", "run-dist", "run-mock", "upload"];
taskNames.forEach(taskName =>
require('./' + TASKS_FOLDER + '/' + taskName)(gulp, config, providedArguments)
);
}
importAllTasks();