-
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
v5.0.0 - boundation, changelog, version bump
- Loading branch information
Showing
12 changed files
with
1,369 additions
and
912 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,25 @@ | ||
version: ~> 1.0 | ||
sudo: false | ||
language: node_js | ||
node_js: | ||
- '8' | ||
- '10' | ||
- '12' | ||
- '10' | ||
- '12' | ||
matrix: | ||
fast_finish: true | ||
allow_failures: [] | ||
cache: npm | ||
install: | ||
- eval "$(curl -fsSL https://raw.githubusercontent.com/bevry/awesome-travis/c91c9d5eef34ecb0e92029667fd5052640225fa3/scripts/node-install.bash)" | ||
- >- | ||
eval "$(curl -fsSL | ||
https://raw.githubusercontent.com/bevry/awesome-travis/c91c9d5eef34ecb0e92029667fd5052640225fa3/scripts/node-install.bash)" | ||
before_script: | ||
- eval "$(curl -fsSL https://raw.githubusercontent.com/bevry/awesome-travis/c91c9d5eef34ecb0e92029667fd5052640225fa3/scripts/node-verify.bash)" | ||
- >- | ||
eval "$(curl -fsSL | ||
https://raw.githubusercontent.com/bevry/awesome-travis/c91c9d5eef34ecb0e92029667fd5052640225fa3/scripts/node-verify.bash)" | ||
after_success: | ||
- eval "$(curl -fsSL https://raw.githubusercontent.com/bevry/awesome-travis/c91c9d5eef34ecb0e92029667fd5052640225fa3/scripts/surge.bash)" | ||
- eval "$(curl -fsSL https://raw.githubusercontent.com/bevry/awesome-travis/c91c9d5eef34ecb0e92029667fd5052640225fa3/scripts/node-publish.bash)" | ||
notifications: | ||
email: | ||
recipients: | ||
secure: LpxzjIq7b3LhLJTJjkfMZ1RUz7Ks2MwrLDE/CmAyeUiafvc7VN0IjhrUWHbObE4FqXYl/cgL0nvdfaCmM5joSYRumDpXcdQYk6im1Q86beu5XPJfJFjU6c2890mBiRUyOUQx05Y5E98NjZzkkFEyW41e60j6KIwa1703UASBOkw= | ||
- >- | ||
eval "$(curl -fsSL | ||
https://raw.githubusercontent.com/bevry/awesome-travis/c91c9d5eef34ecb0e92029667fd5052640225fa3/scripts/surge.bash)" | ||
- >- | ||
eval "$(curl -fsSL | ||
https://raw.githubusercontent.com/bevry/awesome-travis/c91c9d5eef34ecb0e92029667fd5052640225fa3/scripts/node-publish.bash)" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -46,50 +46,9 @@ d : 4 | |
|
||
They are commonly also called envfiles, .env files, and dotenv files. | ||
|
||
<!-- INSTALL/ --> | ||
|
||
<h2>Install</h2> | ||
|
||
<a href="https://npmjs.com" title="npm is a package manager for javascript"><h3>npm</h3></a> | ||
<ul> | ||
<li>Install: <code>npm install --save envfile</code></li> | ||
<li>Require: <code>require('envfile')</code></li> | ||
</ul> | ||
|
||
<a href="https://jspm.io" title="Native ES Modules CDN"><h3>jspm</h3></a> | ||
|
||
``` html | ||
<script type="module"> | ||
import * as pkg from '//dev.jspm.io/envfile' | ||
</script> | ||
``` | ||
|
||
<h3><a href="https://editions.bevry.me" title="Editions are the best way to produce and consume packages you care about.">Editions</a></h3> | ||
|
||
<p>This package is published with the following editions:</p> | ||
|
||
<ul><li><code>envfile</code> aliases <code>envfile/source/index.js</code></li> | ||
<li><code>envfile/source/index.js</code> is esnext source code with require for modules</li> | ||
<li><code>envfile/edition-browsers/index.js</code> is esnext compiled for browsers with require for modules</li></ul> | ||
|
||
<h3><a href="https://www.typescriptlang.org/" title="TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. ">TypeScript</a></h3> | ||
|
||
This project provides its type information via inline <a href="http://usejsdoc.org" title="JSDoc is an API documentation generator for JavaScript, similar to Javadoc or phpDocumentor">JSDoc Comments</a>. To make use of this in <a href="https://www.typescriptlang.org/" title="TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. ">TypeScript</a>, set your <code>maxNodeModuleJsDepth</code> compiler option to `5` or thereabouts. You can accomlish this via your `tsconfig.json` file like so: | ||
|
||
``` json | ||
{ | ||
"compilerOptions": { | ||
"maxNodeModuleJsDepth": 5 | ||
} | ||
} | ||
``` | ||
|
||
<!-- /INSTALL --> | ||
|
||
|
||
## Usage | ||
|
||
[API Documentation.](http://master.envfile.bevry.surge.sh/docs/) | ||
[Complete API Documentation.](http://master.envfile.bevry.surge.sh/docs/) | ||
|
||
### Via the Command Line | ||
|
||
|
@@ -114,29 +73,71 @@ const sourceObject = { a: 1, b: 2 } | |
|
||
// Parse an envfile path | ||
// async | ||
envfile.parseFile(sourcePath, function(err, obj) { | ||
envfile.parseFile(sourcePath, function (err, obj) { | ||
console.log(err, obj) | ||
}) | ||
// sync | ||
console.log(envfile.parseFileSync(sourcePath)) | ||
|
||
// Parse an envfile string | ||
// async | ||
envfile.parse(sourceString, function(err, obj) { | ||
envfile.parse(sourceString, function (err, obj) { | ||
console.log(err, obj) | ||
}) | ||
// sync | ||
console.log(envfile.parseSync(sourceString)) | ||
|
||
// Stringify a javascript object to an envfile string | ||
// async | ||
envfile.stringify(sourceObject, function(err, str) { | ||
envfile.stringify(sourceObject, function (err, str) { | ||
console.log(err, str) | ||
}) | ||
// sync | ||
console.log(envfile.stringifySync(sourceObject)) | ||
``` | ||
|
||
<!-- INSTALL/ --> | ||
|
||
<h2>Install</h2> | ||
|
||
<a href="https://npmjs.com" title="npm is a package manager for javascript"><h3>npm</h3></a> | ||
<ul> | ||
<li>Install: <code>npm install --save envfile</code></li> | ||
<li>Import: <code>import * as pkg from ('envfile')</code></li> | ||
<li>Require: <code>const pkg = require('envfile')</code></li> | ||
</ul> | ||
|
||
<a href="https://jspm.io" title="Native ES Modules CDN"><h3>jspm</h3></a> | ||
|
||
``` html | ||
<script type="module"> | ||
import * as pkg from '//dev.jspm.io/[email protected]' | ||
</script> | ||
``` | ||
|
||
<h3><a href="https://editions.bevry.me" title="Editions are the best way to produce and consume packages you care about.">Editions</a></h3> | ||
|
||
<p>This package is published with the following editions:</p> | ||
|
||
<ul><li><code>envfile</code> aliases <code>envfile/source/index.js</code></li> | ||
<li><code>envfile/source/index.js</code> is <a href="https://en.wikipedia.org/wiki/ECMAScript#ES.Next" title="ECMAScript Next">ESNext</a> source code for <a href="https://nodejs.org" title="Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine">Node.js</a> with <a href="https://nodejs.org/dist/latest-v5.x/docs/api/modules.html" title="Node/CJS Modules">Require</a> for modules</li> | ||
<li><code>envfile/edition-browsers/index.js</code> is <a href="https://en.wikipedia.org/wiki/ECMAScript#ES.Next" title="ECMAScript Next">ESNext</a> compiled for web browsers with <a href="https://nodejs.org/dist/latest-v5.x/docs/api/modules.html" title="Node/CJS Modules">Require</a> for modules</li></ul> | ||
|
||
<h3><a href="https://www.typescriptlang.org/" title="TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. ">TypeScript</a></h3> | ||
|
||
This project provides its type information via inline <a href="http://usejsdoc.org" title="JSDoc is an API documentation generator for JavaScript, similar to Javadoc or phpDocumentor">JSDoc Comments</a>. To make use of this in <a href="https://www.typescriptlang.org/" title="TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. ">TypeScript</a>, set your <code>maxNodeModuleJsDepth</code> compiler option to `5` or thereabouts. You can accomlish this via your `tsconfig.json` file like so: | ||
|
||
``` json | ||
{ | ||
"compilerOptions": { | ||
"maxNodeModuleJsDepth": 5 | ||
} | ||
} | ||
``` | ||
|
||
<!-- /INSTALL --> | ||
|
||
|
||
<!-- HISTORY/ --> | ||
|
||
<h2>History</h2> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.