From aae1b0db5c5d72308b9c7467e96ae78bbfb5929b Mon Sep 17 00:00:00 2001 From: Yurii Holiuk Date: Fri, 22 May 2020 16:43:43 +0300 Subject: [PATCH] update 0.1.5 (#444) --- .editorconfig | 2 +- .stylelintignore | 1 - gulpfile.js | 14 +++++++------- package.json | 2 +- 4 files changed, 9 insertions(+), 10 deletions(-) diff --git a/.editorconfig b/.editorconfig index fd9ba54b51..fd380d574c 100644 --- a/.editorconfig +++ b/.editorconfig @@ -7,4 +7,4 @@ indent_size = 2 charset = utf-8 trim_trailing_whitespace = true insert_final_newline = true -end_of_line = lf \ No newline at end of file +end_of_line = lf diff --git a/.stylelintignore b/.stylelintignore index 551913bc98..f1d4bd2757 100644 --- a/.stylelintignore +++ b/.stylelintignore @@ -1,3 +1,2 @@ /backstop_data/ /dist - diff --git a/gulpfile.js b/gulpfile.js index 3e1bdb9583..827a2cdebb 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -60,13 +60,13 @@ const parseCommandLineOptions = (argList) => { const args = parseCommandLineOptions(process.argv); const distDirectory = args.destination || args.d || 'dist'; -const htmlBlob = 'src/*.html'; +const htmlBlob = 'src/**/*.html'; const imagesBlob = 'src/images/**'; const fontsBlob = 'src/fonts/**'; -const stylesBlob = 'src/styles/**'; -const jsBlob = 'src/scripts/**'; +const stylesBlob = ['src/**/*.css', 'src/**/*.scss']; +const jsBlob = 'src/**/*.js'; -gulpLintHTML.description = "Analyse all HTML files using linthtml"; +gulpLintHTML.description = 'Analyse all HTML files using linthtml'; /** * Clean @@ -110,10 +110,10 @@ task('buildStyles', () => ( src(stylesBlob) .pipe(sourcemaps.init()) .pipe(sass()) - .pipe(gulpReplacePath(/(?:\.\.\/){2,}images/g, '../images')) + .pipe(gulpReplacePath(/(?:\.\.\/)+images/g, './images')) .pipe(autoprefixer()) .pipe(sourcemaps.write('.')) - .pipe(dest(`${distDirectory}/styles`)) + .pipe(dest(distDirectory)) // NOTE: need to leave here to pass changed styles to the BrowserSync .pipe(browserSync.reload({ stream: true })) )); @@ -131,7 +131,7 @@ task('lintJavascript', () => ( task('buildJavascript', () => ( src(jsBlob) - .pipe(dest(`${distDirectory}/scripts/`)) + .pipe(dest(distDirectory)) )); task('processJavascript', series('lintJavascript', 'buildJavascript')); diff --git a/package.json b/package.json index 64e57d076c..44d288831a 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,7 @@ "@mate-academy/backstop-config": "*", "@mate-academy/eslint-config": "*", "@mate-academy/linthtml-config": "0.0.1", - "@mate-academy/scripts": "^0.1.3", + "@mate-academy/scripts": "^0.1.5", "@mate-academy/stylelint-config": "0.0.9", "backstopjs": "^4.0.3", "browser-sync": "^2.1.6",