Build optimization

pull/12/head
cagataycivici 2019-05-25 18:29:48 +03:00
parent 53cd3f560b
commit cf86c0699b
2 changed files with 1 additions and 7 deletions

View File

@ -5,16 +5,11 @@ const vueCliServicePath = path.resolve(__dirname, 'node_modules/@vue/cli-service
fs.readdirSync(path.resolve(__dirname, './src/components/')).forEach(folder => {
fs.readdirSync(path.resolve(__dirname, './src/components/' + folder)).forEach(file => {
if (/\.vue$/.test(file)) {
if (/\.vue$/.test(file) || /\.js$/.test(file)) {
let filename = file.split('.vue')[0].toLowerCase();
execSync(
`node ${vueCliServicePath} build src/components/${folder}/${file} --target lib --name ${filename} --dest components/${folder} --no-clean `
)
}
else if (/\.js$/.test(file)) {
execSync(
`node ${vueCliServicePath} build src/components/${folder}/${file} --target lib --name ${folder} --dest components/${folder} --no-clean `
)
}
});
});

View File

@ -23,7 +23,6 @@ gulp.task('build-themes', function() {
return gulp.src([
'public/themes/**/*'
])
.pipe(uglifycss({"uglyComments": true}))
.pipe(gulp.dest('resources/themes'));
})