diff --git a/.gitignore b/.gitignore index 30a36fe..e8468a3 100644 --- a/.gitignore +++ b/.gitignore @@ -21,4 +21,9 @@ testem.log .node_modules.ember-try/ bower.json.ember-try package.json.ember-try + +# npm package-lock.json can get stale because we use yarn; someone might commit a npm installed `package-lock.json` +package-lock.json + +# git time metric /.gtm/ diff --git a/addon/mixins/autosize.js b/addon/mixins/autosize.js index f2d0134..6d95695 100644 --- a/addon/mixins/autosize.js +++ b/addon/mixins/autosize.js @@ -1,7 +1,5 @@ /* global autosize */ import { isPresent } from '@ember/utils'; - -import { on } from '@ember/object/evented'; import Mixin from '@ember/object/mixin'; /** @@ -10,24 +8,25 @@ import Mixin from '@ember/object/mixin'; * @see http://www.jacklmoore.com/autosize/ */ export default Mixin.create({ - - /** - * Once this textarea is being destroyed let's help clean up the DOM by removing the autosize binding. - * @see http://www.jacklmoore.com/autosize/ - */ - _removeAutosize: on('willDestroyElement', function () { - autosize.destroy(this.element); - }), - /** * Once this textarea is inserted in the DOM initialize on autosize. * @see https://github.com/jackmoore/autosize */ - _initializeAutosize: on('didInsertElement', function () { + didInsertElement() { + this._super(...arguments); autosize(this.element); this._setCss('min-height'); this._setCss('max-height'); - }), + }, + + /** + * Once this textarea is being destroyed let's help clean up the DOM by removing the autosize binding. + * @see http://www.jacklmoore.com/autosize/ + */ + willDestroyElement() { + this._super(...arguments); + autosize.destroy(this.element); + }, /** * Set the jquery css property `propertyName` with the component property `propertyName`. diff --git a/app/styles/app.scss b/app/styles/app.scss new file mode 100644 index 0000000..4c1d677 --- /dev/null +++ b/app/styles/app.scss @@ -0,0 +1,2 @@ +//noinspection CssUnknownTarget +@import "ember-cli-bootstrap-4/bootstrap"; diff --git a/blueprints/ember-cli-textarea-autosize/index.js b/blueprints/ember-cli-textarea-autosize/index.js index 9d95462..1987274 100644 --- a/blueprints/ember-cli-textarea-autosize/index.js +++ b/blueprints/ember-cli-textarea-autosize/index.js @@ -7,11 +7,11 @@ module.exports = { afterInstall: function (/*options*/) { return this.addAddonsToProject({ packages: [ - { name: 'ember-cli-text-support-mixins', target: '~1' } + { name: 'ember-cli-text-support-mixins', target: '~2.0.2' } ] }).then(() => { return this.addPackagesToProject([ - { name: 'autosize' } + { name: 'autosize' } // always install the latest ... that's trust baby ]) }); } diff --git a/bower.json b/bower.json index 13f028e..58e8412 100644 --- a/bower.json +++ b/bower.json @@ -1,7 +1,5 @@ { "name": "ember-cli-textarea-autosize", "devDependencies": { - "bootstrap-sass": "^3.3.7", - "font-awesome": "^4.7.0" } } diff --git a/install_ember_addons.sh b/install_ember_addons.sh index f7bcf98..10e4637 100755 --- a/install_ember_addons.sh +++ b/install_ember_addons.sh @@ -1,13 +1,26 @@ #!/bin/sh -ember install ember-cli-bootstrap3-sass +yarn add --dev clipboard + +ember install ct-emberjs-bling + +ember install @fortawesome/ember-fontawesome +yarn add @fortawesome/free-solid-svg-icons --dev +yarn add @fortawesome/free-brands-svg-icons --dev + +ember install ember-auto-import + +ember install ember-cli-app-version + +ember install ember-cli-bootstrap-4 + ember install ember-cli-deploy ember install ember-cli-deploy-build ember install ember-cli-deploy-gzip ember install ember-cli-deploy-s3 -ember install ember-cli-font-awesome-sass -ember install ember-cli-text-support-mixins@~1 +ember install ember-cli-deploy-slack + +ember install ember-cli-text-support-mixins@~2.0.0 -yarn add autosize@~4 --dev -yarn add bootswatch@3.3.7 --dev +yarn add autosize --dev yarn add ember-cli-node-assets # this must go into "dependencies" NOT "devDependencies" diff --git a/package.json b/package.json index bf4a6fc..59cc365 100644 --- a/package.json +++ b/package.json @@ -45,27 +45,36 @@ "ember-cli-node-assets": "^0.2.2" }, "devDependencies": { + "@fortawesome/ember-fontawesome": "^0.1.8", + "@fortawesome/free-brands-svg-icons": "^5.5.0", + "@fortawesome/free-solid-svg-icons": "^5.5.0", "autosize": "~4", + "bootstrap": "^4.1.0", "bootswatch": "3.3.7", "broccoli-asset-rev": "^2.4.5", + "clipboard": "^2.0.3", + "ct-emberjs-bling": "^0.0.1-rc.5", "ember-ajax": "^3.0.0", + "ember-auto-import": "^1.2.15", "ember-cli": "~2.18.2", - "ember-cli-bootstrap3-sass": "^1.0.6", + "ember-cli-app-version": "^3.2.0", + "ember-cli-bootstrap-4": "^0.7.0", "ember-cli-dependency-checker": "^2.0.0", "ember-cli-deploy": "^1.0.2", "ember-cli-deploy-build": "^1.1.1", "ember-cli-deploy-gzip": "^1.0.1", "ember-cli-deploy-s3": "^1.4.0", + "ember-cli-deploy-slack": "^1.0.1", + "ember-cli-element-closest-polyfill": "^0.0.1", "ember-cli-eslint": "^4.2.1", - "ember-cli-font-awesome-sass": "^1.0.4", "ember-cli-htmlbars": "^2.0.1", "ember-cli-htmlbars-inline-precompile": "^1.0.0", "ember-cli-inject-live-reload": "^1.4.1", "ember-cli-qunit": "^4.1.1", - "ember-cli-sass": "^8.0.1", + "ember-cli-sass": "^7.2.0", "ember-cli-shims": "^1.2.0", "ember-cli-sri": "^2.1.0", - "ember-cli-text-support-mixins": "^2.0.1", + "ember-cli-text-support-mixins": "^2.0.2-rc.1", "ember-cli-uglify": "^2.0.0", "ember-disable-prototype-extensions": "^1.1.2", "ember-export-application-global": "^2.0.0", @@ -77,6 +86,7 @@ "eslint-plugin-node": "^5.2.1", "keyevent": "^1.1.0", "loader.js": "^4.2.3", + "popper.js": "^1.14.0", "sass": "^1.14.3" }, "engines": { diff --git a/tests/dummy/app/components/auto-focus.js b/tests/dummy/app/components/auto-focus.js deleted file mode 100644 index 23dbe36..0000000 --- a/tests/dummy/app/components/auto-focus.js +++ /dev/null @@ -1,6 +0,0 @@ -import Component from '@ember/component'; -import layout from '../templates/components/auto-focus'; - -export default Component.extend({ - layout -}); diff --git a/tests/dummy/app/components/ctrl-enter-submits.js b/tests/dummy/app/components/ctrl-enter-submits.js deleted file mode 100644 index 64cbb9d..0000000 --- a/tests/dummy/app/components/ctrl-enter-submits.js +++ /dev/null @@ -1,11 +0,0 @@ -import Component from '@ember/component'; -import layout from '../templates/components/ctrl-enter-submits'; - -export default Component.extend({ - actions: { - submit() { - window.alert("The text-area's parent form had the submit event triggered with the Ctrl+Enter keystroke."); - } - }, - layout -}); diff --git a/tests/dummy/app/components/focus-select-text.js b/tests/dummy/app/components/focus-select-text.js deleted file mode 100644 index e2b676f..0000000 --- a/tests/dummy/app/components/focus-select-text.js +++ /dev/null @@ -1,6 +0,0 @@ -import Component from '@ember/component'; -import layout from '../templates/components/focus-select-text'; - -export default Component.extend({ - layout -}); diff --git a/tests/dummy/app/components/max-height.js b/tests/dummy/app/components/max-height.js deleted file mode 100644 index 83a6b31..0000000 --- a/tests/dummy/app/components/max-height.js +++ /dev/null @@ -1,6 +0,0 @@ -import Component from '@ember/component'; -import layout from '../templates/components/max-height'; - -export default Component.extend({ - layout -}); diff --git a/tests/dummy/app/components/min-height.js b/tests/dummy/app/components/min-height.js deleted file mode 100644 index 4e1bcea..0000000 --- a/tests/dummy/app/components/min-height.js +++ /dev/null @@ -1,6 +0,0 @@ -import Component from '@ember/component'; -import layout from '../templates/components/min-height'; - -export default Component.extend({ - layout -}); diff --git a/tests/dummy/app/controllers/demo/ctrl-enter-submits.js b/tests/dummy/app/controllers/demo/ctrl-enter-submits.js new file mode 100644 index 0000000..5410b49 --- /dev/null +++ b/tests/dummy/app/controllers/demo/ctrl-enter-submits.js @@ -0,0 +1,15 @@ +import Controller from '@ember/controller'; + +export default Controller.extend({ + actions: { + withSubmit(/*event*/) { + window.alert('