diff --git a/.editorconfig b/.editorconfig index 47c54384..219985c2 100644 --- a/.editorconfig +++ b/.editorconfig @@ -13,22 +13,8 @@ insert_final_newline = true indent_style = space indent_size = 2 -[*.js] -indent_style = space -indent_size = 2 - [*.hbs] insert_final_newline = false -indent_style = space -indent_size = 2 - -[*.css] -indent_style = space -indent_size = 2 - -[*.html] -indent_style = space -indent_size = 2 [*.{diff,md}] trim_trailing_whitespace = false diff --git a/.jshintrc b/.jshintrc index 08096eff..d421faa3 100644 --- a/.jshintrc +++ b/.jshintrc @@ -27,6 +27,6 @@ "strict": false, "white": false, "eqnull": true, - "esnext": true, + "esversion": 6, "unused": true } diff --git a/.npmignore b/.npmignore index a28e4ab3..fa8b147a 100644 --- a/.npmignore +++ b/.npmignore @@ -1,13 +1,16 @@ -bower_components/ -tests/ -tmp/ - +/bower_components +/config/ember-try.js +/dist +/tests +/tmp +**/.gitkeep .bowerrc .editorconfig .ember-cli +.gitignore +.jshintrc +.watchmanconfig .travis.yml -.npmignore -**/.gitkeep bower.json -Brocfile.js -testem.json +ember-cli-build.js +testem.js diff --git a/.watchmanconfig b/.watchmanconfig new file mode 100644 index 00000000..e7834e3e --- /dev/null +++ b/.watchmanconfig @@ -0,0 +1,3 @@ +{ + "ignore_dirs": ["tmp", "dist"] +} diff --git a/Brocfile.js b/Brocfile.js deleted file mode 100644 index 042a64dd..00000000 --- a/Brocfile.js +++ /dev/null @@ -1,21 +0,0 @@ -/* jshint node: true */ -/* global require, module */ - -var EmberAddon = require('ember-cli/lib/broccoli/ember-addon'); - -var app = new EmberAddon(); - -// Use `app.import` to add additional libraries to the generated -// output files. -// -// If you need to use different assets in different -// environments, specify an object as the first parameter. That -// object's keys should be the environment name and the values -// should be the asset to use in that environment. -// -// If the library that you are including contains AMD or ES6 -// modules that you would like to import into your application -// please specify an object with the list of modules as keys -// along with the exports of each module as its value. - -module.exports = app.toTree(); diff --git a/LICENSE.md b/LICENSE.md index 00e9fbbf..02000b56 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2015 +Copyright (c) 2016 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: diff --git a/bower.json b/bower.json index 78597152..3c5b6960 100644 --- a/bower.json +++ b/bower.json @@ -1,16 +1,8 @@ { "name": "ember-validations", "dependencies": { - "ember": "1.11.1", - "ember-cli-shims": "ember-cli/ember-cli-shims#0.0.3", - "ember-cli-test-loader": "ember-cli-test-loader#0.1.3", - "ember-data": "1.0.0-beta.16.1", - "ember-load-initializers": "ember-cli/ember-load-initializers#0.1.4", - "ember-qunit": "0.3.1", - "ember-qunit-notifications": "0.0.7", - "ember-resolver": "~0.1.15", - "jquery": "1.11.3", - "loader.js": "ember-cli/loader.js#3.2.0", - "qunit": "~1.17.1" + "ember": "~2.7.0", + "ember-cli-shims": "0.1.1", + "ember-qunit-notifications": "0.1.0" } } diff --git a/config/ember-try.js b/config/ember-try.js index 1b0df90d..a24af311 100644 --- a/config/ember-try.js +++ b/config/ember-try.js @@ -1,15 +1,76 @@ +/*jshint node:true*/ module.exports = { scenarios: [ { - name: "ember-1.11.0", - dependencies: { - "ember": "1.11.0" + name: 'default', + bower: { + dependencies: { } } }, { - name: "ember-1.12.0-beta.1", - dependencies: { - "ember": "1.12.0-beta.1" + name: 'ember-1.11', + bower: { + dependencies: { + 'ember': '~1.11.0' + }, + resolutions: { + 'ember': '~1.11.0' + } + } + }, + { + name: 'ember-1.12', + bower: { + dependencies: { + 'ember': '~1.12.0' + }, + resolutions: { + 'ember': '~1.12.0' + } + } + }, + { + name: 'ember-1.13', + bower: { + dependencies: { + 'ember': '~1.13.0' + }, + resolutions: { + 'ember': '~1.13.0' + } + } + }, + { + name: 'ember-release', + bower: { + dependencies: { + 'ember': 'components/ember#release' + }, + resolutions: { + 'ember': 'release' + } + } + }, + { + name: 'ember-beta', + bower: { + dependencies: { + 'ember': 'components/ember#beta' + }, + resolutions: { + 'ember': 'beta' + } + } + }, + { + name: 'ember-canary', + bower: { + dependencies: { + 'ember': 'components/ember#canary' + }, + resolutions: { + 'ember': 'canary' + } } } ] diff --git a/config/environment.js b/config/environment.js index 0dfaed47..28a787b6 100644 --- a/config/environment.js +++ b/config/environment.js @@ -1,3 +1,4 @@ +/*jshint node:true*/ 'use strict'; module.exports = function(/* environment, appConfig */) { diff --git a/ember-cli-build.js b/ember-cli-build.js new file mode 100644 index 00000000..4ac39137 --- /dev/null +++ b/ember-cli-build.js @@ -0,0 +1,18 @@ +/*jshint node:true*/ +/* global require, module */ +var EmberAddon = require('ember-cli/lib/broccoli/ember-addon'); + +module.exports = function(defaults) { + var app = new EmberAddon(defaults, { + // Add options here + }); + + /* + 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 + */ + + return app.toTree(); +}; diff --git a/package.json b/package.json index 985a1f86..7ee5f265 100644 --- a/package.json +++ b/package.json @@ -7,9 +7,9 @@ "test": "tests" }, "scripts": { - "start": "ember server", "build": "ember build", - "test": "ember try:testall" + "start": "ember server", + "test": "ember try:each" }, "repository": "https://github.com/dockyard/ember-validations", "engines": { @@ -18,27 +18,32 @@ "author": "Brian Cardarella", "license": "MIT", "devDependencies": { - "broccoli-asset-rev": "^2.0.2", - "ember-cli": "0.2.3", - "ember-cli-app-version": "0.3.3", - "ember-cli-content-security-policy": "0.4.0", - "ember-cli-dependency-checker": "0.0.8", - "ember-cli-htmlbars": "0.7.4", - "ember-cli-ic-ajax": "0.1.1", - "ember-cli-inject-live-reload": "^1.3.0", - "ember-cli-qunit": "0.3.10", - "ember-cli-uglify": "1.0.1", - "ember-data": "1.0.0-beta.16.1", - "ember-disable-prototype-extensions": "^1.0.0", - "ember-export-application-global": "^1.0.2", + "broccoli-asset-rev": "^2.4.2", + "ember-ajax": "^2.0.1", + "ember-cli": "2.7.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.0.0", + "ember-cli-release": "^0.2.9", + "ember-cli-sri": "^2.1.0", + "ember-cli-test-loader": "^1.1.0", + "ember-cli-uglify": "^1.2.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", "ember-test-container": "0.1.0", - "ember-try": "0.0.4" + "loader.js": "^4.0.1" }, "keywords": [ "ember-addon" ], "dependencies": { - "ember-cli-babel": "^5.0.0", + "ember-cli-babel": "^5.1.6", "ember-getowner-polyfill": "^1.0.0" }, "ember-addon": { diff --git a/testem.json b/testem.js similarity index 56% rename from testem.json rename to testem.js index bc17b0b0..26044b2f 100644 --- a/testem.json +++ b/testem.js @@ -1,10 +1,13 @@ -{ +/*jshint node:true*/ +module.exports = { "framework": "qunit", "test_page": "tests/index.html?hidepassed", + "disable_watching": true, "launch_in_ci": [ - "Chrome" + "PhantomJS" ], "launch_in_dev": [ + "PhantomJS", "Chrome" ] -} +}; diff --git a/tests/.jshintrc b/tests/.jshintrc index ea8b88f6..d2bd1134 100644 --- a/tests/.jshintrc +++ b/tests/.jshintrc @@ -26,7 +26,7 @@ "node": false, "browser": false, "boss": true, - "curly": false, + "curly": true, "debug": false, "devel": false, "eqeqeq": true, @@ -47,5 +47,6 @@ "strict": false, "white": false, "eqnull": true, - "esnext": true + "esversion": 6, + "unused": true } diff --git a/tests/dummy/app/app.js b/tests/dummy/app/app.js index 8d66b958..831ad610 100644 --- a/tests/dummy/app/app.js +++ b/tests/dummy/app/app.js @@ -1,16 +1,16 @@ import Ember from 'ember'; -import Resolver from 'ember/resolver'; -import loadInitializers from 'ember/load-initializers'; +import Resolver from './resolver'; +import loadInitializers from 'ember-load-initializers'; import config from './config/environment'; -var App; +let App; Ember.MODEL_FACTORY_INJECTIONS = true; App = Ember.Application.extend({ modulePrefix: config.modulePrefix, podModulePrefix: config.podModulePrefix, - Resolver: Resolver + Resolver }); loadInitializers(App, config.modulePrefix); diff --git a/tests/dummy/app/index.html b/tests/dummy/app/index.html index 1c49d36d..5120bd73 100644 --- a/tests/dummy/app/index.html +++ b/tests/dummy/app/index.html @@ -7,19 +7,19 @@ - {{content-for 'head'}} + {{content-for "head"}} - - + + - {{content-for 'head-footer'}} + {{content-for "head-footer"}}
- {{content-for 'body'}} + {{content-for "body"}} - - + + - {{content-for 'body-footer'}} + {{content-for "body-footer"}}