Skip to content

Commit

Permalink
build: upgrade all npm dependencies and refactor Gulpfiles
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex-D committed Jan 16, 2023
1 parent e66f9ee commit 4db8451
Show file tree
Hide file tree
Showing 8 changed files with 4,691 additions and 4,529 deletions.
3 changes: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,6 @@ charset = utf-8
indent_style = space
indent_size = 4
trim_trailing_whitespace = true

[*.json]
indent_size = 2
34 changes: 0 additions & 34 deletions docs/gulpfile.js

This file was deleted.

54 changes: 54 additions & 0 deletions docs/gulpfile.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
// jshint node:true
'use strict';

import gulp from 'gulp';
import gulpAutoprefixer from 'gulp-autoprefixer';
import gulpLivereload from 'gulp-livereload';
import gulpCleanCss from 'gulp-clean-css';
import gulpSassPlugin from 'gulp-sass';
import sass from 'sass';
import vinylPaths from 'vinyl-paths';
import {deleteSync} from 'del';

const gulpSass = () => gulpSassPlugin(sass)();

const mainStyle = 'scss/main.scss';


const clean = function () {
return gulp.src('dist/*')
.pipe(vinylPaths(deleteSync));
};


const styles = function () {
return gulp.src(mainStyle)
.pipe(gulpSass({
sass: 'sass',
includePaths: ['sass']
}))
.pipe(gulpAutoprefixer(['last 1 version', '> 1%', 'ff >= 20', 'ie >= 8', 'opera >= 12', 'Android >= 2.2'], {cascade: true}))
.pipe(gulpCleanCss())
.pipe(gulp.dest('css/'));
};


const watch = function () {
gulp.watch(['scss/*.scss'], styles);

gulp.watch(['css/**', 'img/*', 'js/*'], function (file) {
gulpLivereload.changed(file);
});

gulpLivereload.listen();
};

const build = gulp.series(styles);

const buildAndWatch = gulp.series(build, watch);

export default buildAndWatch;
export {
clean,
build,
};
30 changes: 8 additions & 22 deletions docs/package.json
Original file line number Diff line number Diff line change
@@ -1,33 +1,19 @@
{
"name": "trumbowyg-github-page",
"title": "Trumbowyg GitHub Page",
"description": "GitHub page of Trumbowyg",
"homepage": "http://alex-d.github.io/Trumbowyg",
"private": true,
"author": {
"name": "Alexandre Demode (Alex-D)",
"email": "[email protected]",
"url": "http://alex-d.fr"
},
"repository": {
"type": "git",
"url": "https://github.com/Alex-D/Trumbowyg.git"
},
"bugs": {
"url": "https://github.com/Alex-D/Trumbowyg/issues"
"url": "https://alex-d.fr"
},
"license": "MIT",
"devDependencies": {
"gulp": "3.9.1",
"gulp-autoprefixer": "6.0.0",
"gulp-clean-css": "3.7.0",
"gulp-livereload": "4.0.1",
"gulp-load-plugins": "1.5.0",
"gulp-sass": "4.0.2"
},
"scripts": {
"start": "gulp",
"build": "gulp build",
"test": "gulp test"
"dev": "gulp",
"clean": "gulp clean",
"build": "gulp build"
},
"volta": {
"node": "18.12.1",
"npm": "9.3.0"
}
}
185 changes: 0 additions & 185 deletions gulpfile.js

This file was deleted.

Loading

0 comments on commit 4db8451

Please sign in to comment.