aboutsummaryrefslogtreecommitdiff
path: root/node_modules/hullabaloo-config-manager/index.js
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2019-03-27 21:01:33 +0100
committerFlorian Dold <florian.dold@gmail.com>2019-03-27 21:01:33 +0100
commitcc97a4dd2a967e1c2273bd5f4c5f49a5bf2e2585 (patch)
tree92c5d88706a6ffc654d1b133618d357890e7096b /node_modules/hullabaloo-config-manager/index.js
parent3771b4d6b67b34c130f3a9a1a15f42deefdb2eda (diff)
remove node_modules
Diffstat (limited to 'node_modules/hullabaloo-config-manager/index.js')
-rw-r--r--node_modules/hullabaloo-config-manager/index.js60
1 files changed, 0 insertions, 60 deletions
diff --git a/node_modules/hullabaloo-config-manager/index.js b/node_modules/hullabaloo-config-manager/index.js
deleted file mode 100644
index 4e10228e7..000000000
--- a/node_modules/hullabaloo-config-manager/index.js
+++ /dev/null
@@ -1,60 +0,0 @@
-'use strict'
-
-const path = require('path')
-
-const cloneDeep = require('lodash.clonedeep')
-
-const collector = require('./lib/collector')
-const currentEnv = require('./lib/currentEnv')
-const ResolvedConfig = require('./lib/ResolvedConfig')
-const Verifier = require('./lib/Verifier')
-
-function createConfig (options) {
- if (!options || !options.options || !options.source) {
- throw new TypeError("Expected 'options' and 'source' options")
- }
- if (typeof options.options !== 'object' || Array.isArray(options.options)) {
- throw new TypeError("'options' must be an actual object")
- }
-
- const source = options.source
- const dir = options.dir || path.dirname(source)
- const hash = options.hash || null
- const json5 = options.json5 !== false
- const babelOptions = cloneDeep(options.options)
-
- return new collector.Config(dir, null, hash, json5, babelOptions, source)
-}
-exports.createConfig = createConfig
-
-exports.currentEnv = currentEnv
-
-function fromConfig (baseConfig, options) {
- options = options || {}
- return collector.fromConfig(baseConfig, options.cache)
- .then(chains => new ResolvedConfig(chains, options.cache))
-}
-exports.fromConfig = fromConfig
-
-function fromDirectory (dir, options) {
- options = options || {}
- return collector.fromDirectory(dir, options.cache)
- .then(chains => chains && new ResolvedConfig(chains, options.cache))
-}
-exports.fromDirectory = fromDirectory
-
-function prepareCache () {
- return {
- dependencyHashes: new Map(),
- fileExistence: new Map(),
- files: new Map(),
- pluginsAndPresets: new Map(),
- sourceHashes: new Map()
- }
-}
-exports.prepareCache = prepareCache
-
-function restoreVerifier (buffer) {
- return Verifier.fromBuffer(buffer)
-}
-exports.restoreVerifier = restoreVerifier