Skip to content

Commit

Permalink
Decaffeinate gulpfile in pkg/extension (#4817)
Browse files Browse the repository at this point in the history
Decaffeinate gulpfile in pkg/extension
  • Loading branch information
jennifer-shehane authored Jul 26, 2019
2 parents 55e9618 + 286433a commit 8b98d7b
Show file tree
Hide file tree
Showing 2 changed files with 100 additions and 75 deletions.
75 changes: 0 additions & 75 deletions packages/extension/gulpfile.coffee

This file was deleted.

100 changes: 100 additions & 0 deletions packages/extension/gulpfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
/* eslint-disable
@cypress/dev/no-return-before,
no-unused-vars,
*/
// TODO: This file was created by bulk-decaffeinate.
// Fix any style issues and re-enable lint.
/*
* decaffeinate suggestions:
* DS102: Remove unnecessary code created because of implicit returns
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
*/
const fs = require('fs-extra')
const pkg = require('./package.json')
const gulp = require('gulp')
const clean = require('gulp-clean')
const rename = require('gulp-rename')
const runSeq = require('run-sequence')
const source = require('vinyl-source-stream')
const Promise = require('bluebird')
const coffeeify = require('coffeeify')
const browserify = require('browserify')
const icons = require('@cypress/icons')

gulp.task('clean', () => {
return gulp.src('dist')
.pipe(clean())
})

gulp.task('manifest', (done) => {
gulp.src('app/manifest.json')
.pipe(gulp.dest('dist'))
.on('end', () => {
return fs.readJson('dist/manifest.json', (err, json) => {
json.version = pkg.version

return fs.writeJson('dist/manifest.json', json, { spaces: 2 }, done)
})
})

return null
})

gulp.task('backup', () => {
return gulp.src('dist/background.js')
.pipe(rename('background_src.js'))
.pipe(gulp.dest('dist'))
})

gulp.task('background', () => {
return browserify({
entries: 'app/background.coffee',
transform: coffeeify,
})
.bundle()
.pipe(source('background.js'))
.pipe(gulp.dest('dist'))
})

gulp.task('html', () => {
return gulp.src('app/**/*.html')
.pipe(gulp.dest('dist'))
})

gulp.task('css', () => {
return gulp.src('app/**/*.css')
.pipe(gulp.dest('dist'))
})

gulp.task('icons', () => {
return gulp.src([
icons.getPathToIcon('icon_16x16.png'),
icons.getPathToIcon('icon_19x19.png'),
icons.getPathToIcon('icon_38x38.png'),
icons.getPathToIcon('icon_48x48.png'),
icons.getPathToIcon('icon_128x128.png'),
])
.pipe(gulp.dest('dist/icons'))
})

gulp.task('logos', () => {
return gulp.src([
icons.getPathToLogo('cypress-bw.png'),
])
.pipe(gulp.dest('dist/logos'))
})

gulp.task('watch', ['build'], () => {
return gulp.watch('app/**/*', ['build'])
})

gulp.task('build', () => {
return runSeq('clean', [
'icons',
'logos',
'manifest',
'background',
'html',
'css',
])
})

4 comments on commit 8b98d7b

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 8b98d7b Jul 26, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Circle has built the linux x64 version of the Test Runner.

You can install this pre-release platform-specific build using instructions at https://on.cypress.io/installing-cypress#Install-pre-release-version.

You will need to use custom CYPRESS_INSTALL_BINARY url and install Cypress using an url instead of the version.

export CYPRESS_INSTALL_BINARY=https://cdn.cypress.io/beta/binary/3.4.1/linux-x64/circle-develop-8b98d7b1660df4a5219d0462e376b6c811aec0cb-139029/cypress.zip
npm install https://cdn.cypress.io/beta/npm/3.4.1/circle-develop-8b98d7b1660df4a5219d0462e376b6c811aec0cb-139043/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 8b98d7b Jul 26, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AppVeyor has built the win32 ia32 version of the Test Runner.

You can install this pre-release platform-specific build using instructions at https://on.cypress.io/installing-cypress#Install-pre-release-version.

You will need to use custom CYPRESS_INSTALL_BINARY url and install Cypress using an url instead of the version.

set CYPRESS_INSTALL_BINARY=https://cdn.cypress.io/beta/binary/3.4.1/win32-ia32/appveyor-develop-8b98d7b1660df4a5219d0462e376b6c811aec0cb-26256152/cypress.zip
npm install https://cdn.cypress.io/beta/binary/3.4.1/win32-ia32/appveyor-develop-8b98d7b1660df4a5219d0462e376b6c811aec0cb-26256152/cypress.zip

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 8b98d7b Jul 26, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AppVeyor has built the win32 x64 version of the Test Runner.

You can install this pre-release platform-specific build using instructions at https://on.cypress.io/installing-cypress#Install-pre-release-version.

You will need to use custom CYPRESS_INSTALL_BINARY url and install Cypress using an url instead of the version.

set CYPRESS_INSTALL_BINARY=https://cdn.cypress.io/beta/binary/3.4.1/win32-x64/appveyor-develop-8b98d7b1660df4a5219d0462e376b6c811aec0cb-26256152/cypress.zip
npm install https://cdn.cypress.io/beta/binary/3.4.1/win32-x64/appveyor-develop-8b98d7b1660df4a5219d0462e376b6c811aec0cb-26256152/cypress.zip

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 8b98d7b Jul 26, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Circle has built the darwin x64 version of the Test Runner.

You can install this pre-release platform-specific build using instructions at https://on.cypress.io/installing-cypress#Install-pre-release-version.

You will need to use custom CYPRESS_INSTALL_BINARY url and install Cypress using an url instead of the version.

export CYPRESS_INSTALL_BINARY=https://cdn.cypress.io/beta/binary/3.4.1/darwin-x64/circle-develop-8b98d7b1660df4a5219d0462e376b6c811aec0cb-139046/cypress.zip
npm install https://cdn.cypress.io/beta/npm/3.4.1/circle-develop-8b98d7b1660df4a5219d0462e376b6c811aec0cb-139044/cypress.tgz

Please sign in to comment.