diff --git a/build.php b/build.php
index 9ba3645..3dfb7a3 100644
--- a/build.php
+++ b/build.php
@@ -5,6 +5,12 @@
     exit(0);
 }
 
+/* Parameters: 
+ --no-composer      Does not install vendors. Just create the autoloader.
+ --cleanup          Remove removeables. 
+ --allow-gulp       Allow gulp to be used. 
+*/
+
 // Any command needed to run and build plugin assets when newly cheched out of repo.
 $buildCommands = [];
 
@@ -26,9 +32,11 @@
 }
 
 //Run build if package-lock.json is found
-if(file_exists('package-lock.json')) {
+if(file_exists('package-lock.json') && !file_exists('gulp.js')) {
     $buildCommands[] = 'npx --yes browserslist@latest --update-db';
     $buildCommands[] = 'npm run build';
+} elseif(file_exists('package-lock.json') && file_exists('gulp.js') && is_array($argv) && in_array('--allow-gulp', $argv)) {
+    $buildCommands[] = 'gulp';
 }
 
 // Files and directories not suitable for prod to be removed.
@@ -36,6 +44,7 @@
     '.git',
     '.gitignore',
     '.github',
+    '.gitattributes',
     'build.php',
     '.npmrc',
     'composer.json',
@@ -45,7 +54,14 @@
     'package-lock.json',
     'package.json',
     'phpunit.xml.dist',
-    'README.md'
+    'README.md',
+    'gulpfile.js',
+    './node_modules/',
+    './source/sass/',
+    './source/js/',
+    'LICENSE',
+    'babel.config.js',
+    'yarn.lock'
 ];
 
 $dirName = basename(dirname(__FILE__));
@@ -65,7 +81,7 @@
 }
 
 // Remove files and directories if '--cleanup' argument is supplied to save local developers from disasters.
-if (isset($argv[1]) && $argv[1] === '--cleanup') {
+if(is_array($argv) && in_array('--cleanup', $argv)) {
     foreach ($removables as $removable) {
         if (file_exists($removable)) {
             print "Removing $removable from $dirName\n";