Skip to content

Update ember-cli and dependencies #25

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 21, 2017
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
4 changes: 0 additions & 4 deletions .bowerrc

This file was deleted.

13 changes: 13 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
module.exports = {
root: true,
parserOptions: {
ecmaVersion: 6,
sourceType: 'module'
},
extends: 'eslint:recommended',
env: {
browser: true
},
rules: {
}
};
32 changes: 0 additions & 32 deletions .jshintrc

This file was deleted.

15 changes: 6 additions & 9 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,19 @@
---
language: node_js
node_js:
- "0.12"
- "6"

sudo: false

cache:
directories:
- node_modules
yarn: true

before_install:
- "npm config set spin false"
- "npm install -g npm@^2"
- curl -o- -L https://yarnpkg.com/install.sh | bash
- export PATH=$HOME/.yarn/bin:$PATH

install:
- npm install -g bower
- npm install
- bower install
- yarn install --no-lockfile

script:
- npm test
- yarn test
21 changes: 0 additions & 21 deletions Brocfile.js

This file was deleted.

6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,11 @@ The following properties are expected to be present on the deployment `context`

## Running Tests

- `npm test`
* `yarn test`

## Why `ember build` and `ember test` don't work

Since this is a node-only ember-cli addon, this package does not include many files and dependencies which are part of ember-cli's typical `ember build` and `ember test` processes.

[1]: http://ember-cli-deploy.github.io/ember-cli-deploy/plugins/ "Plugin Documentation"
[2]: https://github.com/zapnito/ember-cli-deploy-build "ember-cli-deploy-build"
Expand Down
Empty file removed addon/.gitkeep
Empty file.
Empty file removed app/.gitkeep
Empty file.
16 changes: 0 additions & 16 deletions bower.json

This file was deleted.

15 changes: 10 additions & 5 deletions circle.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
machine:
node:
version: 0.12.0
version: 4
environment:
PATH: "${PATH}:${HOME}/${CIRCLE_PROJECT_REPONAME}/node_modules/.bin"

dependencies:
pre:
- npm install -g bower
override:
- npm i
- bower i
- yarn
cache_directories:
- ~/.cache/yarn

test:
override:
- yarn test
12 changes: 6 additions & 6 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* jshint node: true */
/*eslint-env node*/
'use strict';

var Promise = require('ember-cli/lib/ext/promise');
var RSVP = require('rsvp');
var fs = require('fs');
var path = require('path');
var minimatch = require('minimatch');
Expand Down Expand Up @@ -42,7 +42,7 @@ module.exports = {
}
},

willUpload: function(context) {
willUpload: function(/* context */) {
var self = this;

var filePattern = this.readConfig('filePattern');
Expand Down Expand Up @@ -74,13 +74,13 @@ module.exports = {
return !minimatch(path, ignorePattern, { matchBase: true });
});
}
return Promise.map(filesToGzip, this._gzipFile.bind(this, distDir, keep));
return RSVP.map(filesToGzip, this._gzipFile.bind(this, distDir, keep));
},
_gzipFile: function(distDir, keep, filePath) {
var self = this;
var fullPath = path.join(distDir, filePath);
var outFilePath = fullPath + '.gz';
return new Promise(function(resolve, reject) {
return new RSVP.Promise(function(resolve, reject) {
var gzip = self.gzipLibrary.createGzip({ format: 'gzip' });
var inp = fs.createReadStream(fullPath);
var out = fs.createWriteStream(outFilePath);
Expand Down Expand Up @@ -111,7 +111,7 @@ module.exports = {
},
_errorMessage: function(error) {
this.log(error, { color: 'red' });
return Promise.reject(error);
return RSVP.reject(error);
}
});
return new DeployPlugin();
Expand Down
16 changes: 8 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"scripts": {
"start": "ember server",
"build": "ember build",
"test": "node tests/runner.js"
"test": "node tests/runner.js && ./node_modules/.bin/eslint index.js tests/**/*.js"
},
"repository": "https://github.com/ember-cli-deploy/ember-cli-deploy-gzip",
"engines": {
Expand All @@ -18,14 +18,14 @@
"author": "Luke Melia and ember-cli-deploy team",
"license": "MIT",
"devDependencies": {
"broccoli-asset-rev": "^2.0.2",
"chai": "^3.5.0",
"chai-as-promised": "^5.3.0",
"ember-cli": "2.9.1",
"ember-cli-release": "1.0.0-beta.2",
"github": "^2.5.1",
"chai-as-promised": "^6.0.0",
"ember-cli": "^2.12.0",
"ember-cli-release": "^1.0.0-beta.2",
"eslint": "^3.18.0",
"github": "^9.2.0",
"glob": "^7.0.5",
"mocha": "^3.0.2",
"mocha": "^3.2.0",
"multiline": "^1.0.2",
"rimraf": "^2.3.4"
},
Expand All @@ -38,7 +38,7 @@
"core-object": "^2.0.6",
"ember-cli-deploy-plugin": "^0.2.6",
"minimatch": "^3.0.3",
"rsvp": "^3.2.1"
"rsvp": "^3.5.0"
},
"ember-addon": {
"configPath": "tests/dummy/config"
Expand Down
11 changes: 0 additions & 11 deletions testem.json

This file was deleted.

11 changes: 11 additions & 0 deletions tests/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
module.exports = {
globals: {
"describe": true,
"beforeEach": true,
"afterEach": true,
"it": true
},
env: {
embertest: true
}
};
51 changes: 0 additions & 51 deletions tests/.jshintrc

This file was deleted.

1 change: 1 addition & 0 deletions tests/helpers/assert.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/*eslint-env node*/
var chai = require('chai');
var chaiAsPromised = require("chai-as-promised");
chai.use(chaiAsPromised);
Expand Down
9 changes: 5 additions & 4 deletions tests/unit/index-nodetest.js → tests/index-test.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
/*eslint-env node*/
'use strict';

var Promise = require('ember-cli/lib/ext/promise');
var assert = require('../helpers/assert');
var RSVP = require('rsvp');
var assert = require('./helpers/assert');
var fs = require('fs');
var path = require('path');
var rimraf = Promise.denodeify(require('rimraf'));
var rimraf = RSVP.denodeify(require('rimraf'));

describe('gzip plugin', function() {
var subject, mockUi, config;

beforeEach(function() {
subject = require('../../index');
subject = require('../index');
mockUi = {
verbose: true,
messages: [],
Expand Down
33 changes: 0 additions & 33 deletions tests/index.html

This file was deleted.

5 changes: 3 additions & 2 deletions tests/runner.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/*eslint-env node*/
'use strict';

var glob = require('glob');
Expand All @@ -14,10 +15,10 @@ function addFiles(mocha, files) {
glob.sync(root + files).forEach(mocha.addFile.bind(mocha));
}

addFiles(mocha, '/**/*-nodetest.js');
addFiles(mocha, '/**/*-test.js');

if (arg === 'all') {
addFiles(mocha, '/**/*-nodetest-slow.js');
addFiles(mocha, '/**/*-test-slow.js');
}

mocha.run(function(failures) {
Expand Down
Empty file removed tests/unit/.gitkeep
Empty file.
Empty file removed vendor/.gitkeep
Empty file.
Loading