Skip to content
Open
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
12 changes: 3 additions & 9 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,9 @@
language: node_js
node_js:
- "node"
- "6"
- "4"
- "8"
- "10"

cache:
directories:
yarn: true
- node_modules

before_install:
- if [[ `npm -v` != 3* ]]; then npm i -g npm@3; fi
- npm config set spin false
- npm install -g bower
- bower --version
5 changes: 1 addition & 4 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
environment:
matrix:
- nodejs_version: "4"
- nodejs_version: "6"
- nodejs_version: "8"
- nodejs_version: "10"

# Fix line endings in Windows. (runs before repo cloning)
init:
Expand All @@ -13,14 +13,11 @@ install:
- ps: Install-Product node $env:nodejs_version
- npm i -g npm@^3
- npm config set spin false
- npm install -g bower
- npm install

# Post-install test scripts.
test_script:
- node --version
- npm --version
- bower --version
- npm test

cache:
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"debug": "^3.0.0",
"denodeify": "^1.2.1",
"findup-sync": "^2.0.0",
"fs-extra": "^5.0.0",
"fs-extra": "^6.0.1",
"lodash": "^4.0.0",
"semver": "^5.3.0",
"symlink-or-copy": "^1.1.3",
Expand All @@ -34,7 +34,7 @@
"devDependencies": {
"chai": "^4.0.2",
"cross-env": "^5.0.0",
"ember-cli": "~2.17.1",
"ember-cli": "~3.1.4",
"ember-cli-fastboot": "^1.0.0",
"eslint-config-sane": "^0.6.0",
"eslint-plugin-prefer-let": "^1.0.1",
Expand All @@ -43,6 +43,6 @@
"request": "^2.75.0"
},
"engines": {
"node": ">= 4"
"node": "6.* || >= 8.*"
}
}
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
});
Loading