Skip to content

Commit

Permalink
implement routable components
Browse files Browse the repository at this point in the history
  • Loading branch information
patricklx committed Mar 18, 2024
1 parent 7cef44f commit 0e64a93
Show file tree
Hide file tree
Showing 80 changed files with 17,048 additions and 21 deletions.
19 changes: 19 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# EditorConfig helps developers define and maintain consistent
# coding styles between different editors and IDEs
# editorconfig.org

root = true

[*]
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
indent_style = space
indent_size = 2

[*.hbs]
insert_final_newline = false

[*.{diff,md}]
trim_trailing_whitespace = false
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*.gjs linguist-language=js linguist-detectable
*.gts linguist-language=ts linguist-detectable
76 changes: 76 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
name: CI

on:
push:
branches:
- main
- master
pull_request: {}

concurrency:
group: ci-${{ github.head_ref || github.ref }}
cancel-in-progress: true

jobs:
test:
name: 'Tests'
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
cache: pnpm
- name: Install Dependencies
run: npm i -g pnpm && pnpm install
- name: Lint
run: pnpm lint
- name: Run Tests
run: pnpm test

floating:
name: 'Floating Dependencies'
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
cache: pnpm
- name: Install Dependencies
run: npm i -g pnpm && pnpm i
- name: Run Tests
run: pnpm test

try-scenarios:
name: ${{ matrix.try-scenario }}
runs-on: ubuntu-latest
needs: 'test'

strategy:
fail-fast: false
matrix:
try-scenario:
- ember-lts-3.28
- ember-lts-4.4
- ember-lts-4.8
- ember-lts-4.12
- ember-release
- ember-beta
- ember-canary
- embroider-safe
- embroider-optimized

steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
cache: pnpm
- name: Install Dependencies
run: npm i -g pnpm && pnpm i
- name: Run Tests
run: ./node_modules/.bin/ember try:one ${{ matrix.try-scenario }}
working-directory: test-app
30 changes: 30 additions & 0 deletions .github/workflows/push-dist.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Because this library needs to be built,
# we can't easily point package.json files at the git repo for easy cross-repo testing.
#
# This workflow brings back that capability by placing the compiled assets on a "dist" branch
# (configurable via the "branch" option below)
name: Push dist

on:
push:
branches:
- main
- master

jobs:
push-dist:
name: Push dist
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Node
uses: actions/setup-node@v3
with:
cache: 'pnpm'
- name: Install Dependencies
run: npm i -g pnpm && pnpm install
- uses: kategengler/[email protected]
with:
branch: dist
token: ${{ secrets.GITHUB_TOKEN }}
working-directory: ember-routable-component
21 changes: 21 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# See https://help.github.com/ignore-files/ for more about ignoring files.

# dependencies
node_modules/

# misc
.env*
.pnp*
.pnpm-debug.log
.sass-cache
.eslintcache
coverage/
npm-debug.log*
yarn-error.log

# ember-try
/.node_modules.ember-try/
/package.json.ember-try
/package-lock.json.ember-try
/yarn.lock.ember-try
/pnpm-lock.ember-try.yaml
10 changes: 10 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Prettier is also run from each package, so the ignores here
# protect against files that may not be within a package

# misc
!.*
.lint-todo/

# ember-try
/.node_modules.ember-try/
/pnpm-lock.ember-try.yaml
6 changes: 6 additions & 0 deletions .prettierrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
'use strict';

module.exports = {
plugins: ['prettier-plugin-ember-template-tag'],
singleQuote: true,
};
30 changes: 30 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# How To Contribute

## Installation

- `git clone <repository-url>`
- `cd ember-routable-component`
- `pnpm install`

## Linting

- `pnpm lint`
- `pnpm lint:fix`

## Building the addon

- `cd ember-routable-component`
- `pnpm build`

## Running tests

- `cd test-app`
- `pnpm test` – Runs the test suite on the current Ember version

## Running the test application

- `cd test-app`
- `pnpm start`
- Visit the test application at [http://localhost:4200](http://localhost:4200).

For more information on using ember-cli, visit [https://cli.emberjs.com/release/](https://cli.emberjs.com/release/).
21 changes: 0 additions & 21 deletions LICENSE

This file was deleted.

9 changes: 9 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
The MIT License (MIT)

Copyright (c) 2023

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:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Loading

0 comments on commit 0e64a93

Please sign in to comment.