diff --git a/.npmignore b/.npmignore index 9efdd688..4d9b9016 100644 --- a/.npmignore +++ b/.npmignore @@ -8,4 +8,6 @@ Procfile users.db .travis.yml *.ts -PiGallery2.iml \ No newline at end of file +PiGallery2.iml +pigallery2.zip +*.js.map \ No newline at end of file diff --git a/.travis.yml b/.travis.yml index b909f261..ed1f5f6b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,9 +7,15 @@ before_deploy: - npm i gulp -g - gulp build-release - - deploy: + provider: npm + email: bra.patrik@gmail.com + api_key: + secure: bMv+DrQgqKtx3RNsHqZUOl9L3Bp/i/MSZ52ix8rWXfl1QYFzo7nCnFdHxeq67qCCApdsBrPnOqRsnR5IjLSJGiKwyOxlXNCawLJRKJ+EoM8IAolrZP0zg5DhyifZJ40M0QS8fCetDqKVSO6S52rs4I0nc5whFZ6E9j4EfmkBRoGyPGoTPmGCJdK6JrlN7oftCVm18r7kt7lXcr1EvBqDloJC+M4BukQc4v0iAY/psMEgExvvroCwweQEhumWma7DO1hdiixRh8Pclz+VUQwAggVdP1yZGabqnX80/G+KrmpbNrAGIUdgzMHGG5HkiMrxPUU6LAcDQ+IzZ08u3MzVy//ij4zcom7C99oy5/AL4oWh6tZQtefji9MlOOX4SJNikmsfD2D9skHeGwbFuqEPjrjpUPWtUhW9RS5kr5Dt/LJwMs3ADi9nEsAYAkTip1nH9Ts1Yw+ooy3lCfzuMJGMBzZ6vNlMoAGNyTkrjIkGDL76XuBYvn0X3e3USn+KuKF9qO+N6wCw8zTxI2aetx+z6/5gGiiAHPKkFGGz+2jkl+2ZO4DcOX1lR6AgrHwT/52bQF3UQVT02mUohqfUnpn6rSpYkvh+u3e3GE59sqAPcRleEKdkp68KFSFDstzwF/m7uoAjOIHSfKUjN22s7FP818BulikEhHiCknMJsnOYUZ4= + on: + tags: true + repo: bpatrik/PiGallery2 + provider: releases api_key: secure: NrgDMoHY4j9r4Ht9oPT6cYiGkcpbNsvR6DxEk51kD5qVRPtUq+V5gpIo0tSwIFfPzgY+5hsqK6Onl2AdSsaotHB8PT2CoZ9oZPJO8BlZFvD7iT83Qi49QcsMo6jjmgqByg6EwzhHLeAiMfYrNSqw1gT0tEONc9Ygq5deFolYSqf6yfplBkcT0HEFSncnDhn5i+s4SS/wOy/UppXJxKk9DE0GaRwaIuBC/aSAtDfoFUuxVwjahTiTb8YuqwguzoZA5lYC/EcoCxbSyb5y58XrsMB13AZmH271NlbSTYmo3c4+HGO4BkcIB/WATw9VcI1NU/huTgSNZnVzAalbtF9oWKG+IKyfa9gMbe6fj07CvB7KwCkaeJmToi5Hw3Eiw0+ioadEzD3KXRr0dchUjlYuYnmZEUxSAVW9jD+tJSdCxQKyna3PxtIcD7QvRlu8/ZXurcerZXVib5FbwmoXUzLZvbMeyaFHEMbawepp5xups/YYqp+I6H0SUqbMcNIAntENb/0doteXKwdOgsSUkdtMVoEM0p6PhFngFJLFPYAdq0yZiC8WQNwHNTBHcSME3CrIWk1sjrDjN8WylFTPljy7fNm2Rl2UFHvdtGHo5e5YEltHGdlcnSD4ZhXKCn3blR7O87taNUEAjljgjxdridbUrAJ3ooJRVPicVfeslVCM+OQ= @@ -25,11 +31,9 @@ deploy: app: pigallery2 on: repo: bpatrik/PiGallery2 - cache: directories: - node_modules - script: - npm run build - npm test diff --git a/gulpfile.js b/gulpfile.js index 928c7ec3..8f0039ed 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -1,47 +1,34 @@ var ts = require('gulp-typescript'); -var del = require('del'); var gulp = require('gulp'); -var merge = require('merge2'); var zip = require('gulp-zip'); var runSequence = require('run-sequence'); - - -gulp.task('clean', function () { - return del('release/'); -}); - -gulp.task("copy-files", function () { - return gulp - .src(['package.json', - ".npmignore", - "frontend/**/*.+(png|ejs|html|css)", - "frontend/systemjs*"], {base: "."}) - .pipe(gulp.dest("release")); -}); - +var tsProject = ts.createProject('tsconfig.json'); gulp.task('compile-release', function () { + return gulp.src([ + "frontend/**/*.ts", + "common/**/*.ts", + "backend/**/*.ts"], {base: "."}) + .pipe(tsProject()) + .js + .pipe(gulp.dest(".")) - return merge( - ['frontend', - 'common', - 'backend'].map(function (dir) { - var tsProject = ts.createProject('tsconfig.json'); - return gulp.src(dir + "/**/*.ts") - .pipe(tsProject()) - .js - .pipe(gulp.dest("release/" + dir)) - }) - ); }); gulp.task('zip-release', function () { - return gulp.src('release/**/*') + return gulp.src(['package.json', + "README.md", + "LICENSE", + "frontend/**/*.js", + "common/**/*.js", + "backend/**/*.js", + "frontend/**/*.+(png|ejs|html|css)", + "frontend/systemjs*"], {base: "."}) .pipe(zip('pigallery2.zip')) - .pipe(gulp.dest('release')) + .pipe(gulp.dest('.')); }); gulp.task('build-release', function (done) { - runSequence('clean', 'copy-files', 'compile-release', 'zip-release', function () { + runSequence('compile-release', 'zip-release', function () { console.log('Run something else'); done(); }); diff --git a/package.json b/package.json index 8d37e5d3..f0195136 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,6 @@ { - "name": "PiGallery2", + "name": "pigallery2", "version": "1.0.0-beta.0", - "private": true, "description": "This is a photo gallery optimised for running low resource servers (especially on raspberry pi)", "author": "Patrik J. Braun", "homepage": "https://github.com/bpatrik/PiGallery2",