gulp added

pull/3420/head
Bahadir Sofuoglu 2022-09-11 00:55:24 +03:00
parent 7d6b633705
commit 28b8e0a7e0
4 changed files with 7961 additions and 2 deletions

37
gulpfile.js Normal file
View File

@ -0,0 +1,37 @@
'use strict';
var gulp = require('gulp'),
concat = require('gulp-concat'),
uglifycss = require('gulp-uglifycss'),
rename = require('gulp-rename'),
flatten = require('gulp-flatten');
gulp.task('build-css', function() {
return gulp.src([
'./components/common/Common.css',
'./components/**/*.css'
])
.pipe(concat('primevue.css'))
.pipe(gulp.dest('dist/resources'))
.pipe(uglifycss({"uglyComments": true}))
.pipe(rename('primevue.min.css'))
.pipe(gulp.dest('dist/resources'));
});
gulp.task('build-themes', function() {
return gulp.src([
'public/themes/**/*','!public/themes/soho-*/**/*', '!public/themes/viva-*/**/*',
'!public/themes/mira/**/*', '!public/themes/nano/**/*'
])
.pipe(gulp.dest('dist/resources/themes'));
})
gulp.task('images', function() {
return gulp.src(['./components/**/images/*.png', './components/**/images/*.gif'])
.pipe(flatten())
.pipe(gulp.dest('dist/resources/images'));
});
//Building project with run sequence
gulp.task("build-styles", gulp.series("build-css", "images", "build-themes"));

View File

@ -1,6 +1,7 @@
import { defineNuxtConfig } from 'nuxt' import { defineNuxtConfig } from 'nuxt'
const path = require('path'); const path = require('path');
import vueJsx from '@vitejs/plugin-vue-jsx' import vueJsx from '@vitejs/plugin-vue-jsx'
import rollupOptions from './rollup.config'
// https://v3.nuxtjs.org/api/configuration/nuxt.config // https://v3.nuxtjs.org/api/configuration/nuxt.config
export default defineNuxtConfig({ export default defineNuxtConfig({
ssr: true, ssr: true,
@ -31,6 +32,9 @@ export default defineNuxtConfig({
], ],
vite: { vite: {
plugins: [vueJsx()], plugins: [vueJsx()],
build: {
rollupOptions
},
resolve: { resolve: {
alias: { alias: {
'primevue/ripple': path.resolve(__dirname, '/components/ripple/Ripple.js'), 'primevue/ripple': path.resolve(__dirname, '/components/ripple/Ripple.js'),

7911
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -6,7 +6,8 @@
"generate": "nuxt generate", "generate": "nuxt generate",
"preview": "nuxt preview", "preview": "nuxt preview",
"postinstall": "nuxt prepare", "postinstall": "nuxt prepare",
"testRollup":"rollup -c" "testRollup":"rollup -c",
"testgulp": "gulp build-styles"
}, },
"devDependencies": { "devDependencies": {
"@fullcalendar/core": "^5.7.2", "@fullcalendar/core": "^5.7.2",
@ -26,6 +27,12 @@
"@vuelidate/validators": "^2.0.0-alpha.12", "@vuelidate/validators": "^2.0.0-alpha.12",
"rollup-plugin-postcss": "^4.0.0", "rollup-plugin-postcss": "^4.0.0",
"rollup-plugin-terser": "^7.0.2", "rollup-plugin-terser": "^7.0.2",
"rollup-plugin-vue": "^6.0.0-beta.9" "rollup-plugin-vue": "^6.0.0-beta.9",
"gulp": "^4.0.2",
"gulp-concat": "^2.6.0",
"gulp-flatten": "^0.4.0",
"gulp-rename": "^2.0.0",
"gulp-uglify": "^3.0.2",
"gulp-uglifycss": "^1.0.6"
} }
} }