Skip to content

Commit

Permalink
Update rollup
Browse files Browse the repository at this point in the history
  • Loading branch information
mertsincan committed Oct 24, 2023
1 parent 4f88835 commit c1785bc
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 39 deletions.
36 changes: 0 additions & 36 deletions package-build.json

This file was deleted.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"preview": "nuxt preview",
"postinstall": "nuxt prepare",
"build:lib": "npm run build:check && npm run build:package",
"build:package": "NODE_ENV=production rollup -c && node build-meta && node api-generator/build-api && gulp build-styles",
"build:package": "NODE_ENV=production rollup -c && node api-generator/build-api && gulp build-styles",
"build:check": "npm run format:check && npm run security:check",
"security:check": "npm audit --production --audit-level high",
"format": "prettier --write \"**/*.{js,vue,d.ts}\" --cache",
Expand Down
53 changes: 51 additions & 2 deletions rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@ import postcss from 'rollup-plugin-postcss';
import { terser } from 'rollup-plugin-terser';
import vue from 'rollup-plugin-vue';

const fs = require('fs-extra');
const path = require('path');
import fs from 'fs-extra';
import path from 'path';

import pkg from './package.json';

let entries = [];

Expand Down Expand Up @@ -440,6 +442,52 @@ function addServices() {
addEntry('dynamicdialogeventbus', 'DynamicDialogEventBus.js', 'dynamicdialogeventbus');
}

function addPackageJson() {
const outputDir = 'dist';
const packageJson = `{
"name": "primevue",
"version": "${pkg.version}",
"private": false,
"author": "PrimeTek Informatics",
"description": "PrimeVue is an open source UI library for Vue featuring a rich set of 80+ components, a theme designer, various theme alternatives such as Material, Bootstrap, Tailwind, premium templates and professional support. In addition, it integrates with PrimeBlock, which has 370+ ready to use UI blocks to build spectacular applications in no time.",
"homepage": "https://primevue.org/",
"repository": {
"type": "git",
"url": "https://github.com/primefaces/primevue.git"
},
"license": "MIT",
"bugs": {
"url": "https://github.com/primefaces/primevue/issues"
},
"keywords": [
"primevue",
"vue",
"vue.js",
"vue2",
"vue3",
"ui library",
"component library",
"material",
"bootstrap",
"fluent",
"tailwind",
"unstyled",
"passthrough"
],
"web-types": "./web-types.json",
"vetur": {
"tags": "./vetur-tags.json",
"attributes": "./vetur-attributes.json"
},
"peerDependencies": {
"vue": "^3.0.0"
}
}`;

!fs.existsSync(outputDir) && fs.mkdirSync(outputDir);
fs.writeFileSync(path.resolve(outputDir, 'package.json'), packageJson);
}

addUtils();
addStyle();
addBase();
Expand All @@ -451,5 +499,6 @@ addSFC();
addIcon();
addPassThrough();
addCore();
addPackageJson();

export default entries;

0 comments on commit c1785bc

Please sign in to comment.