New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

@nthachus/react-native-init

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nthachus/react-native-init

Bundle React Native CLI into a command line tool to create React Native apps

latest
Source
npmnpm
Version
11.1.3
Version published
Maintainers
1
Created
Source

React Native app creating CLI

React Native projects initializing CLI, that has been extracted from the official @react-native-community/cli package.

This CLI is independent of react-native and @react-native-community/cli, it just process React Native templates only.

Usage (with npx)

npx react-native-init [options] <projectName>

Initialize a new React Native project named <projectName> in a directory of the same name.

If you have both yarn and npm installed, this CLI will always try to use yarn. You can force usage of npm by adding --npm flag to the command.

Options

--version <string>

Shortcut for --template react-native@version.

--directory <string>

Uses a custom directory instead of <projectName>.

--title <string>

Uses a custom app title instead of <projectName>.

--package-name <string>

Create project with custom package name for Android and bundle identifier for iOS. The correct package name should:

  • Contain at least two segments separated by dots, e.g. com.example
  • Contain only alphanumeric characters and dots

--skip-install

Skip dependencies installation

--npm

Force use of npm during initialization

--template <string>

Uses a custom template. It should point to a valid package that can be installed with yarn or npm.

The most common options are:

  • Full npm package name
  • Absolute path to directory containing template
  • Absolute path to a package tarball created using npm pack
  • Link to a GitHub repository (supports username/repo#branch format)

Example:

npx react-native-init MyApp --template react-native-template-typescript@6.12.10
npx react-native-init MyApp --template file:///Users/name/template-path
npx react-native-init MyApp --template file:///Users/name/template-name-1.0.0.tgz
npx react-native-init MyApp --template thachnn/react-native-template#v0.71.4

A template is any directory or npm package that contains a template.config.js file in the root:

module.exports = {
  // Placeholder used to rename and replace in files package.json, index.json, android/, ios/
  placeholderName: 'ProjectName',
  // Placeholder used to rename app title inside values.xml and Info.plist
  titlePlaceholder: 'Project Display Name',
  // Directory with the template which will be copied and processed by this CLI
  templateDir: './template',
  // Path to script, which will be executed after initialization process
  postInitScript: './script.js',
};

You can find example custom template here.

License

Everything inside this repository is MIT licensed.

FAQs

Package last updated on 25 Apr 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts