Skip to content

Commit

Permalink
Upgrades to ember-cli 2.13.1, AND Imports dropzone from npm using emb…
Browse files Browse the repository at this point in the history
…er-cli-node-modules-to-vendor
  • Loading branch information
jakeleboeuf committed May 9, 2017
1 parent 019e55e commit 99ad293
Show file tree
Hide file tree
Showing 23 changed files with 9,052 additions and 114 deletions.
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: 2017,
sourceType: 'module'
},
extends: 'eslint:recommended',
env: {
browser: true
},
rules: {
}
};
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# See http://help.github.com/ignore-files/ for more about ignoring files.
# See https://help.github.com/ignore-files/ for more about ignoring files.

# compiled output
/dist
Expand All @@ -13,5 +13,5 @@
/connect.lock
/coverage/*
/libpeerconnection.log
npm-debug.log
npm-debug.log*
testem.log
2 changes: 1 addition & 1 deletion .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
.editorconfig
.ember-cli
.gitignore
.jshintrc
.eslintrc.js
.watchmanconfig
.travis.yml
bower.json
Expand Down
20 changes: 9 additions & 11 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,39 +1,37 @@
---
language: node_js
node_js:
- "4"
- "6"

sudo: false

cache:
directories:
- node_modules
- $HOME/.npm

env:
- EMBER_TRY_SCENARIO=default
- EMBER_TRY_SCENARIO=ember-1.13
# we recommend testing LTS's and latest stable release (bonus points to beta/canary)
- EMBER_TRY_SCENARIO=ember-lts-2.4
- EMBER_TRY_SCENARIO=ember-lts-2.8
- EMBER_TRY_SCENARIO=ember-release
- EMBER_TRY_SCENARIO=ember-beta
- EMBER_TRY_SCENARIO=ember-canary
- EMBER_TRY_SCENARIO=ember-default

matrix:
fast_finish: true
allow_failures:
- env: EMBER_TRY_SCENARIO=ember-beta
- env: EMBER_TRY_SCENARIO=ember-canary

before_install:
- npm config set spin false
- npm install -g bower
- bower --version
- npm install phantomjs-prebuilt
- node_modules/phantomjs-prebuilt/bin/phantomjs --version
- npm install -g phantomjs-prebuilt
- phantomjs --version

install:
- npm install
- bower install

script:
# Usually, it's ok to finish the test scenario without reverting
# to the addon's original dependency state, skipping "cleanup".
- ember try:one $EMBER_TRY_SCENARIO test --skip-cleanup
- node_modules/.bin/ember try:one $EMBER_TRY_SCENARIO test --skip-cleanup
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Drag and drop file uploader addon for ember-cli using [Dropzonejs](http://www.dr

Versions
-------------
Current version is running ember-cli >= `2.8.0`
Current version is running ember-cli >= `2.13.1`

Versions 0.8.6 <= are running ember-cli `1.13.8`

Expand Down
6 changes: 1 addition & 5 deletions blueprints/ember-cli-dropzonejs/index.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
/*jshint node:true*/
module.exports = {
normalizeEntityName: function() {},

afterInstall: function(options) {
return this.addBowerPackageToProject('dropzone');
}
normalizeEntityName: function() {}
};
7 changes: 0 additions & 7 deletions bower.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
{
"name": "ember-cli-dropzonejs",
"dependencies": {
"dropzone": "^4.3.0",
"jquery": "1.11.3",
"ember": "~2.8.0",
"ember-cli-shims": "0.1.1"
},
"resolutions": {
"ember": ">=1.4"
}
}
48 changes: 42 additions & 6 deletions config/ember-try.js
Original file line number Diff line number Diff line change
@@ -1,20 +1,35 @@
/*jshint node:true*/
/* eslint-env node */
module.exports = {
scenarios: [
{
name: 'default',
name: 'ember-lts-2.4',
bower: {
dependencies: { }
dependencies: {
'ember': 'components/ember#lts-2-4'
},
resolutions: {
'ember': 'lts-2-4'
}
},
npm: {
devDependencies: {
'ember-source': null
}
}
},
{
name: 'ember-1.13',
name: 'ember-lts-2.8',
bower: {
dependencies: {
'ember': '~1.13.0'
'ember': 'components/ember#lts-2-8'
},
resolutions: {
'ember': '~1.13.0'
'ember': 'lts-2-8'
}
},
npm: {
devDependencies: {
'ember-source': null
}
}
},
Expand All @@ -27,6 +42,11 @@ module.exports = {
resolutions: {
'ember': 'release'
}
},
npm: {
devDependencies: {
'ember-source': null
}
}
},
{
Expand All @@ -38,6 +58,11 @@ module.exports = {
resolutions: {
'ember': 'beta'
}
},
npm: {
devDependencies: {
'ember-source': null
}
}
},
{
Expand All @@ -49,6 +74,17 @@ module.exports = {
resolutions: {
'ember': 'canary'
}
},
npm: {
devDependencies: {
'ember-source': null
}
}
},
{
name: 'ember-default',
npm: {
devDependencies: {}
}
}
]
Expand Down
2 changes: 1 addition & 1 deletion config/environment.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*jshint node:true*/
/* eslint-env node */
'use strict';

module.exports = function(/* environment, appConfig */) {
Expand Down
19 changes: 8 additions & 11 deletions ember-cli-build.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,15 @@
/*jshint node:true*/
/* global require, module */
var EmberAddon = require('ember-cli/lib/broccoli/ember-addon');
/* eslint-env node */
const EmberAddon = require('ember-cli/lib/broccoli/ember-addon');

module.exports = function(defaults) {
var app = new EmberAddon(defaults, {
// Add options here
let app = new EmberAddon(defaults, {
nodeModulesToVendor: [
'node_modules/dropzone/dist/min'
]
});

/*
This build file specifies the options for the dummy test app of this
addon, located in `/tests/dummy`
This build file does *not* influence how the addon or the app using it
behave. You most likely want to be modifying `./index.js` or app's build file
*/
app.import('vendor/dropzone.min.js');
app.import('vendor/dropzone.min.css');

return app.toTree();
};
18 changes: 1 addition & 17 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,5 @@
'use strict';

module.exports = {
name: 'ember-cli-dropzonejs',
included: function(app) {
this._super.included.apply(this, arguments);

var host = this._findHost();

var options = host.options && host.options.emberCliDropzonejs || { includeDropzoneCss: true };

if (!process.env.EMBER_CLI_FASTBOOT) {
// This will only be included in the browser build
this.import(host.bowerDirectory + '/dropzone/dist/dropzone.js');
}

if (options.includeDropzoneCss){
this.import(host.bowerDirectory + '/dropzone/dist/dropzone.css');
}
}
name: 'ember-cli-dropzonejs'
};
1 change: 1 addition & 0 deletions jsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"compilerOptions":{"target":"es6","experimentalDecorators":true},"exclude":["node_modules","bower_components","tmp","vendor",".git","dist"]}
49 changes: 20 additions & 29 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ember-cli-dropzonejs",
"version": "0.9.2",
"version": "0.9.3",
"description": "Drag and drop file uploader addon using dropzonejs",
"directories": {
"doc": "doc",
Expand All @@ -15,32 +15,32 @@
"type": "git",
"url": "https://github.com/FutoRicky/ember-cli-dropzonejs.git"
},
"engines": {
"node": ">= 0.10.0"
"dependencies": {
"ember-cli-babel": "^6.0.0"
},
"author": "Ricardo Mercado <[email protected]>",
"license": "MIT",
"devDependencies": {
"broccoli-asset-rev": "^2.4.2",
"ember-ajax": "^2.0.1",
"ember-cli": "2.8.0",
"ember-cli-app-version": "^1.0.0",
"ember-cli-dependency-checker": "^1.2.0",
"ember-cli-htmlbars": "^1.0.3",
"ember-cli-htmlbars-inline-precompile": "^0.3.1",
"ember-cli-inject-live-reload": "^1.4.0",
"ember-cli-jshint": "^1.0.0",
"ember-cli-qunit": "^2.1.0",
"ember-cli-release": "^0.2.9",
"broccoli-asset-rev": "^2.4.5",
"dropzone": "^4.3.0",
"ember-ajax": "^3.0.0",
"ember-cli": "2.13.1",
"ember-cli-dependency-checker": "^1.3.0",
"ember-cli-eslint": "^3.0.0",
"ember-cli-htmlbars": "^1.1.1",
"ember-cli-htmlbars-inline-precompile": "^0.4.0",
"ember-cli-inject-live-reload": "^1.4.1",
"ember-cli-node-modules-to-vendor": "^0.2.0",
"ember-cli-qunit": "^4.0.0",
"ember-cli-shims": "^1.1.0",
"ember-cli-sri": "^2.1.0",
"ember-cli-test-loader": "^1.1.0",
"ember-cli-uglify": "^1.2.0",
"ember-data": "^2.8.0",
"ember-disable-prototype-extensions": "^1.1.0",
"ember-export-application-global": "^1.0.5",
"ember-load-initializers": "^0.5.1",
"ember-resolver": "^2.0.3",
"loader.js": "^4.0.1",
"ember-export-application-global": "^2.0.0",
"ember-load-initializers": "^1.0.0",
"ember-resolver": "^4.0.0",
"ember-source": "~2.13.0",
"loader.js": "^4.2.3",
"phantomjs": "1.9.16"
},
"keywords": [
Expand All @@ -54,15 +54,6 @@
"ember-cli drag and drop",
"ember-cli-drag-and-drop"
],
"dependencies": {
"ember-cli-babel": "^5.1.6",
"ember-cli-htmlbars": "1.1.0",
"ember-cli-import-polyfill": "0.2.0"
},
"browser": {
"jquery": "../jquery/jquery.js",
"handlebars": "../handlebars/handlebars.js"
},
"ember-addon": {
"configPath": "tests/dummy/config",
"demoURL": "http://futoricky.github.io/ember-cli-dropzonejs/"
Expand Down
3 changes: 1 addition & 2 deletions testem.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/*jshint node:true*/
/* eslint-env node */
module.exports = {
"framework": "qunit",
"test_page": "tests/index.html?hidepassed",
"disable_watching": true,
"launch_in_ci": [
Expand Down
12 changes: 0 additions & 12 deletions testem.json

This file was deleted.

5 changes: 5 additions & 0 deletions tests/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
env: {
embertest: true
}
};
7 changes: 5 additions & 2 deletions tests/dummy/config/environment.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* jshint node: true */
/* eslint-env node */

module.exports = function(environment) {
var ENV = {
Expand All @@ -19,6 +19,10 @@ module.exports = function(environment) {
},
contentSecurityPolicy: {
'default-src': "'none' *",
},
EXTEND_PROTOTYPES: {
// Prevent Ember Data from overriding Date.parse.
Date: false,
'script-src': "'self' 'unsafe-eval' *",
'font-src': "'self' *",
'connect-src': "'self' *",
Expand All @@ -29,7 +33,6 @@ module.exports = function(environment) {
};

if (environment === 'development') {
// ENV.APP.LOG_RESOLVER = true;
// ENV.APP.LOG_ACTIVE_GENERATION = true;
// ENV.APP.LOG_TRANSITIONS = true;
// ENV.APP.LOG_TRANSITIONS_INTERNAL = true;
Expand Down
10 changes: 10 additions & 0 deletions tests/dummy/config/targets.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/* eslint-env node */

module.exports = {
browsers: [
'ie 9',
'last 1 Chrome versions',
'last 1 Firefox versions',
'last 1 Safari versions'
]
};
Loading

0 comments on commit 99ad293

Please sign in to comment.