@stencil/angular-output-target
Advanced tools
Comparing version 0.6.1-dev.11648237512.119cf959 to 0.6.1-dev.11650990404.1c4facf3
@@ -56,3 +56,3 @@ 'use strict'; | ||
function relativeImport(pathFrom, pathTo, ext) { | ||
let relativePath = path__default["default"].relative(path__default["default"].dirname(pathFrom), path__default["default"].dirname(pathTo)); | ||
let relativePath = path__default['default'].relative(path__default['default'].dirname(pathFrom), path__default['default'].dirname(pathTo)); | ||
if (relativePath === '') { | ||
@@ -64,7 +64,7 @@ relativePath = '.'; | ||
} | ||
return normalizePath(`${relativePath}/${path__default["default"].basename(pathTo, ext)}`); | ||
return normalizePath(`${relativePath}/${path__default['default'].basename(pathTo, ext)}`); | ||
} | ||
async function readPackageJson(config, rootDir) { | ||
var _a; | ||
const pkgJsonPath = path__default["default"].join(rootDir, 'package.json'); | ||
const pkgJsonPath = path__default['default'].join(rootDir, 'package.json'); | ||
let pkgJson; | ||
@@ -216,3 +216,3 @@ try { | ||
} | ||
const targetDir = path__default["default"].dirname(outputTarget.directivesProxyFile); | ||
const targetDir = path__default['default'].dirname(outputTarget.directivesProxyFile); | ||
const normalizedValueAccessors = outputTarget.valueAccessorConfigs.reduce((allAccessors, va) => { | ||
@@ -237,4 +237,4 @@ const elementSelectors = Array.isArray(va.elementSelectors) | ||
const targetFileName = `${type}-value-accessor.ts`; | ||
const targetFilePath = path__default["default"].join(targetDir, targetFileName); | ||
const srcFilePath = path__default["default"].join(__dirname, '../resources/control-value-accessors/', targetFileName); | ||
const targetFilePath = path__default['default'].join(targetDir, targetFileName); | ||
const srcFilePath = path__default['default'].join(__dirname, '../resources/control-value-accessors/', targetFileName); | ||
const srcFileContents = await compilerCtx.fs.readFile(srcFilePath); | ||
@@ -244,3 +244,3 @@ const finalText = createValueAccessor(srcFileContents, normalizedValueAccessors[valueAccessorType]); | ||
})); | ||
await copyResources$1(config, ['value-accessor.ts'], targetDir); | ||
await copyResources(config, ['value-accessor.ts'], targetDir); | ||
} | ||
@@ -253,3 +253,3 @@ function createValueAccessor(srcFileContents, valueAccessor) { | ||
} | ||
function copyResources$1(config, resourcesFilesToCopy, directory) { | ||
function copyResources(config, resourcesFilesToCopy, directory) { | ||
if (!config.sys || !config.sys.copy) { | ||
@@ -260,4 +260,4 @@ throw new Error('stencil is not properly intialized at this step. Notify the developer'); | ||
return { | ||
src: path__default["default"].join(__dirname, '../resources/control-value-accessors/', rf), | ||
dest: path__default["default"].join(directory, rf), | ||
src: path__default['default'].join(__dirname, '../resources/control-value-accessors/', rf), | ||
dest: path__default['default'].join(directory, rf), | ||
keepDirStructure: false, | ||
@@ -267,3 +267,3 @@ warn: false, | ||
}); | ||
return config.sys.copy(copyTasks, path__default["default"].join(directory)); | ||
return config.sys.copy(copyTasks, path__default['default'].join(directory)); | ||
} | ||
@@ -282,3 +282,3 @@ const VALUE_ACCESSOR_SELECTORS = `<VALUE_ACCESSOR_SELECTORS>`; | ||
compilerCtx.fs.writeFile(outputTarget.directivesProxyFile, finalText), | ||
copyResources(config, outputTarget), | ||
copyResources$1(config, outputTarget), | ||
generateAngularDirectivesFile(compilerCtx, filteredComponents, outputTarget), | ||
@@ -291,8 +291,8 @@ generateValueAccessors(compilerCtx, filteredComponents, outputTarget, config), | ||
} | ||
async function copyResources(config, outputTarget) { | ||
async function copyResources$1(config, outputTarget) { | ||
if (!config.sys || !config.sys.copy || !config.sys.glob) { | ||
throw new Error('stencil is not properly initialized at this step. Notify the developer'); | ||
} | ||
const srcDirectory = path__default["default"].join(__dirname, '..', 'angular-component-lib'); | ||
const destDirectory = path__default["default"].join(path__default["default"].dirname(outputTarget.directivesProxyFile), 'angular-component-lib'); | ||
const srcDirectory = path__default['default'].join(__dirname, '..', 'angular-component-lib'); | ||
const destDirectory = path__default['default'].join(path__default['default'].dirname(outputTarget.directivesProxyFile), 'angular-component-lib'); | ||
return config.sys.copy([ | ||
@@ -308,4 +308,4 @@ { | ||
function generateProxies(components, pkgData, outputTarget, rootDir) { | ||
const distTypesDir = path__default["default"].dirname(pkgData.types); | ||
const dtsFilePath = path__default["default"].join(rootDir, distTypesDir, GENERATED_DTS); | ||
const distTypesDir = path__default['default'].dirname(pkgData.types); | ||
const dtsFilePath = path__default['default'].join(rootDir, distTypesDir, GENERATED_DTS); | ||
const componentsTypeFile = relativeImport(outputTarget.directivesProxyFile, dtsFilePath, '.d.ts'); | ||
@@ -376,10 +376,10 @@ const imports = `/* tslint:disable */ | ||
} | ||
if (outputTarget.directivesProxyFile && !path__default["default"].isAbsolute(outputTarget.directivesProxyFile)) { | ||
results.directivesProxyFile = normalizePath(path__default["default"].join(config.rootDir, outputTarget.directivesProxyFile)); | ||
if (outputTarget.directivesProxyFile && !path__default['default'].isAbsolute(outputTarget.directivesProxyFile)) { | ||
results.directivesProxyFile = normalizePath(path__default['default'].join(config.rootDir, outputTarget.directivesProxyFile)); | ||
} | ||
if (outputTarget.directivesArrayFile && !path__default["default"].isAbsolute(outputTarget.directivesArrayFile)) { | ||
results.directivesArrayFile = normalizePath(path__default["default"].join(config.rootDir, outputTarget.directivesArrayFile)); | ||
if (outputTarget.directivesArrayFile && !path__default['default'].isAbsolute(outputTarget.directivesArrayFile)) { | ||
results.directivesArrayFile = normalizePath(path__default['default'].join(config.rootDir, outputTarget.directivesArrayFile)); | ||
} | ||
if (outputTarget.directivesUtilsFile && !path__default["default"].isAbsolute(outputTarget.directivesUtilsFile)) { | ||
results.directivesUtilsFile = normalizePath(path__default["default"].join(config.rootDir, outputTarget.directivesUtilsFile)); | ||
if (outputTarget.directivesUtilsFile && !path__default['default'].isAbsolute(outputTarget.directivesUtilsFile)) { | ||
results.directivesUtilsFile = normalizePath(path__default['default'].join(config.rootDir, outputTarget.directivesUtilsFile)); | ||
} | ||
@@ -386,0 +386,0 @@ return results; |
@@ -232,3 +232,3 @@ import path from 'path'; | ||
})); | ||
await copyResources$1(config, ['value-accessor.ts'], targetDir); | ||
await copyResources(config, ['value-accessor.ts'], targetDir); | ||
} | ||
@@ -241,3 +241,3 @@ function createValueAccessor(srcFileContents, valueAccessor) { | ||
} | ||
function copyResources$1(config, resourcesFilesToCopy, directory) { | ||
function copyResources(config, resourcesFilesToCopy, directory) { | ||
if (!config.sys || !config.sys.copy) { | ||
@@ -268,3 +268,3 @@ throw new Error('stencil is not properly intialized at this step. Notify the developer'); | ||
compilerCtx.fs.writeFile(outputTarget.directivesProxyFile, finalText), | ||
copyResources(config, outputTarget), | ||
copyResources$1(config, outputTarget), | ||
generateAngularDirectivesFile(compilerCtx, filteredComponents, outputTarget), | ||
@@ -277,3 +277,3 @@ generateValueAccessors(compilerCtx, filteredComponents, outputTarget, config), | ||
} | ||
async function copyResources(config, outputTarget) { | ||
async function copyResources$1(config, outputTarget) { | ||
if (!config.sys || !config.sys.copy || !config.sys.glob) { | ||
@@ -280,0 +280,0 @@ throw new Error('stencil is not properly initialized at this step. Notify the developer'); |
{ | ||
"name": "@stencil/angular-output-target", | ||
"version": "0.6.1-dev.11648237512.119cf959", | ||
"version": "0.6.1-dev.11650990404.1c4facf3", | ||
"description": "Angular output target for @stencil/core components.", | ||
@@ -42,3 +42,3 @@ "main": "dist/index.cjs.js", | ||
"peerDependencies": { | ||
"@stencil/core": "^2.14.0" | ||
"@stencil/core": "^2.9.0" | ||
}, | ||
@@ -59,3 +59,3 @@ "jest": { | ||
}, | ||
"gitHead": "19cf959ea92c29e2fd39697c3dbb25bc58640a0e" | ||
"gitHead": "c4facf34607b1500dd33dd5c5d1ba5685edd90d4" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
68962