From 71358f42cfe014a6f4750fbc2b479dc7281db3e4 Mon Sep 17 00:00:00 2001 From: Ben Hanna Date: Sun, 23 Sep 2018 13:09:56 +0000 Subject: [PATCH] Removed a redundant package. --- package.json | 1 - src/assets/ElmAsset.js | 11 +++-------- yarn.lock | 8 ++++---- 3 files changed, 7 insertions(+), 13 deletions(-) diff --git a/package.json b/package.json index b8438bb5bc6..f42e636fb55 100644 --- a/package.json +++ b/package.json @@ -88,7 +88,6 @@ "cross-env": "^5.1.1", "elm": "^0.19.0", "eslint": "^4.13.0", - "find-elm-dependencies": "^2.0.0", "glslify-bundle": "^5.0.0", "glslify-deps": "^1.3.0", "graphql": "^0.11.7", diff --git a/src/assets/ElmAsset.js b/src/assets/ElmAsset.js index de4528a21b6..c7a8028a345 100644 --- a/src/assets/ElmAsset.js +++ b/src/assets/ElmAsset.js @@ -11,13 +11,8 @@ class ElmAsset extends Asset { } async collectDependencies() { - const {findAllDependencies} = await localRequire( - 'find-elm-dependencies', - this.name - ); - await this.getConfig(['elm.json'], {load: false}); - const dependencies = await findAllDependencies(this.name); + const dependencies = await this.elm.findAllDependencies(this.name); dependencies.forEach(dependency => { this.addDependency(dependency, {includedInParent: true}); @@ -25,7 +20,7 @@ class ElmAsset extends Asset { } async parse() { - const elm = await localRequire('node-elm-compiler', this.name); + this.elm = await localRequire('node-elm-compiler', this.name); const options = { cwd: process.cwd() @@ -39,7 +34,7 @@ class ElmAsset extends Asset { options.optimize = true; } - const compiled = await elm.compileToString(this.name, options); + const compiled = await this.elm.compileToString(this.name, options); this.contents = compiled.toString(); } diff --git a/yarn.lock b/yarn.lock index 15173e7f341..25756f936b8 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2702,9 +2702,9 @@ elliptic@^6.0.0: minimalistic-assert "^1.0.0" minimalistic-crypto-utils "^1.0.0" -elm@^0.19.0-bugfix2: - version "0.19.0-bugfix2" - resolved "https://registry.yarnpkg.com/elm/-/elm-0.19.0-bugfix2.tgz#b2b7ad4dbeb89edf997759330b3694f419f9f1b3" +elm@^0.19.0: + version "0.19.0" + resolved "https://registry.yarnpkg.com/elm/-/elm-0.19.0.tgz#c6ad86afea9e971424ebe75e36c9d03412a787fa" dependencies: binwrap "0.1.4" @@ -3091,7 +3091,7 @@ find-cache-dir@^1.0.0: make-dir "^1.0.0" pkg-dir "^2.0.0" -find-elm-dependencies@2.0.0, find-elm-dependencies@^2.0.0: +find-elm-dependencies@2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/find-elm-dependencies/-/find-elm-dependencies-2.0.0.tgz#435aa05a6544a0ecf54c5d1ac85cc1ca1044e4e4" dependencies: