Skip to content

Commit

Permalink
upgrade dummmy app
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanpenner committed Jun 1, 2018
1 parent dc8ad56 commit cd54a16
Show file tree
Hide file tree
Showing 22 changed files with 7,825 additions and 3,232 deletions.
1 change: 1 addition & 0 deletions test/fixtures/my-addon/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/blueprints/*/files/**/*.js
41 changes: 39 additions & 2 deletions test/fixtures/my-addon/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,47 @@ module.exports = {
ecmaVersion: 2017,
sourceType: 'module'
},
extends: 'eslint:recommended',
plugins: [
'ember'
],
extends: [
'eslint:recommended',
'plugin:ember/recommended'
],
env: {
browser: true
},
rules: {
}
},
overrides: [
// node files
{
files: [
'ember-cli-build.js',
'index.js',
'testem.js',
'blueprints/*/index.js',
'config/**/*.js',
'tests/dummy/config/**/*.js'
],
excludedFiles: [
'addon/**',
'addon-test-support/**',
'app/**',
'tests/dummy/app/**'
],
parserOptions: {
sourceType: 'script',
ecmaVersion: 2015
},
env: {
browser: false,
node: true
},
plugins: ['node'],
rules: Object.assign({}, require('eslint-plugin-node').configs.recommended.rules, {
// add your custom rules and overrides for node files here
})
}
]
};
7 changes: 6 additions & 1 deletion test/fixtures/my-addon/.npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,15 @@
.bowerrc
.editorconfig
.ember-cli
.gitignore
.eslintrc.js
.gitignore
.watchmanconfig
.travis.yml
bower.json
ember-cli-build.js
testem.js

# ember-try
.node_modules.ember-try/
bower.json.ember-try
package.json.ember-try
31 changes: 18 additions & 13 deletions test/fixtures/my-addon/.travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,29 @@ node_js:
- "4"

sudo: false
dist: trusty

addons:
chrome: stable

cache:
directories:
- $HOME/.npm

env:
# we recommend new addons test the current and previous LTS
# as well as latest stable release (bonus points to beta/canary)
- EMBER_TRY_SCENARIO=ember-lts-2.8
- EMBER_TRY_SCENARIO=ember-lts-2.12
- EMBER_TRY_SCENARIO=ember-release
- EMBER_TRY_SCENARIO=ember-beta
- EMBER_TRY_SCENARIO=ember-canary
- EMBER_TRY_SCENARIO=ember-default
global:
# See https://git.io/vdao3 for details.
- JOBS=1
matrix:
# we recommend new addons test the current and previous LTS
# as well as latest stable release (bonus points to beta/canary)
- EMBER_TRY_SCENARIO=ember-lts-2.12
- EMBER_TRY_SCENARIO=ember-lts-2.16
- EMBER_TRY_SCENARIO=ember-lts-2.18
- EMBER_TRY_SCENARIO=ember-release
- EMBER_TRY_SCENARIO=ember-beta
- EMBER_TRY_SCENARIO=ember-canary
- EMBER_TRY_SCENARIO=ember-default

matrix:
fast_finish: true
Expand All @@ -30,13 +39,9 @@ before_install:
- npm config set spin false
- npm install -g npm@4
- npm --version
- npm install -g phantomjs-prebuilt
- phantomjs --version

install:
- npm install

script:
- npm run lint:js
# Usually, it's ok to finish the test scenario without reverting
# to the addon's original dependency state, skipping "cleanup".
- node_modules/.bin/ember try:one $EMBER_TRY_SCENARIO --skip-cleanup
50 changes: 37 additions & 13 deletions test/fixtures/my-addon/README.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,50 @@
# my-addon
my-addon
==============================================================================

This README outlines the details of collaborating on this Ember addon.
[Short description of the addon.]

## Installation
Installation
------------------------------------------------------------------------------

* `git clone <repository-url>` this repository
```
ember install my-addon
```


Usage
------------------------------------------------------------------------------

[Longer description of how to use the addon in apps.]


Contributing
------------------------------------------------------------------------------

### Installation

* `git clone <repository-url>`
* `cd my-addon`
* `npm install`

## Running
### Linting

* `ember serve`
* Visit your app at [http://localhost:4200](http://localhost:4200).
* `npm run lint:js`
* `npm run lint:js -- --fix`

## Running Tests
### Running tests

* `npm test` (Runs `ember try:each` to test your addon against multiple Ember versions)
* `ember test`
* `ember test --server`
* `ember test` Runs the test suite on the current Ember version
* `ember test --server` – Runs the test suite in "watch mode"
* `ember try:each` – Runs the test suite against multiple Ember versions

## Building
### Running the dummy application

* `ember build`
* `ember serve`
* Visit the dummy application at [http://localhost:4200](http://localhost:4200).

For more information on using ember-cli, visit [https://ember-cli.com/](https://ember-cli.com/).

License
------------------------------------------------------------------------------

This project is licensed under the [MIT License](LICENSE.md).
4 changes: 2 additions & 2 deletions test/fixtures/my-addon/addon/components/my-component.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Ember from 'ember';
import Component from '@ember/component';
import layout from '../templates/components/my-component';

export default Ember.Component.extend({
export default Component.extend({
layout
});
141 changes: 64 additions & 77 deletions test/fixtures/my-addon/config/ember-try.js
Original file line number Diff line number Diff line change
@@ -1,83 +1,70 @@
/* eslint-env node */
module.exports = {
scenarios: [
{
name: 'ember-lts-2.8',
bower: {
dependencies: {
'ember': 'components/ember#lts-2-8'
'use strict';

const getChannelURL = require('ember-source-channel-url');

module.exports = function() {
return Promise.all([
getChannelURL('release'),
getChannelURL('beta'),
getChannelURL('canary')
]).then((urls) => {
return {
scenarios: [
{
name: 'ember-lts-2.12',
npm: {
devDependencies: {
'ember-source': '~2.12.0'
}
}
},
resolutions: {
'ember': 'lts-2-8'
}
},
npm: {
devDependencies: {
'ember-source': null
}
}
},
{
name: 'ember-lts-2.12',
npm: {
devDependencies: {
'ember-source': '~2.12.0'
}
}
},
{
name: 'ember-release',
bower: {
dependencies: {
'ember': 'components/ember#release'
{
name: 'ember-lts-2.16',
npm: {
devDependencies: {
'ember-source': '~2.16.0'
}
}
},
resolutions: {
'ember': 'release'
}
},
npm: {
devDependencies: {
'ember-source': null
}
}
},
{
name: 'ember-beta',
bower: {
dependencies: {
'ember': 'components/ember#beta'
{
name: 'ember-lts-2.18',
npm: {
devDependencies: {
'ember-source': '~2.18.0'
}
}
},
resolutions: {
'ember': 'beta'
}
},
npm: {
devDependencies: {
'ember-source': null
}
}
},
{
name: 'ember-canary',
bower: {
dependencies: {
'ember': 'components/ember#canary'
{
name: 'ember-release',
npm: {
devDependencies: {
'ember-source': urls[0]
}
}
},
resolutions: {
'ember': 'canary'
}
},
npm: {
devDependencies: {
'ember-source': null
{
name: 'ember-beta',
npm: {
devDependencies: {
'ember-source': urls[1]
}
}
},
{
name: 'ember-canary',
npm: {
devDependencies: {
'ember-source': urls[2]
}
}
},
{
name: 'ember-default',
npm: {
devDependencies: {}
}
}
}
},
{
name: 'ember-default',
npm: {
devDependencies: {}
}
}
]
]
};
});
};
1 change: 0 additions & 1 deletion test/fixtures/my-addon/config/environment.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-env node */
'use strict';

module.exports = function(/* environment, appConfig */) {
Expand Down
1 change: 0 additions & 1 deletion test/fixtures/my-addon/ember-cli-build.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-env node */
'use strict';

const EmberAddon = require('ember-cli/lib/broccoli/ember-addon');
Expand Down
1 change: 0 additions & 1 deletion test/fixtures/my-addon/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-env node */
'use strict';

module.exports = {
Expand Down
Loading

0 comments on commit cd54a16

Please sign in to comment.