From 2f8d97aacd92b46c520b5940d7286a771a5eca42 Mon Sep 17 00:00:00 2001 From: Lee Langley-Rees Date: Mon, 27 Apr 2020 18:12:02 +0100 Subject: [PATCH] Don't publish unnecessary files --- .npmignore | 10 +++++++ package-lock.json | 48 +++++++++++++++++---------------- src/parser/grammars/generate.js | 8 +++--- 3 files changed, 39 insertions(+), 27 deletions(-) create mode 100644 .npmignore diff --git a/.npmignore b/.npmignore new file mode 100644 index 00000000..db6d3dec --- /dev/null +++ b/.npmignore @@ -0,0 +1,10 @@ +# Ignore everything +* + +# Except for these +!/lib/*.js +!/lib/**/*.js +!CONTRIBUTING.md +!licence.txt +!package.json +!readme.md diff --git a/package-lock.json b/package-lock.json index e418cc54..2c5fe606 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3692,9 +3692,9 @@ "dev": true }, "decimal.js": { - "version": "10.1.1", - "resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.1.1.tgz", - "integrity": "sha512-vEEgyk1fWVEnv7lPjkNedAIjzxQDue5Iw4FeX4UkNUDSVyD/jZTD0Bw2kAO7k6iyyJRAhM9oxxI0D1ET6k0Mmg==" + "version": "10.2.0", + "resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.2.0.tgz", + "integrity": "sha512-vDPw+rDgn3bZe1+F/pyEwb1oMG2XTlRVgAa6B4KccTEpYgF8w6eQllVbQcfIJnZyvzFtFpxnpGtx8dd7DJp/Rw==" }, "decode-uri-component": { "version": "0.2.0", @@ -6645,27 +6645,34 @@ "object-visit": "^1.0.0" } }, - "mathjs": { - "version": "5.9.0", - "resolved": "https://registry.npmjs.org/mathjs/-/mathjs-5.9.0.tgz", - "integrity": "sha512-f1xmJklkTCr48y023cFy/ZSoVzOfgHp1gutvebi/Vv5RLly6j8G9T2/XHkfXewZKcwPDbhBkFEYljaCjudxulQ==", - "requires": { - "complex.js": "2.0.11", - "decimal.js": "10.1.1", - "escape-latex": "1.2.0", - "fraction.js": "4.0.12", - "javascript-natural-sort": "0.7.1", - "seed-random": "2.2.0", - "tiny-emitter": "2.1.0", - "typed-function": "1.1.0" - } - }, "mathjs-expression-parser": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/mathjs-expression-parser/-/mathjs-expression-parser-1.0.2.tgz", "integrity": "sha512-Z5T4UTLIsHhrQodz7bGhHVsARBwrHDIs49OcJ/iNuY/5sMg6SZrYyoDUD2iO91nMONK6qAiBxWy2/KjtBaSc9g==", "requires": { "mathjs": "^5.2.3" + }, + "dependencies": { + "mathjs": { + "version": "5.10.3", + "resolved": "https://registry.npmjs.org/mathjs/-/mathjs-5.10.3.tgz", + "integrity": "sha512-ySjg30BC3dYjQm73ILZtwcWzFJde0VU6otkXW/57IjjuYRa3Qaf0Kb8pydEuBZYtqW2OxreAtsricrAmOj3jIw==", + "requires": { + "complex.js": "2.0.11", + "decimal.js": "10.2.0", + "escape-latex": "1.2.0", + "fraction.js": "4.0.12", + "javascript-natural-sort": "0.7.1", + "seed-random": "2.2.0", + "tiny-emitter": "2.1.0", + "typed-function": "1.1.0" + } + }, + "typed-function": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/typed-function/-/typed-function-1.1.0.tgz", + "integrity": "sha512-TuQzwiT4DDg19beHam3E66oRXhyqlyfgjHB/5fcvsRXbfmWPJfto9B4a0TBdTrQAPGlGmXh/k7iUI+WsObgORA==" + } } }, "merge-stream": { @@ -8986,11 +8993,6 @@ "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", "dev": true }, - "typed-function": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/typed-function/-/typed-function-1.1.0.tgz", - "integrity": "sha512-TuQzwiT4DDg19beHam3E66oRXhyqlyfgjHB/5fcvsRXbfmWPJfto9B4a0TBdTrQAPGlGmXh/k7iUI+WsObgORA==" - }, "unicode-canonical-property-names-ecmascript": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-1.0.4.tgz", diff --git a/src/parser/grammars/generate.js b/src/parser/grammars/generate.js index 0f252d72..9c09054f 100644 --- a/src/parser/grammars/generate.js +++ b/src/parser/grammars/generate.js @@ -11,10 +11,10 @@ const grammar = fs.readFileSync(`${dir}grammar.pegjs`).toString(); // generate the parser const parser = pegjs.generate(grammar, { output: 'source' }); -const output = `import * as Dice from '../../Dice.js'; -import * as Modifiers from '../../Modifiers.js'; -import ComparePoint from '../../ComparePoint.js'; -import RollGroup from '../../RollGroup.js'; +const output = `import * as Dice from '../../Dice'; +import * as Modifiers from '../../Modifiers'; +import ComparePoint from '../../ComparePoint'; +import RollGroup from '../../RollGroup'; import math from 'mathjs-expression-parser'; const parser = ${parser};