cross-env - 🔀 Cross platform setting of environment scripts

  •        33

Most Windows command prompts will choke when you set environment variables with NODE_ENV=production like that. (The exception is Bash on Windows, which uses native Bash.) Similarly, there's a difference in how windows and POSIX commands utilize environment variables. With POSIX, you use: $ENV_VAR and on windows you use %ENV_VAR%.cross-env makes it so you can have a single command without worrying about setting or using the environment variable properly for the platform. Just set it like you would if it's running on a POSIX system, and cross-env will take care of setting it properly.

https://github.com/kentcdodds/cross-env#readme
https://github.com/kentcdodds/cross-env

Dependencies:

cross-spawn : ^5.1.0
is-windows : ^1.0.0

Tags
Implementation
License
Platform

   




Related Projects

react-redux-realworld-example-app - Exemplary real world application built with React + Redux

  •    Javascript

Originally created for this GH issue. The codebase is now feature complete; please submit bug fixes via pull requests & feedback via issues.Local web server will use port 4100 instead of standard React's port 3000 to prevent conflicts with some backends like Node or Rails. You can configure port in scripts section of package.json: we use cross-env to set environment variable PORT for React scripts, this is Windows-compatible way of setting environment variables.

cash - Cross-platform Linux commands in ES6

  •    Javascript

Cash is a cross-platform implementation of Unix shell commands written in straight ES6. No native compiling and no external dependencies.While young, Cash aims to offer an alternative Linux feel on Windows and to open the door to cross-platform bash scripting in a Javascript environment.

godotenv - A Go port of Ruby's dotenv library (Loads environment variables from `.env`.)

  •    Go

Storing configuration in the environment is one of the tenets of a twelve-factor app. Anything that is likely to change between deployment environments–such as resource handles for databases or credentials for external services–should be extracted from the code into environment variables. But it is not always practical to set environment variables on development machines or continuous integration servers where multiple projects are run. Dotenv load variables from a .env file into ENV when the environment is bootstrapped.

dotenv - Loads environment variables from .env for nodejs projects.

  •    Javascript

Dotenv is a zero-dependency module that loads environment variables from a .env file into process.env. Storing configuration in the environment separate from code is based on The Twelve-Factor App methodology.As early as possible in your application, require and configure dotenv.


dotenv - A Ruby gem to load environment variables from `.env`.

  •    Ruby

Shim to load environment variables from .env into ENV in development. Storing configuration in the environment is one of the tenets of a twelve-factor app. Anything that is likely to change between deployment environments–such as resource handles for databases or credentials for external services–should be extracted from the code into environment variables.

WiX.Py - Cross-platform JSON-driven MSI package builder

  •    Python

Cross-platform JSON-driven MSI package builder. Unlike a bunch of WiX/wixl wrappers (python-wix, go-msi, msi-packager etc.) WiX.Py is a standalone application. It uses libmsi on UNIX platforms and msi.dll on MS Windows. Application has been designed for build toolchains under Docker environment, i.e. it doesn't depend on windowing system or networking features. Thus it allows building MSI packages in CI services without dedicated MSW cloud instance. This one decreases project infrastructure cost and speed-ups builds.

Calico: a multi-language, cross-platform programming environment

  •    

Calico is a multi-language, cross-platform programming environment for beginners and experts. Supports Python and Ruby languages, with more coming.

Ripple-UI - Ripple UI is a cross-platform, mobile web application emulation environment.

  •    Javascript

Ripple UI is a cross-platform, mobile web application emulation environment.

WeFlow - A web developer workflow tool by WeChat team based on tmt-workflow, with cross-platform supported and environment ready

  •    Javascript

A web developer workflow tool by WeChat team based on tmt-workflow, with cross-platform supported and environment ready.

lambdanative - LambdaNative is a cross-platform development environment written in Scheme, supporting Android, iOS, BlackBerry 10, OS X, Linux, Windows, OpenBSD, NetBSD, FreeBSD and OpenWrt

  •    Scheme

