// Licensed under the Apache License, Version 2.0 (the “License”); you may not
// use this file except in compliance with the License. You may obtain a copy of
// the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an “AS IS” BASIS, WITHOUT
// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
// License for the specific language governing permissions and limitations under
// the License.

import pkgDir from 'pkg-dir'
import {join} from 'path'

export const PACKAGE_DIR = pkgDir.sync() || ''
export const PACKAGE_MODULES_DIR = join(PACKAGE_DIR, 'node_modules')
export const PACKAGE_BIN_DIR = join(PACKAGE_MODULES_DIR, '.bin')

export const TOOLBOX_DIR = join(__dirname, '..')
export const TOOLBOX_MODULES_DIR = join(TOOLBOX_DIR, 'node_modules')
export const TOOLBOX_BIN_DIR = join(TOOLBOX_MODULES_DIR, '.bin')

export const CONFIGS_DIR = join(TOOLBOX_DIR, 'build', 'configs')
export const TEMPLATES_DIR = join(TOOLBOX_DIR, 'templates')

export const PACKAGE_JSON_PATH = join(PACKAGE_DIR, 'package.json')
export const CTRINE_JSON_PATH = join(PACKAGE_DIR, 'ctrine.json')

@@ -652,143 +652,8 @@
  ''%0A
-export const PACKAGE_MODULES_DIR = join(PACKAGE_DIR, 'node_modules')%0Aexport const PACKAGE_BIN_DIR = join(PACKAGE_MODULES_DIR, '.bin')%0A%0A
 expo
@@ -697,16 +697,17 @@
 , '..')%0A
+%0A
 export c
@@ -711,31 +711,19 @@
 t const 
-TOOLBOX_MODULES
+BIN
 _DIR = j
@@ -753,16 +753,24 @@
 modules'
+, '.bin'
 )%0Aexport
@@ -780,19 +780,15 @@
 nst 
-TOOLBOX_BIN
+CONFIGS
 _DIR
@@ -807,30 +807,33 @@
 BOX_
-MODULES_DIR, '.bin
+DIR, 'build', 'configs
 ')%0A
-%0A
 expo
@@ -833,38 +833,38 @@
 ')%0Aexport const 
-CONFIG
+MODULE
 S_DIR = join(TOO
@@ -870,39 +870,35 @@
 OLBOX_DIR, '
-build', 'config
+node_module
 s')%0Aexport c
@@ -967,25 +967,19 @@
 nst 
-PACKAG
+CTRIN
 E_JSON
-_PATH
  = j
@@ -1000,14 +1000,13 @@
 R, '
-packag
+ctrin
 e.js
@@ -1027,24 +1027,20 @@
 nst 
-CTRIN
+PACKAG
 E_JSON
-_PATH
  = j
@@ -1049,30 +1049,31 @@
 n(PACKAGE_DIR, '
-ctrin
+packag
 e.json')%0A

Clean up paths