@stencil/angular-output-target
Advanced tools
Comparing version 0.0.1-dev.11734586318.14947a27 to 0.0.1-dev.11735332610.1971f219
'use strict'; | ||
Object.defineProperty(exports, '__esModule', { value: true }); | ||
var path = require('path'); | ||
var os = require('os'); | ||
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } | ||
var path__default = /*#__PURE__*/_interopDefaultLegacy(path); | ||
const OutputTypes = { | ||
@@ -61,3 +55,3 @@ Component: 'component', | ||
function relativeImport(pathFrom, pathTo, ext) { | ||
let relativePath = path__default["default"].relative(path__default["default"].dirname(pathFrom), path__default["default"].dirname(pathTo)); | ||
let relativePath = path.relative(path.dirname(pathFrom), path.dirname(pathTo)); | ||
if (relativePath === '') { | ||
@@ -69,7 +63,7 @@ relativePath = '.'; | ||
} | ||
return normalizePath(`${relativePath}/${path__default["default"].basename(pathTo, ext)}`); | ||
return normalizePath(`${relativePath}/${path.basename(pathTo, ext)}`); | ||
} | ||
async function readPackageJson(config, rootDir) { | ||
var _a; | ||
const pkgJsonPath = path__default["default"].join(rootDir, 'package.json'); | ||
const pkgJsonPath = path.join(rootDir, 'package.json'); | ||
let pkgJson; | ||
@@ -363,3 +357,3 @@ try { | ||
} | ||
const targetDir = path__default["default"].dirname(outputTarget.directivesProxyFile); | ||
const targetDir = path.dirname(outputTarget.directivesProxyFile); | ||
const normalizedValueAccessors = outputTarget.valueAccessorConfigs.reduce((allAccessors, va) => { | ||
@@ -382,4 +376,4 @@ const elementSelectors = Array.isArray(va.elementSelectors) ? va.elementSelectors : [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.join(targetDir, targetFileName); | ||
const srcFilePath = path.join(__dirname, '../resources/control-value-accessors/', targetFileName); | ||
const srcFileContents = await compilerCtx.fs.readFile(srcFilePath); | ||
@@ -404,4 +398,4 @@ const finalText = createValueAccessor(srcFileContents, normalizedValueAccessors[valueAccessorType], outputTarget.outputType); | ||
return { | ||
src: path__default["default"].join(__dirname, '../resources/control-value-accessors/', rf), | ||
dest: path__default["default"].join(directory, rf), | ||
src: path.join(__dirname, '../resources/control-value-accessors/', rf), | ||
dest: path.join(directory, rf), | ||
keepDirStructure: false, | ||
@@ -412,3 +406,3 @@ warn: false, | ||
}); | ||
return config.sys.copy(copyTasks, path__default["default"].join(directory)); | ||
return config.sys.copy(copyTasks, path.join(directory)); | ||
} | ||
@@ -457,4 +451,4 @@ const VALUE_ACCESSOR_SELECTORS = `<VALUE_ACCESSOR_SELECTORS>`; | ||
} | ||
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.join(__dirname, '..', 'angular-component-lib'); | ||
const destDirectory = path.join(path.dirname(outputTarget.directivesProxyFile), 'angular-component-lib'); | ||
return config.sys.copy([ | ||
@@ -471,4 +465,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.dirname(pkgData.types); | ||
const dtsFilePath = path.join(rootDir, distTypesDir, GENERATED_DTS); | ||
const { outputType } = outputTarget; | ||
@@ -599,7 +593,7 @@ const componentsTypeFile = relativeImport(outputTarget.directivesProxyFile, dtsFilePath, '.d.ts'); | ||
} | ||
if (outputTarget.directivesProxyFile && !path__default["default"].isAbsolute(outputTarget.directivesProxyFile)) { | ||
results.directivesProxyFile = normalizePath(path__default["default"].join(config.rootDir, outputTarget.directivesProxyFile)); | ||
if (outputTarget.directivesProxyFile && !path.isAbsolute(outputTarget.directivesProxyFile)) { | ||
results.directivesProxyFile = normalizePath(path.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.isAbsolute(outputTarget.directivesArrayFile)) { | ||
results.directivesArrayFile = normalizePath(path.join(config.rootDir, outputTarget.directivesArrayFile)); | ||
} | ||
@@ -606,0 +600,0 @@ if (outputTarget.includeSingleComponentAngularModules !== undefined) { |
{ | ||
"name": "@stencil/angular-output-target", | ||
"version": "0.0.1-dev.11734586318.14947a27", | ||
"version": "0.0.1-dev.11735332610.1971f219", | ||
"description": "Angular output target for @stencil/core components.", | ||
@@ -63,3 +63,3 @@ "main": "dist/index.cjs.js", | ||
}, | ||
"gitHead": "4947a276a55f76b0d843b15a42c3e7ca9a6d00e4" | ||
"gitHead": "971f219ebe92260d416e7da4af036715b8009e9f" | ||
} |
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
110023
2126