LambdaNative is an open-source (BSD licensed) cross-platform development environment written in Scheme (Gambit-C), supporting Android, iOS, BlackBerry 10, OS X, Linux, Windows, OpenBSD, NetBSD, FreeBSD and OpenWrt. If you use the LambdaNative framework for your own work, please reference this ICFP paper. A slideshow describing the LambdaNative framework is available here.

lumo - Fast, cross-platform, standalone ClojureScript environment

  •    Clojure

Lumo is a standalone ClojureScript environment that runs on Node.js and the V8 JavaScript engine. It starts up instantaneously and has out-of-the-box access to the entire Node.js ecosystem. Lumo also provides a ClojureScript build API, making it possible to compile ClojureScript projects entirely without the JVM, thanks to the experimental JavaScript version of the Google Closure Compiler.

CodeLite - Cross Platform IDE for C/C++

  •    C

CodeLite is an open source, free, cross platform IDE for the C/C++ programming languages which runs on all major Platforms. It has generic support for compilers with built-in support for GCC/clang/VC++, GDB Support, Refactoring, Code Navigation, Source Control Plugins, RAD Tool for wxWidgets, Code Completion and lot more.

dotenv-safe - Load environment variables from .env and ensure they are all present

  •    Javascript

Identical to dotenv, but ensures that all necessary environment variables are defined after reading from .env. These needed variables are read from .env.example, which should be commited along with your project. If all the required variables were successfully read but an error was thrown when trying to read the .env file, the error will be included in the result object under the error key.

CommAI-env - A platform for developing AI systems as described in A Roadmap towards Machine Intelligence - http://arxiv

  •    Python

CommAI-env (Environment for Communication-based AI) is an experimental platform for training and evaluating AI systems as described in A Roadmap towards Machine Intelligence. CommAI-env is a platform for training and testing an AI system, the Learner (coded in an arbitrary language of the system developer's choice), in a communication-based setup where it interacts via a bit-level interface with an Environment. The Environment asks the Learner to solve a number of communication-based Tasks, and assigns it a Reward for each task instance it successfully completes.

AirSim - Open source simulator based on Unreal Engine for autonomous vehicles from Microsoft AI & Research

  •    C++

AirSim is a simulator for drones (and soon other vehicles) built on Unreal Engine. It is open-source, cross platform and supports hardware-in-loop with popular flight controllers such as PX4 for physically and visually realistic simulations. It is developed as an Unreal plugin that can simply be dropped in to any Unreal environment you want.

CodenameOne - Write once run anywhere native mobile apps using with Java 8 or Kotlin

  •    Java

Codename One is a mobile cross platform environment for Java and Kotlin developers. It can compile Java bytecode to native OS executables (iOS, Android, UWP etc.). It is a complete mobile platform featuring virtual machines, simulator, design tools (visual theme/builder), IDE integrations, ports to multiple OS's and much more. It provides full access to the underlying native OS code (e.g. Objective-C, C#, Dalvik/ART) thru a portable abstraction which enables 100% code reuse.Codename One is the only platform that...

BVRDE

  •    C

The BVRDE is a fully integrated development environment (IDE) for remote cross-platform compiling and debugging of UNIX and LINUX console applications. BVRDE runs on a Windows platform, but compiles and debugs applications on UNIX systems.

gideros - Gideros Release version

  •    C

Gideros is a cross-platform mobile development environment for creating amazing games. In a couple of hours, you’ll find yourself building and running your next great game. Developers trust Gideros in building 1000s of games across AppStore, Google Play, Amazon Store, Ouya and more. Lua is used to build games with Gideros. Below you can find a few simple examples to show how easy to show basic screen elemens.

Expo - Easily build cross platform apps with React Native

  •    Objective-C

Expo helps to build apps with React Native. It is a set of tools, libraries and services which let you build native iOS and Android apps by writing JavaScript. Expo apps are React Native apps which contain the Expo SDK. The SDK is a native-and-JS library which provides access to the device’s system functionality (things like the camera, contacts, local storage, and other hardware).