Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,7 @@ node_modules
.lock-wscript

.DS_Store

# Generated files
bundle.js
dist/
11 changes: 11 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,14 @@ before_install:
- tar -xjf phantomjs-2.0.0-ubuntu-12.04.tar.bz2
- export PATH=$PWD:$PATH
script: npm run ci
# whenever a tag is pushed, we deploy to github releases
before_deploy: npm run release
deploy:
provider: releases
api_key: $GH_TOKEN
file: "dist/chromeide.zip"
skip_cleanup: true
on:
tags: true
node: '0.10'
all_branches: true
29 changes: 29 additions & 0 deletions gulpfile.babel.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,26 @@

const path = require('path');

const del = require('del');
const gulp = require('gulp');
const chalk = require('chalk');
const zip = require('gulp-zip');
const gutil = require('gulp-util');
const webpack = require('webpack');

const shouldWatch = (process.argv.indexOf('--watch') !== -1);

const files = {
release: [
'manifest.json',
'index.html',
'bundle.js',
'background.js',
'_locales/**',
'icons/**'
]
};

const webpackConfig = {
entry: './client.js',
output: {
Expand Down Expand Up @@ -65,4 +78,20 @@ function js(cb){
});
}

function release(){
return gulp.src(files.release, { base: __dirname })
.pipe(zip('chromeide.zip'))
.pipe(gulp.dest('dist'));
}

function postinstall(cb){
// .pem files cause Chrome to show a bunch of warnings
// so we remove them on postinstall
del('node_modules/**/*.pem', cb);
}

gulp.task(release);
gulp.task(postinstall);

gulp.task('gh-release', gulp.series(js, release));
gulp.task('default', gulp.parallel(js));
6 changes: 5 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,11 @@
"browser-serialport": "git://github.com/garrows/browser-serialport#update",
"chalk": "^1.0.0",
"css-loader": "^0.9.1",
"del": "^1.1.1",
"expect": "git://github.com/phated/expect",
"gulp": "git://github.com/gulpjs/gulp#4.0",
"gulp-util": "^3.0.4",
"gulp-zip": "^2.0.3",
"html-loader": "^0.2.3",
"json-loader": "^0.5.1",
"level-js": "^2.1.6",
Expand All @@ -41,7 +43,9 @@
"scripts": {
"test": "zuul test/*.js --local --open",
"ci": "zuul test/*.js --phantom",
"build": "gulp"
"build": "gulp",
"release": "gulp gh-release",
"postinstall": "gulp postinstall"
},
"repository": {
"type": "git",
Expand Down