Quellcode durchsuchen

v0.1.3 add 'gulp zip' command

tags/v0.1.3^0
bertieb vor 3 Jahren
Ursprung
Commit
90ff20ea7f
2 geänderte Dateien mit 19 neuen und 1 gelöschten Zeilen
  1. +17
    -0
      gulpfile.js
  2. +2
    -1
      package.json

+ 17
- 0
gulpfile.js Datei anzeigen

@@ -1,3 +1,5 @@
var version = require("./package.json").version

let gulp = require("gulp");
let browserSync = require("browser-sync").create();
let sass = require("gulp-sass");
@@ -12,6 +14,8 @@ var tsify = require("tsify");
var watchify = require("watchify");
var fancy_log = require("fancy-log");

const zip = require("gulp-zip")

var paths = {
pages: ["src/html/*.html"],
css: ["src/css/*.css"],
@@ -47,6 +51,16 @@ function watchedBundle() {
.pipe(gulp.dest("dist"));
}

/**
* Uses version in package.json to create zip
*/
function versionedZip() {
return gulp.src("./dist/**")
.pipe(zip(`${version}.zip`))
.pipe(gulp.dest("."));
}


// Non-injecting SASS
gulp.task('sass-noninject', function() {
return gulp.src("src/scss/*.scss")
@@ -86,6 +100,9 @@ gulp.task("build", gulp.series(

gulp.task("build-hs", gulp.parallel("copy-html", "sass"));

// Zip dist/ - eg for building Docker images where node isn't installed
gulp.task("zip", gulp.series("build", versionedZip));

// Static Server + compile ts + watch scss/html/css files
gulp.task('serve', gulp.series("build-hs", watchedBundle, function() {



+ 2
- 1
package.json Datei anzeigen

@@ -1,6 +1,6 @@
{
"name": "asphodice",
"version": "0.1.1",
"version": "0.1.3",
"description": "Dice roller for Asphodel. Includes statistical information",
"devDependencies": {
"@types/chai": "^4.2.14",
@@ -14,6 +14,7 @@
"gulp": "^4.0.2",
"gulp-sass": "^4.1.0",
"gulp-typescript": "^6.0.0-alpha.1",
"gulp-zip": "^5.0.2",
"tsify": "^5.0.2",
"vinyl-source-stream": "^2.0.0",
"watchify": "^4.0.0"


Laden…
Abbrechen
Speichern