Skip to content

Commit

Permalink
chore(all): update build and lint
Browse files Browse the repository at this point in the history
  • Loading branch information
EisenbergEffect committed Jun 3, 2016
1 parent 608b133 commit a97fa7b
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 24 deletions.
3 changes: 0 additions & 3 deletions .eslintrc

This file was deleted.

3 changes: 3 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "./node_modules/aurelia-tools/.eslintrc.json"
}
12 changes: 12 additions & 0 deletions build/tasks/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,14 @@ var tools = require('aurelia-tools');

var jsName = paths.packageName + '.js';

function cleanGeneratedCode() {
return through2.obj(function(file, enc, callback) {
file.contents = new Buffer(tools.cleanGeneratedCode(file.contents.toString("utf8")));
this.push(file);
return callback();
})
}

gulp.task('build-index', function(){
var importsToAdd = [];

Expand All @@ -32,24 +40,28 @@ gulp.task('build-index', function(){
gulp.task('build-es2015', function () {
return gulp.src(paths.output + jsName)
.pipe(to5(assign({}, compilerOptions.es2015())))
.pipe(cleanGeneratedCode())
.pipe(gulp.dest(paths.output + 'es2015'));
});

gulp.task('build-commonjs', function () {
return gulp.src(paths.output + jsName)
.pipe(to5(assign({}, compilerOptions.commonjs())))
.pipe(cleanGeneratedCode())
.pipe(gulp.dest(paths.output + 'commonjs'));
});

gulp.task('build-amd', function () {
return gulp.src(paths.output + jsName)
.pipe(to5(assign({}, compilerOptions.amd())))
.pipe(cleanGeneratedCode())
.pipe(gulp.dest(paths.output + 'amd'));
});

gulp.task('build-system', function () {
return gulp.src(paths.output + jsName)
.pipe(to5(assign({}, compilerOptions.system())))
.pipe(cleanGeneratedCode())
.pipe(gulp.dest(paths.output + 'system'));
});

Expand Down
10 changes: 3 additions & 7 deletions dist/amd/aurelia-fetch-client.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,15 @@ define(['exports'], function (exports) {
return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj;
};

function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) {
throw new TypeError("Cannot call a class as a function");
}
}


function json(body) {
return new Blob([JSON.stringify(body)], { type: 'application/json' });
}

var HttpClientConfiguration = exports.HttpClientConfiguration = function () {
function HttpClientConfiguration() {
_classCallCheck(this, HttpClientConfiguration);


this.baseUrl = '';
this.defaults = {};
Expand Down Expand Up @@ -69,7 +65,7 @@ define(['exports'], function (exports) {

var HttpClient = exports.HttpClient = function () {
function HttpClient() {
_classCallCheck(this, HttpClient);


this.activeRequestCount = 0;
this.isRequesting = false;
Expand Down
6 changes: 3 additions & 3 deletions dist/commonjs/aurelia-fetch-client.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol

exports.json = json;

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }


function json(body) {
return new Blob([JSON.stringify(body)], { type: 'application/json' });
}

var HttpClientConfiguration = exports.HttpClientConfiguration = function () {
function HttpClientConfiguration() {
_classCallCheck(this, HttpClientConfiguration);


this.baseUrl = '';
this.defaults = {};
Expand Down Expand Up @@ -61,7 +61,7 @@ function rejectOnError(response) {

var HttpClient = exports.HttpClient = function () {
function HttpClient() {
_classCallCheck(this, HttpClient);


this.activeRequestCount = 0;
this.isRequesting = false;
Expand Down
12 changes: 5 additions & 7 deletions dist/system/aurelia-fetch-client.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
'use strict';

System.register([], function (_export, _context) {
"use strict";

var _typeof, HttpClientConfiguration, HttpClient, absoluteUrlRegexp;

function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) {
throw new TypeError("Cannot call a class as a function");
}
}


function rejectOnError(response) {
if (!response.ok) {
Expand Down Expand Up @@ -125,7 +123,7 @@ System.register([], function (_export, _context) {

_export('HttpClientConfiguration', HttpClientConfiguration = function () {
function HttpClientConfiguration() {
_classCallCheck(this, HttpClientConfiguration);


this.baseUrl = '';
this.defaults = {};
Expand Down Expand Up @@ -164,7 +162,7 @@ System.register([], function (_export, _context) {

_export('HttpClient', HttpClient = function () {
function HttpClient() {
_classCallCheck(this, HttpClient);


this.activeRequestCount = 0;
this.isRequesting = false;
Expand Down
9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@
}
},
"devDependencies": {
"aurelia-tools": "0.1.16",
"aurelia-tools": "^0.2.1",
"babel-dts-generator": "^0.4.5",
"babel-eslint": "^4.1.1",
"babel-eslint": "^6.0.4",
"babel-plugin-syntax-flow": "^6.5.0",
"babel-plugin-transform-decorators-legacy": "^1.3.4",
"babel-plugin-transform-es2015-modules-amd": "^6.6.5",
Expand All @@ -52,14 +52,15 @@
"babel-preset-es2015": "^6.6.0",
"babel-preset-es2015-loose": "^7.0.0",
"babel-preset-stage-1": "^6.5.0",
"conventional-changelog": "0.0.11",
"conventional-changelog": "^1.1.0",
"del": "^1.1.0",
"eslint": "^2.11.1",
"gulp": "^3.8.10",
"gulp-babel": "^6.1.2",
"gulp-bump": "^0.3.1",
"gulp-concat": "^2.6.0",
"gulp-coveralls": "0.1.4",
"gulp-eslint": "^1.0.0",
"gulp-eslint": "^2.0.0",
"gulp-insert": "^0.4.0",
"gulp-rename": "^1.2.2",
"gulp-typedoc": "^1.2.1",
Expand Down

0 comments on commit a97fa7b

Please sign in to comment.