Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
src
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

rdela.com

Repo background & history:

Credits

rdela.com/credits

Deployment

Netlify / ENV vars

netlify.toml

[build]
  command = "gatsby build"
  publish = "public"

[build.environment]
  NODE_ENV = "production"
  NODE_VERSION = "--lts"
  NPM_VERSION = "[X.X.X]"
  RUBY_VERSION = "default"
  YARN_FLAGS = "--no-ignore-optional"
  YARN_VERSION = "[X.X.X]"

See current NPM_VERSION or YARN_VERSION.

Netlify TOML reference

Netlify > Continuous Deployment > Deploy Contexts

To configure deploy contexts, you must create a file called netlify.toml in the base of your Git repository.

Netlify > Continuous Deployment > Set Node, Ruby, or Python version

Set a NODE_VERSION environment variable.

The value inside can be anything you would use with nvm.

Node Version Manager

NVM > Usage

In place of a version pointer like "0.10" or "5.0" or "4.2.1", you can use the following special default aliases

node: this installs the latest version of node

NVM > .nvmrc

For example, to make nvm default to the latest 5.9 release, the latest LTS version, or the latest node version for the current directory:

echo "5.9" > .nvmrc

echo "lts/*" > .nvmrc # to default to the latest LTS version

echo "node" > .nvmrc # to default to the latest version

NPM_VERSION

Netlify Build Image > Tools

  • Version corresponding with Node.js version. (default)
  • Any version available via NPM.

RUBY_VERSION = "default"

There to appease quirk that begat this lag/error I was seeing in deploy logs:

# Attempting ruby version 2.2.3, read from environment
# ** WARNING **
# Using custom ruby version 2.2.3, this will slow down the build.
# To ensure fast builds, set the RUBY_VERSION environment variable,
# or .ruby-version file, to an included ruby version.
# Included versions: 2.2.9 2.4.3 2.3.6
Netlify > Continuous Deployment > Set Node, Ruby, or Python version

We support any released version of Ruby that rvm understands.

RVM > Switching between ruby versions
  • default - default ruby (or the system ruby if a default hasn't been set)
  • system - system ruby (state before RVM was installed)

YARN_FLAGS + YARN_VERSION

See these commits on the Gatsby Netlify CMS starter.

Update netlify.toml
Add "--no-ignore-optional" for netlify

Further Reading on Netlify Deployment and ENV vars

Netlify Blog > Introducing Deploy Previews in Netlify
Netlify Blog > Introducing Deploy Contexts in Netlify

License

npm Docs > package.json > license

You should specify a license for your package so that people know how they are permitted to use it, and any restrictions you're placing on it.

If you are using a license that hasn't been assigned an SPDX identifier, or if you are using a custom license, use a string value like this one:

{ "license" : "SEE LICENSE IN <filename>" }

OpenBSD license in license.txt

Consider also setting "private": true to prevent accidental publication.

package.json#L6-L7

{
  "license": "SEE LICENSE IN license.txt",
  "private": true
}