diff --git a/README.md b/README.md index 3233535..1dcdf5c 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/package.json b/package.json index 5b9f6d0..b0929f6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "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": { @@ -8,9 +8,10 @@ "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", @@ -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", diff --git a/src/full.js b/src/full.js new file mode 100644 index 0000000..ed873b9 --- /dev/null +++ b/src/full.js @@ -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; \ No newline at end of file diff --git a/webpack.full.config.js b/webpack.full.config.js new file mode 100644 index 0000000..71b80ad --- /dev/null +++ b/webpack.full.config.js @@ -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' + } +}; \ No newline at end of file