@gesslar/uglier 0.7.0 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/cli.js +3 -4
- package/package.json +1 -1
package/bin/cli.js
CHANGED
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
|
|
5
5
|
import {execSync} from "child_process"
|
|
6
6
|
import {
|
|
7
|
-
FileObject,
|
|
8
7
|
VDirectoryObject,
|
|
9
8
|
Sass
|
|
10
9
|
} from "@gesslar/toolkit"
|
|
@@ -121,8 +120,8 @@ export async function getAvailableConfigs() {
|
|
|
121
120
|
// Try to read from installed package or local source
|
|
122
121
|
const cwd = VDirectoryObject.fromCwd()
|
|
123
122
|
const installedDir = cwd.getDirectory(`node_modules/${PACKAGE_NAME}/src`)
|
|
124
|
-
const localSource =
|
|
125
|
-
const installedSource =
|
|
123
|
+
const localSource = SRC_DIR.getFile("uglier.js")
|
|
124
|
+
const installedSource = installedDir.getFile("uglier.js")
|
|
126
125
|
|
|
127
126
|
let uglierFile = null
|
|
128
127
|
|
|
@@ -167,7 +166,7 @@ export async function getAvailableConfigs() {
|
|
|
167
166
|
export async function isInstalled(packageName) {
|
|
168
167
|
try {
|
|
169
168
|
const cwd = VDirectoryObject.fromCwd()
|
|
170
|
-
const packageJsonFile =
|
|
169
|
+
const packageJsonFile = cwd.getFile("package.json")
|
|
171
170
|
|
|
172
171
|
if(!(await packageJsonFile.exists)) {
|
|
173
172
|
console.warn(c`No {<B}package.json{B>} found. Please initialize your project first.`)
|