Skip to content

Commit

Permalink
Feature/update libraries (#45)
Browse files Browse the repository at this point in the history
* Upgrade Ember to 3.13

* Update tests to match new API

* Remove need for lodash

* Update README to show latest autoprfixer API requirement

* Remove deprecated `browsers` key from options

* Update to latest broccoli-autoprefixer

* Document breaking changes

* v3.13.1...v3.16.0

* Add Ember 3.8 to ember-try matrix
  • Loading branch information
mfeckie committed Feb 14, 2020
1 parent 2dfbe35 commit e637a66
Show file tree
Hide file tree
Showing 40 changed files with 10,991 additions and 409 deletions.
4 changes: 0 additions & 4 deletions .bowerrc

This file was deleted.

15 changes: 0 additions & 15 deletions .editorconfig
Expand Up @@ -4,7 +4,6 @@

root = true


[*]
end_of_line = lf
charset = utf-8
Expand All @@ -13,22 +12,8 @@ insert_final_newline = true
indent_style = space
indent_size = 2

[*.js]
indent_style = space
indent_size = 2

[*.hbs]
insert_final_newline = false
indent_style = space
indent_size = 2

[*.css]
indent_style = space
indent_size = 2

[*.html]
indent_style = space
indent_size = 2

[*.{diff,md}]
trim_trailing_whitespace = false
20 changes: 20 additions & 0 deletions .eslintignore
@@ -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
56 changes: 56 additions & 0 deletions .eslintrc.js
@@ -0,0 +1,56 @@
module.exports = {
root: true,
parser: 'babel-eslint',
parserOptions: {
ecmaVersion: 2018,
sourceType: 'module',
ecmaFeatures: {
legacyDecorators: true
}
},
plugins: [
'ember'
],
extends: [
'eslint:recommended',
'plugin:ember/recommended'
],
env: {
browser: true
},
rules: {
'ember/no-jquery': 'error'
},
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'
},
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: 16 additions & 8 deletions .gitignore
@@ -1,17 +1,25 @@
# See http://help.github.com/ignore-files/ for more about ignoring files.
# 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
testem.log
/npm-debug.log*
/testem.log
/yarn-error.log

# ember-try
/.node_modules.ember-try/
/bower.json.ember-try
/package.json.ember-try
32 changes: 0 additions & 32 deletions .jshintrc

This file was deleted.

46 changes: 31 additions & 15 deletions .npmignore
@@ -1,16 +1,32 @@
/bower_components
# compiled output
/dist/
/tmp/

# dependencies
/bower_components/

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

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

module.exports = {
extends: 'octane'
};
62 changes: 44 additions & 18 deletions .travis.yml
@@ -1,35 +1,61 @@
---
language: node_js
node_js:
- '6'
- '4'
# we recommend testing addons with the same minimum supported node version as Ember CLI
# so that your addon works for all apps
- "10"

sudo: false
dist: trusty

addons:
chrome: stable

cache:
directories:
- node_modules
- $HOME/.npm

env:
- EMBER_TRY_SCENARIO=default
- EMBER_TRY_SCENARIO=ember-release
- EMBER_TRY_SCENARIO=ember-beta
- EMBER_TRY_SCENARIO=ember-canary
global:
# See https://git.io/vdao3 for details.
- JOBS=1

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

matrix:
jobs:
fast_finish: true
allow_failures:
- env: EMBER_TRY_SCENARIO=ember-canary

before_install:
- export PATH=/usr/local/phantomjs-2.0.0/bin:$PATH
- "npm config set spin false"
- "npm install -g npm@^2"
include:
# runs linting and tests with current locked deps
- stage: "Tests"
name: "Tests"
script:
- npm run lint:hbs
- npm run lint:js
- npm test

install:
- npm install -g bower
- npm install
- bower install
- stage: "Additional Tests"
name: "Floating Dependencies"
install:
- npm install --no-package-lock
script:
- npm test

# we recommend new addons test the current and previous LTS
# as well as latest stable release (bonus points to beta/canary)
- env: EMBER_TRY_SCENARIO=ember-lts-3.8
- env: EMBER_TRY_SCENARIO=ember-lts-3.12
- env: EMBER_TRY_SCENARIO=ember-lts-3.16
- 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
- env: EMBER_TRY_SCENARIO=ember-classic

script:
- ember try $EMBER_TRY_SCENARIO test
- node_modules/.bin/ember try:one $EMBER_TRY_SCENARIO
6 changes: 6 additions & 0 deletions CHANGELOG.md
@@ -1,5 +1,11 @@
## master

### 0.9.0

[BREAKING] - Will trigger deprecation warnings from autoprefixer if you still use the `browsers` key in `ember-cli-build`. To maintain this approach, change the key name to `overrideBrowserslist`. The preferred approach is now to use a `.browserlistrc` file, or add a `browserslist` item to your `package.json`. See https://github.com/browserslist/browserslist#readme for more information.

+ Upgrades Ember to 3.13
+ Upgrades broccoli-autoprofixer to `7.x`

### 0.8.1
+ Fix issue with asset fingerprinting not taking autoprefixing into account [#39](https://github.com/kimroen/ember-cli-autoprefixer/pull/39)
Expand Down
26 changes: 26 additions & 0 deletions CONTRIBUTING.md
@@ -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
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2016 Kim Røen
Copyright (c) 2019 Kim Røen

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
9 changes: 5 additions & 4 deletions README.md
Expand Up @@ -10,14 +10,15 @@ ember install ember-cli-autoprefixer
```

## Options
By default ember-cli-autoprefixer passes your projects target browsers (in Ember CLI >= 2.13.0)
to autoprefixer. However, you can manually configure what browsers to target and other options by
Add the target browsers to your package.json as per https://github.com/browserslist/browserslist#readme or use a `.browserslistrc` file.

You can manually configure what browsers to target and other options by
specifying them in your `ember-cli-build.js` (or `Brocfile.js`). An example:

```js
var app = new EmberApp(defaults, {
autoprefixer: {
browsers: ['last 2 ios version'],
overrideBrowserslist: ['IE11'],
cascade: false
}
});
Expand All @@ -27,7 +28,7 @@ This would prefix styles as required by the two latest version of ios, and disab

You can disable Autoprefixer by passing in `enabled: false`.

Other options would also go here along with `browsers`, `enabled` and `cascade`.
Other options would also go here along with `overrideBrowserslist`, `enabled` and `cascade`.

You can read more about these settings and others [over on the Autoprefixer page](https://github.com/postcss/autoprefixer#options).

Expand Down

0 comments on commit e637a66

Please sign in to comment.