build css script
parent
fb23ad37ff
commit
c3fbdd9d5d
|
@ -1,6 +1,8 @@
|
|||
.DS_Store
|
||||
node_modules
|
||||
/dist
|
||||
/resources
|
||||
/components
|
||||
|
||||
# misc
|
||||
/.sass-cache
|
||||
|
@ -28,3 +30,4 @@ yarn-error.log*
|
|||
*.njsproj
|
||||
*.sln
|
||||
*.sw*
|
||||
|
||||
|
|
|
@ -1,13 +1,8 @@
|
|||
const fs = require('fs-extra');
|
||||
const path = require('path');
|
||||
const { execSync } = require('child_process');
|
||||
const {execSync} = require('child_process');
|
||||
const vueCliServicePath = path.resolve(__dirname, 'node_modules/@vue/cli-service/bin/vue-cli-service');
|
||||
|
||||
fs.copyFile('source.txt', 'destination.txt', (err) => {
|
||||
if (err) throw err;
|
||||
console.log('source.txt was copied to destination.txt');
|
||||
});
|
||||
|
||||
fs.readdirSync(path.resolve(__dirname, './src/components/')).forEach(folder => {
|
||||
fs.readdirSync(path.resolve(__dirname, './src/components/' + folder)).forEach(file => {
|
||||
if (/\.vue$/.test(file)) {
|
||||
|
|
|
@ -0,0 +1,44 @@
|
|||
'use strict';
|
||||
|
||||
var gulp = require('gulp'),
|
||||
concat = require('gulp-concat'),
|
||||
uglifycss = require('gulp-uglifycss'),
|
||||
rename = require('gulp-rename'),
|
||||
del = require('del'),
|
||||
flatten = require('gulp-flatten');
|
||||
|
||||
gulp.task('build-css', function() {
|
||||
return gulp.src([
|
||||
'src/components/common/Common.css',
|
||||
'src/components/**/*.css'
|
||||
])
|
||||
.pipe(concat('primevue.css'))
|
||||
.pipe(gulp.dest('resources'))
|
||||
.pipe(uglifycss({"uglyComments": true}))
|
||||
.pipe(rename('primevue.min.css'))
|
||||
.pipe(gulp.dest('resources'));
|
||||
});
|
||||
|
||||
gulp.task('build-themes', function() {
|
||||
return gulp.src([
|
||||
'public/themes/**/*'
|
||||
])
|
||||
.pipe(uglifycss({"uglyComments": true}))
|
||||
.pipe(gulp.dest('resources/themes'));
|
||||
})
|
||||
|
||||
gulp.task('images', function() {
|
||||
return gulp.src(['src/components/**/images/*.png', 'src/components/**/images/*.gif'])
|
||||
.pipe(flatten())
|
||||
.pipe(gulp.dest('resources/images'));
|
||||
});
|
||||
|
||||
gulp.task('build-exports', function() {
|
||||
return gulp.src(['exports/*.js','exports/*.d.ts'])
|
||||
.pipe(gulp.dest('./'));
|
||||
});
|
||||
|
||||
//Building project with run sequence
|
||||
gulp.task('build-resources', ['build-css','images', 'build-themes']);
|
||||
|
||||
|
13
package.json
13
package.json
|
@ -8,8 +8,9 @@
|
|||
"license": "MIT",
|
||||
"scripts": {
|
||||
"serve": "vue-cli-service serve",
|
||||
"build": "vue-cli-service build",
|
||||
"build-app": "vue-cli-service build",
|
||||
"build-lib": "node build-lib",
|
||||
"build-resources": "gulp build-resources",
|
||||
"lint": "vue-cli-service lint",
|
||||
"test:unit": "vue-cli-service test:unit"
|
||||
},
|
||||
|
@ -37,9 +38,13 @@
|
|||
"@fullcalendar/daygrid": "4.0.1",
|
||||
"@fullcalendar/interaction": "4.0.2",
|
||||
"@fullcalendar/timegrid": "4.0.1",
|
||||
"chart.js": "2.7.3"
|
||||
},
|
||||
"dependencies": {
|
||||
"chart.js": "2.7.3",
|
||||
"gulp": "^3.9.1",
|
||||
"gulp-concat": "^2.6.0",
|
||||
"gulp-flatten": "^0.2.0",
|
||||
"gulp-rename": "^1.2.2",
|
||||
"gulp-uglify": "^1.5.3",
|
||||
"gulp-uglifycss": "^1.0.6",
|
||||
"prism-es6": "^1.1.2",
|
||||
"prismjs": "^1.15.0"
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue