Fixed module exports
parent
a054a92ef1
commit
7ce0115342
|
@ -14,6 +14,7 @@
|
|||
"url": "https://github.com/primefaces/primevue/issues"
|
||||
},
|
||||
"main": "./index.ts",
|
||||
"module": "./index.ts",
|
||||
"publishConfig": {
|
||||
"main": "./index.mjs",
|
||||
"module": "./index.mjs",
|
||||
|
@ -44,4 +45,4 @@
|
|||
"engines": {
|
||||
"node": ">=12.11.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
"bugs": {
|
||||
"url": "https://github.com/primefaces/primevue/issues"
|
||||
},
|
||||
"types": "./src/index.d.ts",
|
||||
"exports": {
|
||||
"./api": "./src/api/Api.js",
|
||||
"./base/style": "./src/base/style/BaseStyle.js",
|
||||
|
@ -25,7 +26,6 @@
|
|||
"./usestyle": "./src/usestyle/UseStyle.js",
|
||||
"./utils": "./src/utils/Utils.js"
|
||||
},
|
||||
"types": "./src/index.d.ts",
|
||||
"publishConfig": {
|
||||
"types": "./index.d.ts",
|
||||
"exports": {
|
||||
|
@ -53,4 +53,4 @@
|
|||
"engines": {
|
||||
"node": ">=12.11.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -14,6 +14,8 @@
|
|||
"url": "https://github.com/primefaces/primevue/issues"
|
||||
},
|
||||
"main": "./src/index.ts",
|
||||
"module": "./src/index.ts",
|
||||
"types": "./src/index.ts",
|
||||
"publishConfig": {
|
||||
"main": "./index.mjs",
|
||||
"module": "./index.mjs",
|
||||
|
@ -40,4 +42,4 @@
|
|||
"engines": {
|
||||
"node": ">=12.11.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -109,6 +109,7 @@ import type { TreeTablePassThroughOptions } from 'primevue/treetable';
|
|||
import type { VirtualScrollerPassThroughOptions } from 'primevue/virtualscroller';
|
||||
|
||||
export * from '@primevue/core/config';
|
||||
export { default } from '@primevue/core/config';
|
||||
|
||||
export interface PrimeVueConfiguration {
|
||||
ripple?: boolean;
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
"url": "https://github.com/primefaces/primevue/issues"
|
||||
},
|
||||
"main": "./src/index.js",
|
||||
"module": "./src/index.js",
|
||||
"types": "./src/index.d.ts",
|
||||
"exports": {
|
||||
".": "./src/index.js",
|
||||
|
@ -30,8 +31,20 @@
|
|||
"types": "./index.d.ts",
|
||||
"import": "./index.mjs"
|
||||
},
|
||||
"./*": {
|
||||
"./aura/*": {
|
||||
"types": "./types/*/index.d.ts",
|
||||
"import": "./aura/*/index.mjs"
|
||||
},
|
||||
"./lara/*": {
|
||||
"types": "./types/*/index.d.ts",
|
||||
"import": "./lara/*/index.mjs"
|
||||
},
|
||||
"./nora/*": {
|
||||
"types": "./types/*/index.d.ts",
|
||||
"import": "./nora/*/index.mjs"
|
||||
},
|
||||
"./*": {
|
||||
"types": "./*/index.d.ts",
|
||||
"import": "./*/index.mjs"
|
||||
}
|
||||
},
|
||||
|
@ -49,4 +62,4 @@
|
|||
"engines": {
|
||||
"node": ">=12.11.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,38 @@
|
|||
import fs from 'fs-extra';
|
||||
import path from 'path';
|
||||
import { removeBuild, resolvePath, updatePackageJson } from '../../../scripts/build-helper.mjs';
|
||||
|
||||
removeBuild(import.meta.url);
|
||||
updatePackageJson(path.resolve(resolvePath(import.meta.url).__dirname, '../package.json'));
|
||||
|
||||
const { __dirname, INPUT_DIR } = resolvePath(import.meta.url);
|
||||
const __root = path.resolve(__dirname, '../');
|
||||
const pkg = path.resolve(__root, './package.json');
|
||||
|
||||
updatePackageJson(pkg);
|
||||
|
||||
// update package.json > "publishConfig.exports" for publish
|
||||
let exports = {
|
||||
'.': {
|
||||
types: './index.d.ts',
|
||||
import: './index.mjs'
|
||||
}
|
||||
};
|
||||
|
||||
fs.readdirSync(path.resolve(__root, INPUT_DIR + 'presets'), { withFileTypes: true })
|
||||
.filter((dir) => dir.isDirectory())
|
||||
.forEach(({ name: folderName }) => {
|
||||
exports[`./${folderName}/*`] = {
|
||||
types: `./types/*/index.d.ts`,
|
||||
import: `./${folderName}/*/index.mjs`
|
||||
};
|
||||
});
|
||||
exports['./*'] = {
|
||||
types: './*/index.d.ts',
|
||||
import: './*/index.mjs'
|
||||
};
|
||||
|
||||
const pkgJson = JSON.parse(fs.readFileSync(pkg, { encoding: 'utf8', flag: 'r' }));
|
||||
|
||||
pkgJson.publishConfig.exports = exports;
|
||||
|
||||
fs.writeFileSync(pkg, JSON.stringify(pkgJson, null, 4));
|
||||
|
|
|
@ -150,5 +150,53 @@ export interface InputTextDesignTokens extends ColorSchemeDesignToken<InputTextD
|
|||
* @designToken inputtext.transition.duration
|
||||
*/
|
||||
transitionDuration?: string;
|
||||
/**
|
||||
* Sm of root
|
||||
*/
|
||||
sm?: {
|
||||
|
||||
/**
|
||||
* Sm font size of root
|
||||
*
|
||||
* @designToken inputtext.sm.font.size
|
||||
*/
|
||||
fontSize?: string;
|
||||
/**
|
||||
* Sm padding x of root
|
||||
*
|
||||
* @designToken inputtext.sm.padding.x
|
||||
*/
|
||||
paddingX?: string;
|
||||
/**
|
||||
* Sm padding y of root
|
||||
*
|
||||
* @designToken inputtext.sm.padding.y
|
||||
*/
|
||||
paddingY?: string;
|
||||
};
|
||||
/**
|
||||
* Lg of root
|
||||
*/
|
||||
lg?: {
|
||||
|
||||
/**
|
||||
* Lg font size of root
|
||||
*
|
||||
* @designToken inputtext.lg.font.size
|
||||
*/
|
||||
fontSize?: string;
|
||||
/**
|
||||
* Lg padding x of root
|
||||
*
|
||||
* @designToken inputtext.lg.padding.x
|
||||
*/
|
||||
paddingX?: string;
|
||||
/**
|
||||
* Lg padding y of root
|
||||
*
|
||||
* @designToken inputtext.lg.padding.y
|
||||
*/
|
||||
paddingY?: string;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue