Roll dice (eg Asphodice) and show outcomes https://rpg.bertieb.org/dice-roller/
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 
 

48 行
1.3 KiB

  1. let gulp = require("gulp");
  2. let browserSync = require("browser-sync").create();
  3. let sass = require("gulp-sass");
  4. var ts = require("gulp-typescript");
  5. var tsProject = ts.createProject("tsconfig.json");
  6. var paths = {
  7. pages: ["src/html/*.html"],
  8. css: ["src/css/*.css"],
  9. };
  10. // Compile sass into CSS & auto-inject into browsers
  11. gulp.task('sass', function() {
  12. return gulp.src("src/scss/*.scss")
  13. .pipe(sass())
  14. .pipe(gulp.dest("dist/css"))
  15. .pipe(browserSync.stream());
  16. });
  17. gulp.task("copy-html", function () {
  18. return gulp.src(paths.pages).pipe(gulp.dest("dist"));
  19. });
  20. gulp.task("copy-css", function () {
  21. return gulp.src(paths.css).pipe(gulp.dest("dist/css"));
  22. });
  23. gulp.task("compile-ts", function () {
  24. return tsProject.src().pipe(tsProject()).js.pipe(gulp.dest("dist"));
  25. });
  26. // Static Server + compile ts + watch scss/html/css files
  27. gulp.task('serve', gulp.series("compile-ts", 'sass', "copy-html", "copy-css", function() {
  28. browserSync.init({
  29. server: "./dist/"
  30. });
  31. gulp.watch("src/scss/*.scss", gulp.series('sass'));
  32. gulp.watch("src/css/*.css").on('change', gulp.series("copy-css"));
  33. gulp.watch("src/html/*.html").on('change', gulp.series("copy-html"));
  34. gulp.watch("dist/*.html").on('change', browserSync.reload);
  35. }));
  36. gulp.task('default', gulp.series('serve'));