Skip to content

Commit

Permalink
Merge pull request #89 from loganrosen/master
Browse files Browse the repository at this point in the history
Update to [email protected] blueprint
  • Loading branch information
rwjblue authored Nov 5, 2018
2 parents f3aef17 + 0b6a340 commit de88eca
Show file tree
Hide file tree
Showing 28 changed files with 2,971 additions and 1,007 deletions.
18 changes: 18 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# unconventional js
/blueprints/*/files/
/vendor/

# compiled output
/dist/
/tmp/

# dependencies
/bower_components/

# misc
/coverage/

# ember-try
/.node_modules.ember-try/
/bower.json.ember-try
/package.json.ember-try
7 changes: 5 additions & 2 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,18 @@ module.exports = {
// node files
{
files: [
'.template-lintrc.js',
'ember-cli-build.js',
'index.js',
'testem.js',
'ember-cli-build.js',
'blueprints/*/index.js',
'config/**/*.js',
'tests/dummy/config/**/*.js'
],
excludedFiles: [
'app/**',
'addon/**',
'addon-test-support/**',
'app/**',
'tests/dummy/app/**'
],
parserOptions: {
Expand Down
22 changes: 11 additions & 11 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
# See https://help.github.com/ignore-files/ for more about ignoring files.

# compiled output
/dist
/tmp
/dist/
/tmp/

# dependencies
/node_modules
/bower_components
/bower_components/
/node_modules/

# misc
/.sass-cache
/connect.lock
/coverage/*
/coverage/
/libpeerconnection.log
npm-debug.log*
yarn-error.log
testem.log
/npm-debug.log*
/testem.log
/yarn-error.log

# ember-try
.node_modules.ember-try/
bower.json.ember-try
package.json.ember-try
/.node_modules.ember-try/
/bower.json.ember-try
/package.json.ember-try
44 changes: 26 additions & 18 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -1,21 +1,29 @@
/bower_components
# compiled output
/dist/
/tmp/

# dependencies
/bower_components/

# misc
/.bowerrc
/.editorconfig
/.ember-cli
/.eslintignore
/.eslintrc.js
/.gitignore
/.template-lintrc.js
/.travis.yml
/.watchmanconfig
/bower.json
/config/ember-try.js
/dist
/tests
/tmp
**/.gitkeep
.bowerrc
.editorconfig
.ember-cli
.eslintrc.js
.gitignore
.watchmanconfig
.travis.yml
bower.json
ember-cli-build.js
testem.js
/ember-cli-build.js
/testem.js
/tests/
/yarn.lock
.gitkeep

# ember-try
.node_modules.ember-try/
bower.json.ember-try
package.json.ember-try
/.node_modules.ember-try/
/bower.json.ember-try
/package.json.ember-try
5 changes: 5 additions & 0 deletions .template-lintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
'use strict';

module.exports = {
extends: 'recommended'
};
39 changes: 23 additions & 16 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,31 @@ env:
global:
# See https://git.io/vdao3 for details.
- JOBS=1
matrix:

jobs:
fail_fast: true
allow_failures:
- env: EMBER_TRY_SCENARIO=ember-canary

include:
# runs linting and tests with current locked deps

- stage: "Tests"
name: "Tests"
script:
- yarn lint:hbs
- yarn lint:js
- yarn test

# 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
allow_failures:
- stage: "Additional Tests"
env: EMBER_TRY_SCENARIO=ember-lts-2.16
- env: EMBER_TRY_SCENARIO=ember-lts-2.18
- env: EMBER_TRY_SCENARIO=ember-release
- env: EMBER_TRY_SCENARIO=ember-beta
- env: EMBER_TRY_SCENARIO=ember-canary
- env: EMBER_TRY_SCENARIO=ember-default-with-jquery

before_install:
- curl -o- -L https://yarnpkg.com/install.sh | bash
Expand All @@ -42,7 +52,4 @@ install:
- yarn install --no-lockfile --non-interactive

script:
- yarn 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
- node_modules/.bin/ember try:one $EMBER_TRY_SCENARIO
56 changes: 37 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,17 @@
# Ember Truth Helpers [![Build Status](https://travis-ci.org/jmurphyau/ember-truth-helpers.svg?branch=master)](https://travis-ci.org/jmurphyau/ember-truth-helpers)
Ember Truth Helpers [![Build Status](https://travis-ci.org/jmurphyau/ember-truth-helpers.svg?branch=master)](https://travis-ci.org/jmurphyau/ember-truth-helpers)
==============================================================================

HTMLBars template helpers for additional truth logic in `if` and `unless` statements.

## Usage
Installation
------------------------------------------------------------------------------

```
ember install ember-truth-helpers
```

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

Helper | JavaScript | HTMLBars | Variable argument count allowed |
---------|-----------------------------------------------|-------------------------|---------------------------------|
Expand All @@ -20,39 +29,48 @@ is-array | `if (Ember.isArray(a))` | `{{if (is-array a)}}`
is-empty | `if (Ember.isEmpty(a))` | `{{if (is-empty a)}}` | No |
is-equal | `if (Ember.isEqual(a, b))` | `{{if (is-equal a b)}}` | No |

### API
## API

## is-equal
### is-equal

`is-equal` uses [`Ember.isEqual`](https://emberjs.com/api/#method_isEqual) helper to evaluate equality of two values.
`eq` should be sufficient for most applications. `is-equal` is necessary when trying to compare a complex object to
a primitive value.

## Install

* `ember install ember-truth-helpers`

## Other Helpers

* [ember-get-helper](https://github.com/jmurphyau/ember-get-helper)
* [ember-composable-helpers](https://github.com/DockYard/ember-composable-helpers)

## Development
Contributing
------------------------------------------------------------------------------

### Installation

* `git clone https://github.com/jmurphyau/ember-truth-helpers.git`
* `cd ember-truth-helpers`
* `yarn install`
* `ember server`
* Visit your app at http://localhost:4200.
* `yarn`

### Linting

* `yarn lint:hbs`
* `yarn lint:js`
* `yarn lint:js -- --fix`

### Running tests

* `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

## Running Tests
### Running the dummy application

* `yarn test` (Runs `ember try:testall` to test your addon against multiple Ember versions)
* `ember test`
* `ember test --server`
* `ember serve`
* Visit the dummy application at [http://localhost:4200](http://localhost:4200).

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

* `ember build`
License
------------------------------------------------------------------------------

For more information on using ember-cli, visit [https://www.ember-cli.com/](https://www.ember-cli.com/).
This project is licensed under the [MIT License](LICENSE.md).
31 changes: 22 additions & 9 deletions config/ember-try.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,31 +6,31 @@ module.exports = function() {
return Promise.all([
getChannelURL('release'),
getChannelURL('beta'),
getChannelURL('canary'),
getChannelURL('canary')
]).then((urls) => {
return {
useYarn: true,
scenarios: [
{
name: 'ember-lts-2.12',
npm: {
devDependencies: {
'ember-source': '~2.12.0'
}
}
},
{
name: 'ember-lts-2.16',
env: {
EMBER_OPTIONAL_FEATURES: JSON.stringify({ 'jquery-integration': true }),
},
npm: {
devDependencies: {
'@ember/jquery': '^0.5.1',
'ember-source': '~2.16.0'
}
}
},
{
name: 'ember-lts-2.18',
env: {
EMBER_OPTIONAL_FEATURES: JSON.stringify({ 'jquery-integration': true }),
},
npm: {
devDependencies: {
'@ember/jquery': '^0.5.1',
'ember-source': '~2.18.0'
}
}
Expand Down Expand Up @@ -64,6 +64,19 @@ module.exports = function() {
npm: {
devDependencies: {}
}
},
{
name: 'ember-default-with-jquery',
env: {
EMBER_OPTIONAL_FEATURES: JSON.stringify({
'jquery-integration': true
})
},
npm: {
devDependencies: {
'@ember/jquery': '^0.5.1'
}
}
}
]
};
Expand Down
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'use strict';

module.exports = {
name: 'ember-truth-helpers'
name: require('./package').name
};
Loading

0 comments on commit de88eca

Please sign in to comment.