From cf86c0699bac53065f1b8b73487e4aecd42e2c2f Mon Sep 17 00:00:00 2001 From: cagataycivici Date: Sat, 25 May 2019 18:29:48 +0300 Subject: [PATCH] Build optimization --- build-lib.js | 7 +------ gulpfile.js | 1 - 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/build-lib.js b/build-lib.js index 5919bf440..254690122 100644 --- a/build-lib.js +++ b/build-lib.js @@ -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 ` - ) - } }); }); \ No newline at end of file diff --git a/gulpfile.js b/gulpfile.js index cec7f5a7f..8362bbb75 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -23,7 +23,6 @@ gulp.task('build-themes', function() { return gulp.src([ 'public/themes/**/*' ]) - .pipe(uglifycss({"uglyComments": true})) .pipe(gulp.dest('resources/themes')); })