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
20 changes: 20 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# unconventional js
/blueprints/*/files/
/vendor/

# compiled output
/dist/
/tmp/

# dependencies
/bower_components/
/node_modules/

# misc
/coverage/
!.*

# ember-try
/.node_modules.ember-try/
/bower.json.ember-try
/package.json.ember-try
45 changes: 42 additions & 3 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,52 @@
module.exports = {
root: true,
parserOptions: {
ecmaVersion: 2017,
ecmaVersion: 2018,
sourceType: 'module'
},
extends: 'eslint:recommended',
plugins: [
'ember'
],
extends: [
'eslint:recommended',
'plugin:ember/recommended'
],
env: {
browser: true
},
rules: {
}
},
overrides: [
// node files
{
files: [
'.eslintrc.js',
'.template-lintrc.js',
'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
})
}
]
};
24 changes: 13 additions & 11 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,25 +1,27 @@
# 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
/.env*
/.pnp*
/.sass-cache
/connect.lock
/coverage/*
/coverage/
/libpeerconnection.log
npm-debug.log*
/npm-debug.log*
package-lock.json
yarn-error.log
testem.log
/yarn-error.log
/testem.log
/DEBUG

# 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
35 changes: 29 additions & 6 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -1,24 +1,47 @@
/bower_components
# compiled output
/dist/
/tmp/

# dependencies
/bower_components/

# misc
/.bowerrc
/.editorconfig
/.ember-cli
/.env*
/.eslintignore
/.eslintrc.js
/.gitignore
/.template-lintrc.js
/.travis.yml
/.watchmanconfig
/bower.json
/config/ember-try.js
<<<<<<< HEAD
/dist
/tests
/tests/
/testem.js
/yarn.lock
/tmp
**/.gitkeep
.bowerrc
.editorconfig
.ember-cli
.gitignore
.gitkeep
.eslintrc.js
.watchmanconfig
.travis.yml
bower.json
ember-cli-build.js
/ember-cli-build.js
testem.js
/DEBUG
Icon^M^M
Icon*
/CONTRIBUTING.md

# 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'
};
49 changes: 29 additions & 20 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ language: node_js
node_js:
# we recommend testing addons with the same minimum supported node version as Ember CLI
# so that your addon works for all apps
- "6"
- "8"

sudo: false
dist: trusty
Expand All @@ -18,28 +18,37 @@ env:
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-release
- EMBER_TRY_SCENARIO=ember-beta
- EMBER_TRY_SCENARIO=ember-canary

matrix:
fast_finish: true

branches:
only:
- master
# npm version tags
- /^v\d+\.\d+\.\d+/

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

before_install:
- curl -o- -L https://yarnpkg.com/install.sh | bash
- export PATH=$HOME/.yarn/bin:$PATH
include:
# runs linting and tests with current locked deps

install:
- yarn install --no-lockfile --non-interactive
- stage: "Tests"
name: "Tests"
script:
- npm run lint:hbs
- npm run lint:js
- npm test

# we recommend new addons test the current and previous LTS
# as well as latest stable release (bonus points to beta/canary)
- stage: "Additional Tests"
env: EMBER_TRY_SCENARIO=ember-lts-2.18
- env: EMBER_TRY_SCENARIO=ember-lts-3.4
- 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

script:
# 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
26 changes: 26 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# How To Contribute

## Installation

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

## Linting

* `npm run lint:hbs`
* `npm run lint:js`
* `npm run 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 the dummy application

* `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/).
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2016
Copyright (c) 2019

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:

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Ember ScrollMagic [![Build Status](https://travis-ci.org/willviles/ember-scrollm

Ember ScrollMagic is an Ember addon for using [ScrollMagic](https://github.com/janpaepke/ScrollMagic) - the javascript library for magical scroll interactions.

## Installation
[Short description of the addon.]

ScrollMagic uses [GSAP (Greensock Animation Platform)](https://github.com/greensock/GreenSock-JS) for full animation tweening. Ember ScrollMagic will automatically install [Ember GSAP](https://github.com/willviles/ember-gsap) into your application.

Expand Down
7 changes: 6 additions & 1 deletion addon/services/scroll-magic.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
import Service from '@ember/service';
import { getOwner } from '@ember/application';
import { warn } from '@ember/debug';
import { default as EmberObject, computed, get, set } from '@ember/object';
import {
default as EmberObject,
computed,
get,
set
} from '@ember/object';
import { scheduleOnce } from '@ember/runloop';

import { task, timeout } from 'ember-concurrency';
Expand Down
8 changes: 4 additions & 4 deletions addon/templates/components/base-item.hbs
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{{#if hasBlock}}

{{yield this (hash
animated=(component 'scrollmagic-animated')
pinned=(component 'scrollmagic-pinned')
toggle=(component 'scrollmagic-toggle')
animated=(component "scrollmagic-animated")
pinned=(component "scrollmagic-pinned")
toggle=(component "scrollmagic-toggle")
)}}

{{else}}

{{yield}}

{{/if}}
6 changes: 3 additions & 3 deletions addon/templates/components/pinned-item.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
{{#if hasBlock}}

{{yield this (hash
animated=(component 'scrollmagic-animated')
pinned=(component 'scrollmagic-pinned')
toggle=(component 'scrollmagic-toggle')
animated=(component "scrollmagic-animated")
pinned=(component "scrollmagic-pinned")
toggle=(component "scrollmagic-toggle")
)}}

{{else}}
Expand Down
Loading