Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
b2cdde6
feat(namespacing): updated architecture to better facilitate namespacing
webark Mar 15, 2018
7dc050f
fix: using local rather then imported so access the actual variable
webark Sep 19, 2018
7d92100
fix: sometimes `.trees['app']` is a string, and sometimes a node.
webark Sep 19, 2018
ef6e17e
fix(template only components): checking the templates only feature co…
webark Dec 11, 2018
833bade
chore(upgrade): upgraded ember and packages to latset version
webark Mar 20, 2019
022272e
refactor(deprication): updated to handle the ember routeing service
webark Mar 20, 2019
83d3db0
chore(upgrade): updated yarn.lock to latest versions
webark Mar 23, 2019
c82b441
refactor(babel plugin): moving away from augmenting individuals js files
webark May 22, 2019
1367b33
chore(upgrade): upgraded to latest packages
webark May 22, 2019
3419e8a
fix(nested routes): handledling nested route style names appropriatly
webark May 22, 2019
09dbd05
chore(upgrade): upgraded packages to the latest version
webark May 22, 2019
cc6badc
refactor(route processing): the utility should not need to hanlde th…
webark May 23, 2019
1674225
refactor(route processing): switched to useing the public 'parent' of…
webark May 23, 2019
5a116ea
refactor: cleanup and and refactored some of the walker and compiling…
webark Jun 24, 2019
9ee4a9a
test: skipping tests for now to be picked up later
webark Jun 24, 2019
16a3fef
chore: upgardded all packages
webark Jun 24, 2019
217305b
refactor: split up into sequential preprocessors with each doing it's…
webark Jun 24, 2019
01152f1
refactor: upgraded to latest pagakcges and now using new broccoli-fil…
webark Sep 9, 2019
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
4 changes: 0 additions & 4 deletions .bowerrc

This file was deleted.

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
14 changes: 9 additions & 5 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module.exports = {
root: true,
parserOptions: {
ecmaVersion: 2017,
ecmaVersion: 2018,
sourceType: 'module'
},
plugins: [
Expand All @@ -20,20 +20,24 @@ module.exports = {
// node files
{
files: [
'lib/**/*.js',
'.eslintrc.js',
'.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: {
sourceType: 'script',
ecmaVersion: 2015
sourceType: 'script'
},
env: {
browser: false,
Expand Down
24 changes: 13 additions & 11 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,23 +1,25 @@
# 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*
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
46 changes: 28 additions & 18 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -1,21 +1,31 @@
/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
/dist
/tests
/tmp
**/.gitkeep
.bowerrc
.editorconfig
.ember-cli
.eslintrc.js
.gitignore
.watchmanconfig
.travis.yml
bower.json
ember-cli-build.js
testem.js
/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
/.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'
};
53 changes: 36 additions & 17 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,21 +18,43 @@ env:
global:
# See https://git.io/vdao3 for details.
- JOBS=1
matrix:

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

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"
install:
- yarn install --non-interactive
script:
- yarn lint:hbs
- yarn lint:js
- yarn test

- name: "Floating Dependencies"
script:
- 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-3.4
- env: EMBER_TRY_SCENARIO=ember-lts-3.8
- 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 +64,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
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 ember-component-css`
* `yarn install`

## 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 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/).
63 changes: 0 additions & 63 deletions addon/initializers/component-styles.js

This file was deleted.

29 changes: 0 additions & 29 deletions addon/initializers/route-styles.js

This file was deleted.

42 changes: 42 additions & 0 deletions addon/instance-initializers/add-style-namespaces.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
import addRouteStyleNamespace from 'ember-component-css/utils/add-route-style-namespace';
import addComponentStyleNamespace from 'ember-component-css/utils/add-component-style-namespace';


export function initialize(appInstance) {
let router = appInstance.lookup('service:router');
router.on('routeDidChange', function({ to }) {
if (likeRouteInfo(to)) {
addRouteStyleNamespace(appInstance, nestedRouteNames(to));
}
});

router.on('routeWillChange', function({ to, isActive }) {
if (likeRouteInfo(to)) {
if (/_loading$/.test(to.name) && isActive) {
const routeNames = nestedRouteNames(to)
// loading route names are set with an _loading even though
// their path is -loading
.map(name => name.replace(/_loading$/, '-loading'));
addRouteStyleNamespace(appInstance, routeNames);
}
}
});

addComponentStyleNamespace(appInstance);
}

function nestedRouteNames({ name, parent }, routeNames = []) {
routeNames.push(name);
if (parent) {
return nestedRouteNames(parent, routeNames);
}
return routeNames;
}

function likeRouteInfo(info) {
return info && typeof info === 'object' && info.hasOwnProperty('name');
}

export default {
initialize
}
3 changes: 0 additions & 3 deletions addon/mixins/style-namespacing-extras.js

This file was deleted.

Loading