001 /* 002 * Copyright 2010-2013 JetBrains s.r.o. 003 * 004 * Licensed under the Apache License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.apache.org/licenses/LICENSE-2.0 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 */ 016 017 package org.jetbrains.jet.cli.common.arguments; 018 019 import com.sampullara.cli.Argument; 020 import org.jetbrains.annotations.Nullable; 021 022 import static org.jetbrains.jet.cli.common.arguments.K2JsArgumentConstants.CALL; 023 import static org.jetbrains.jet.cli.common.arguments.K2JsArgumentConstants.NO_CALL; 024 025 /** 026 * NOTE: for now K2JSCompiler supports only minimal amount of parameters required to launch it from the plugin. 027 */ 028 public class K2JSCompilerArguments extends CommonCompilerArguments { 029 @Argument(value = "output", description = "Output file path") 030 public String outputFile; 031 032 @Argument(value = "libraryFiles", description = "Path to zipped lib sources or kotlin files") 033 public String[] libraryFiles; 034 035 @Argument(value = "sourceFiles", description = "Source files (dir or file)") 036 public String[] sourceFiles; 037 038 @Argument(value = "sourcemap", description = "Generate SourceMap") 039 public boolean sourcemap; 040 041 @Argument(value = "target", description = "Generate js files for specific ECMA version (now support only ECMA 5)") 042 public String target; 043 044 @Nullable 045 @Argument(value = "main", description = "Whether a main function should be called; either '" + CALL + 046 "' or '" + NO_CALL + "', default '" + CALL + "' (main function will be auto detected)") 047 public String main; 048 049 @Argument(value = "outputPrefix", description = "Path to file which will be added to the begin of output file") 050 public String outputPrefix; 051 052 @Argument(value = "outputPostfix", description = "Path to file which will be added to the end of output file") 053 public String outputPostfix; 054 }