Commit a28f90ba authored by Rene Saarsoo's avatar Rene Saarsoo
Browse files

Make JavaScript input files not mandatory.

JS files not needed if --welcome, --guides, --videos or --examples
options provided.

Also hide the classes tab and page in this case.
parent 8babd9a2
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -364,7 +364,7 @@ module JsDuck

    # Runs checks on the options
    def validate
      if @input_files.length == 0
      if @input_files.length == 0 && !@welcome && !@guides && !@videos && !@examples
        puts "You should specify some input files, otherwise there's nothing I can do :("
        exit(1)
      elsif @export != :stdout
+2 −2
Original line number Diff line number Diff line
@@ -28,10 +28,10 @@ Ext.define('Docs.view.cls.Index', {
    },

    /**
     * Returns tab config for classes page.
     * Returns tab config for classes page if at least one class.
     * @return {Object}
     */
    getTab: function() {
        return {cls: 'classes', href: '#!/api', tooltip: 'API Documentation'};
        return Docs.data.classes.length > 0 ? {cls: 'classes', href: '#!/api', tooltip: 'API Documentation'} : false;
    }
});