@lit-labs/cli
Advanced tools
Comparing version
@@ -9,2 +9,4 @@ /** | ||
import * as path from 'path'; | ||
import { EOL } from 'os'; | ||
import * as ts from 'typescript'; | ||
const reactCommand = { | ||
@@ -84,2 +86,4 @@ name: 'react', | ||
})); | ||
// Log any diagnostics collected while running the generators. | ||
logDiagnostics([...analyzer.getDiagnostics()]); | ||
// `allSettled` will swallow errors, so we need to filter them out of | ||
@@ -105,2 +109,18 @@ // the results and throw a new error up the stack describing all the errors | ||
}; | ||
const diagnosticsHost = { | ||
getCanonicalFileName(name) { | ||
return path.resolve(name); | ||
}, | ||
getCurrentDirectory() { | ||
return process.cwd(); | ||
}, | ||
getNewLine() { | ||
return EOL; | ||
}, | ||
}; | ||
const logDiagnostics = (diagnostics) => { | ||
if (diagnostics.length > 0) { | ||
console.log(ts.formatDiagnosticsWithColorAndContext(diagnostics, diagnosticsHost)); | ||
} | ||
}; | ||
//# sourceMappingURL=generate.js.map |
{ | ||
"name": "@lit-labs/cli", | ||
"description": "Tooling for Lit development", | ||
"version": "0.4.1", | ||
"version": "0.5.0", | ||
"publishConfig": { | ||
@@ -82,3 +82,3 @@ "access": "public" | ||
"dependencies": { | ||
"@lit-labs/analyzer": "^0.7.0", | ||
"@lit-labs/analyzer": "^0.8.0", | ||
"@lit-labs/gen-utils": "^0.2.0", | ||
@@ -90,3 +90,4 @@ "@lit/localize-tools": "^0.6.1", | ||
"command-line-usage": "^6.1.1", | ||
"tslib": "^2.0.3" | ||
"tslib": "^2.0.3", | ||
"typescript": "~4.7.4" | ||
}, | ||
@@ -93,0 +94,0 @@ "devDependencies": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
115192
1.02%1201
1.69%9
12.5%+ Added
+ Added
- Removed
Updated