id = "nativescript" name = "NativeScript CLI" homepage = "https://nativescript.org" description = "NativeScript CLI - command-line tools." icon = "SimpleIcons:nativescript" executables = ["ns", "tns", "nativescript"] [dotfiles] # The binary is `ns` (`tns` and `nativescript` are the older names for the same # tool), so the id is the project's name rather than the two-letter command. # # lib/common/services/settings-service.ts builds the profile directory as # process.env.AppData on Windows and path.join(homedir(), ".local", "share") # everywhere else — macOS included — and lib/config.ts sets # PROFILE_DIR_NAME = ".nativescript-cli". lib/services/user-settings-service.ts # joins "user-settings.json" onto it. The rest of that directory is cache and # logs, and nsconfig.json / nativescript.config.ts live in the project. # # Both spellings stay literal. Not [dataHome], whose macOS form is # ~/Library/Application Support; not [xdgData] either, because that name means # $XDG_DATA_HOME with ~/.local/share as its default, and settings-service.ts # joins homedir() with ".local/share" unconditionally — it never reads the # variable, so a machine that sets it would take the placeholder somewhere the # CLI does not write. No base directory pairs a dotted Unix path with # %APPDATA%. paths = [ "~/.local/share/.nativescript-cli/user-settings.json", "%APPDATA%/.nativescript-cli/user-settings.json", ] exclude = [] secret = [] # lib/config.ts: # ANALYTICS_INSTALLATION_ID_SETTING_NAME = "AnalyticsInstallationID" # It identifies this installation of the CLI, so it must stay on the machine # that generated it; the analytics opt-in flags beside it (TrackFeatureUsage, # TrackExceptions) are a preference and travel. Both spellings are named, or # the rule never runs on Windows. [[dotfiles.machine_lines]] file = [ "~/.local/share/.nativescript-cli/user-settings.json", "%APPDATA%/.nativescript-cli/user-settings.json", ] match = { key_path = ["AnalyticsInstallationID"] } [commands] format = 1 label = "NativeScript CLI" description = "Create, build and run NativeScript apps. Use the tabs for create, build and run; plugins, debugging and tests are left out." quality = "ai-draft" base = "fig:ns" parser = { end_of_options = "--", interleave = "permute", long_equals = true, short_attached = true, short_bundles = false } [[commands.source]] id = "fig" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/ns.ts" license = "MIT" [[commands.subcommand]] path = ["create"] label = "Create a project" description = "Create a new NativeScript project." parser = { end_of_options = "--", interleave = "permute", long_equals = true, short_attached = true, short_bundles = false } [[commands.subcommand.source]] id = "fig" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/ns.ts" license = "MIT" [[commands.subcommand.field]] id = "name" label = "Application name" type = "string" position = 0 sources = ["fig"] [[commands.subcommand.field]] id = "template" label = "Template" type = "string" option = ["--template"] sources = ["fig"] [[commands.subcommand.field]] id = "angular" label = "Angular template" type = "boolean" option = ["--angular"] sources = ["fig"] [[commands.subcommand.field]] id = "react" label = "React template" type = "boolean" option = ["--react"] sources = ["fig"] [[commands.subcommand.field]] id = "vue" label = "Vue template" type = "boolean" option = ["--vue"] sources = ["fig"] [[commands.subcommand.field]] id = "svelte" label = "Svelte template" type = "boolean" option = ["--svelte"] sources = ["fig"] [[commands.subcommand.field]] id = "typescript" label = "Plain TypeScript" type = "boolean" option = ["--typescript"] sources = ["fig"] [[commands.subcommand.field]] id = "javascript" label = "Plain JavaScript" type = "boolean" option = ["--javascript"] sources = ["fig"] [[commands.subcommand.field]] id = "path" label = "Directory" type = "path" option = ["--path"] path = { kind = "directory", role = "output" } sources = ["fig"] [[commands.subcommand.field]] id = "appid" label = "Application identifier" type = "string" option = ["--appid"] sources = ["fig"] [[commands.subcommand.task]] id = "create" label = "Create" fields = ["name", "appid"] required = ["name"] [[commands.subcommand.task]] id = "vue" label = "Create a Vue project" fields = ["name", "vue"] required = ["name"] set = { vue = [true] } [[commands.subcommand.group]] id = "basic" label = "Basic" fields = ["name", "template", "angular", "react", "vue", "svelte", "typescript", "javascript"] [[commands.subcommand.group]] id = "advanced" label = "Advanced" fields = ["path", "appid"] [[commands.subcommand]] path = ["build"] label = "Build the project" description = "Build the project. Pick a platform on the command line (android or ios); the form builds with the default." parser = { end_of_options = "--", interleave = "permute", long_equals = true, short_attached = true, short_bundles = false } [[commands.subcommand.source]] id = "fig" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/ns.ts" license = "MIT" [[commands.subcommand.field]] id = "release" label = "Release build" type = "boolean" option = ["--release"] sources = ["fig"] [[commands.subcommand.field]] id = "clean" label = "Rebuild native application" type = "boolean" option = ["--clean"] sources = ["fig"] [[commands.subcommand.field]] id = "force" label = "Skip compatibility checks" type = "boolean" option = ["--force"] sources = ["fig"] [[commands.subcommand.field]] id = "hmr" label = "Hot module replacement" type = "boolean" option = ["--hmr"] sources = ["fig"] [[commands.subcommand.field]] id = "copy_to" label = "Copy built package to" type = "path" option = ["--copy-to"] path = { kind = "any", role = "output" } sources = ["fig"] [[commands.subcommand.field]] id = "device" label = "Device ID" type = "string" option = ["--device"] sources = ["fig"] [[commands.subcommand.task]] id = "release" label = "Release build" fields = ["release", "clean"] required = ["release"] set = { release = [true] } [[commands.subcommand.group]] id = "basic" label = "Basic" fields = ["release", "clean", "force", "hmr", "copy_to", "device"] [[commands.subcommand]] path = ["run"] label = "Run the project" description = "Run on connected devices or emulators." parser = { end_of_options = "--", interleave = "permute", long_equals = true, short_attached = true, short_bundles = false } [[commands.subcommand.source]] id = "fig" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/ns.ts" license = "MIT" [[commands.subcommand.field]] id = "device" label = "Device ID" type = "string" option = ["--device"] sources = ["fig"] [[commands.subcommand.field]] id = "emulator" label = "Use an emulator" type = "boolean" option = ["--emulator"] sources = ["fig"] [[commands.subcommand.field]] id = "release" label = "Release build" type = "boolean" option = ["--release"] sources = ["fig"] [[commands.subcommand.field]] id = "clean" label = "Rebuild native application" type = "boolean" option = ["--clean"] sources = ["fig"] [[commands.subcommand.field]] id = "no_hmr" label = "Disable hot module replacement" type = "boolean" option = ["--no-hmr"] sources = ["fig"] [[commands.subcommand.field]] id = "justlaunch" label = "Do not print app output" type = "boolean" option = ["--justlaunch"] sources = ["fig"] [[commands.subcommand.field]] id = "bundle" label = "Bundle the application" type = "boolean" option = ["--bundle"] sources = ["fig"] [[commands.subcommand.task]] id = "run" label = "Run" fields = ["device", "emulator"] required = [] [[commands.subcommand.group]] id = "basic" label = "Basic" fields = ["device", "emulator", "release", "clean", "no_hmr", "justlaunch", "bundle"]