Skip to content

Commit

Permalink
publish a build that includes gedcomx-js
Browse files Browse the repository at this point in the history
  • Loading branch information
justincy committed Nov 10, 2016
1 parent 829f3dc commit 59bc3b9
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 5 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ __CDN via [unpkg](https://unpkg.com/#/)__

In the browser, gedcomx-fs-js is attached to the `window` as a global named `GedcomxFS`.

#### Full Build

As of 1.3.1 we also publish a full build which includes gedcomx-js and thus
doesn't require you to install or include it seperately and also doesn't
require you to call `GedcomX.addExtensions()` as documented below.

## Usage

```js
Expand Down
11 changes: 6 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
{
"name": "gedcomx-fs-js",
"version": "1.3.0",
"version": "1.3.1",
"description": "JavaScript library for FamilySearch extensions to the GEDCOM X spec.",
"main": "src/index.js",
"scripts": {
"test": "mocha",
"docs": "jsdoc -c jsdoc.json",
"coverage": "istanbul cover --report lcovonly _mocha -- --recursive && codecov",
"prepublish": "npm run build",
"build": "rm -rf dist && npm run build:full && npm run build:min",
"build:full": "webpack --output-filename gedcomx-fs.js",
"build:min": "webpack --output-filename gedcomx-fs.min.js --optimize-minimize"
"build": "rm -rf dist && npm run build:dev && npm run build:min && npm run build:full",
"build:dev": "webpack --output-filename gedcomx-fs.js",
"build:min": "webpack --output-filename gedcomx-fs.min.js --optimize-minimize",
"build:full": "webpack --config webpack.full.config.js --optimize-minimize"
},
"repository": {
"type": "git",
Expand All @@ -36,7 +37,7 @@
"chai-json-schema": "^1.4.0",
"codecov": "^1.0.1",
"gedcomx-fs-json-schema": "^1.0.0",
"gedcomx-js": "^2.4.2",
"gedcomx-js": "^2.6.0",
"ink-docstrap": "^1.3.0",
"istanbul": "^0.4.5",
"jsdoc": "3.4.x",
Expand Down
4 changes: 4 additions & 0 deletions src/full.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// Entry point for a full webpack build of gedcomx-fs-js that includes gedcomx-js
var GedcomX = require('gedcomx-js');
GedcomX.addExtensions(require('./index'));
module.exports = GedcomX;
9 changes: 9 additions & 0 deletions webpack.full.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// Webpack config for a build that includes gedcomx-js and gedcomx-fs-js
module.exports = {
entry: [__dirname + "/src/full.js"],
output: {
path: __dirname + "/dist",
filename: 'gedcomx-fs-full.min.js',
library: 'GedcomX'
}
};

0 comments on commit 59bc3b9

Please sign in to comment.