Skip to content
This repository has been archived by the owner on Aug 27, 2019. It is now read-only.

Commit

Permalink
Use Travis for building
Browse files Browse the repository at this point in the history
  • Loading branch information
ExE-Boss committed May 28, 2018
1 parent 71f07a3 commit 458cf05
Show file tree
Hide file tree
Showing 6 changed files with 59 additions and 9 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@
!/yarn*
!/.*ignore

## Travis CI
!/.travis.yml

# Unwanted crap
.DS_Store
.DS_Store?
Expand Down
25 changes: 25 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Configuration
sudo: false
language: node_js

node_js:
- "stable"

# The install script
install:
- yarn install

# The pre-build script
before_script:
- yarn run lint

# The build script
script:
- yarn run build

# Disable email notifications
notifications:
email: false

# WHO IN THE F# (the programming language) DOESN’T SUPPORT TABS IN 2017? ' ' <- tab
# P.S.: F# (the programming language) also doesn’t support tabs, and that's terrible
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
[![Build](https://travis-ci.com/ExE-Boss/app-menu.svg?branch=master)](https://travis-ci.com/ExE-Boss/app-menu)
[![Mozilla Add-on](https://img.shields.io/amo/v/application-menu.svg)](https://addons.mozilla.org/firefox/addon/application-menu/)
[![devDependencies](https://img.shields.io/david/dev/ExE-Boss/app-menu.svg)](https://david-dm.org/ExE-Boss/app-menu?type=dev)
[![License](https://img.shields.io/github/license/ExE-Boss/app-menu.svg)](https://github.com/ExE-Boss/app-menu/blob/master/LICENSE)
Expand Down
23 changes: 17 additions & 6 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ const gulp = require("gulp");
const webExt = require("web-ext").default;
const mergeStream = require("merge-stream");

const eslint = require("gulp-eslint");
const jsonEdit = require("gulp-json-editor");
const pkgJson = require("./package.json");

Expand All @@ -15,6 +16,14 @@ const BUILD_DIR = "./build/";
const SOURCE_DIR = "./src/";
const ARCHIVES_DIR = "./dist/";

gulp.task("clean", () => {
try {
fse.emptyDirSync(BUILD_DIR);
} catch (e) {
console.error(e);
}
});

{
const build = () => {
return mergeStream(
Expand All @@ -31,12 +40,14 @@ const ARCHIVES_DIR = "./dist/";
gulp.task("build-clean", ["clean"], build);
}

gulp.task("clean", () => {
try {
fse.emptyDirSync(BUILD_DIR);
} catch (e) {
console.error(e);
}
gulp.task("lint", ["build-clean"], () => {
webExt.cmd.lint({
sourceDir: BUILD_DIR
}, {shouldExitProgram: false});
return gulp.src(`${BUILD_DIR}**/*.js`)
.pipe(eslint())
.pipe(eslint.format())
.pipe(eslint.failAfterError());
});

gulp.task("dist", ["build-clean"], () => {
Expand Down
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
"version": "0.1.8a1",
"author": "ExE Boss",
"scripts": {
"build": "gulp build",
"build": "gulp build",
"dist": "gulp dist",
"lint": "gulp lint",
"run": "gulp run"
},
"repository": {
Expand All @@ -22,6 +23,7 @@
"fs-extra": "^6.0.1",
"gulp": "^3.9.1",
"gulp-cli": "^2.0.1",
"gulp-eslint": "^4.0.2",
"gulp-json-editor": "^2.4.1",
"merge-stream": "^1.0.1",
"stylelint": "^9.2.1",
Expand Down
12 changes: 10 additions & 2 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1626,7 +1626,7 @@ eslint-visitor-keys@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz#3f3180fb2e291017716acb4c9d6d5b5c34a6a81d"

[email protected], eslint@^4.19.1:
[email protected], eslint@^4.0.0, eslint@^4.19.1:
version "4.19.1"
resolved "https://registry.yarnpkg.com/eslint/-/eslint-4.19.1.tgz#32d1d653e1d90408854bfb296f076ec7e186a300"
dependencies:
Expand Down Expand Up @@ -2451,6 +2451,14 @@ gulp-cli@^2.0.1:
v8flags "^3.0.1"
yargs "^7.1.0"

gulp-eslint@^4.0.2:
version "4.0.2"
resolved "https://registry.yarnpkg.com/gulp-eslint/-/gulp-eslint-4.0.2.tgz#18a2a6768e4404cbf3e203239cb57474168fa606"
dependencies:
eslint "^4.0.0"
fancy-log "^1.3.2"
plugin-error "^1.0.0"

gulp-json-editor@^2.4.1:
version "2.4.1"
resolved "https://registry.yarnpkg.com/gulp-json-editor/-/gulp-json-editor-2.4.1.tgz#ef9dfcc7a29c664bdd0e992a331d2f1b0e64650d"
Expand Down Expand Up @@ -4386,7 +4394,7 @@ [email protected], pino@~4.16.1:
quick-format-unescaped "^1.1.2"
split2 "^2.2.0"

plugin-error@^1.0.1:
plugin-error@^1.0.0, plugin-error@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/plugin-error/-/plugin-error-1.0.1.tgz#77016bd8919d0ac377fdcdd0322328953ca5781c"
dependencies:
Expand Down

0 comments on commit 458cf05

Please sign in to comment.