Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Initialize project #1

Merged
merged 11 commits into from
Jul 8, 2024
Merged
Show file tree
Hide file tree
Changes from 3 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
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
86 changes: 86 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
name: CI

on:
push:
branches:
- main
- master
KeithClinard marked this conversation as resolved.
Show resolved Hide resolved
pull_request: {}

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

jobs:
test:
name: "Tests"
runs-on: ubuntu-latest
timeout-minutes: 10

steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v3
with:
version: 8
KeithClinard marked this conversation as resolved.
Show resolved Hide resolved
- uses: actions/setup-node@v4
with:
node-version: 18
cache: pnpm
- name: Install Dependencies
run: pnpm install --frozen-lockfile
- name: Lint
run: pnpm lint
- name: Run Tests
run: pnpm test

floating:
name: "Floating Dependencies"
runs-on: ubuntu-latest
timeout-minutes: 10

steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v3
with:
version: 8
KeithClinard marked this conversation as resolved.
Show resolved Hide resolved
- uses: actions/setup-node@v4
with:
node-version: 18
cache: pnpm
- name: Install Dependencies
run: pnpm install --no-lockfile
- name: Run Tests
run: pnpm test

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

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

steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v3
with:
version: 8
KeithClinard marked this conversation as resolved.
Show resolved Hide resolved
- uses: actions/setup-node@v4
with:
node-version: 18
cache: pnpm
- name: Install Dependencies
run: pnpm install --frozen-lockfile
- name: Run Tests
run: ./node_modules/.bin/ember try:one ${{ matrix.try-scenario }} --skip-cleanup
working-directory: packages/ember-test-app
35 changes: 35 additions & 0 deletions .github/workflows/push-dist.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# 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
KeithClinard marked this conversation as resolved.
Show resolved Hide resolved
KeithClinard marked this conversation as resolved.
Show resolved Hide resolved

jobs:
push-dist:
name: Push dist
runs-on: ubuntu-latest
timeout-minutes: 10

steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v3
with:
version: 8
KeithClinard marked this conversation as resolved.
Show resolved Hide resolved
- uses: actions/setup-node@v4
with:
node-version: 18
cache: pnpm
- name: Install Dependencies
run: pnpm install --frozen-lockfile
- uses: kategengler/[email protected]
with:
branch: dist
token: ${{ secrets.GITHUB_TOKEN }}
working-directory: 'packages/ember'
22 changes: 22 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# 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
KeithClinard marked this conversation as resolved.
Show resolved Hide resolved
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,
};
31 changes: 31 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# How To Contribute

## Installation

- `git clone <repository-url>`
- `cd ember-nrg-ui`
KeithClinard marked this conversation as resolved.
Show resolved Hide resolved
- `pnpm install`

## Linting

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

## Building the addon

- `cd packages/ember`
- `pnpm build`

## Running tests

- `cd packages/ember-test-app`
- `pnpm test` – Runs the test suite on the current Ember version
- `pnpm test:watch` – Runs the test suite in "watch mode"

## Running the test application

- `cd packages/ember-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) 2024 Knoxville Utilities Board

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.
27 changes: 26 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,26 @@
# nrg-ui
# ember-nrg-ui
KeithClinard marked this conversation as resolved.
Show resolved Hide resolved

[Short description of the addon.]

## Compatibility

- Ember.js v4.12 or above
- Embroider or ember-auto-import v2

## Installation

```
ember install ember-nrg-ui
KeithClinard marked this conversation as resolved.
Show resolved Hide resolved
```

## Usage

[Longer description of how to use the addon in apps.]

## Contributing

See the [Contributing](CONTRIBUTING.md) guide for details.

## License

This project is licensed under the [MIT License](LICENSE.md).
24 changes: 24 additions & 0 deletions config/ember-cli-update.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"schemaVersion": "1.0.0",
"projectName": "ember-nrg-ui",
KeithClinard marked this conversation as resolved.
Show resolved Hide resolved
"packages": [
{
"name": "@embroider/addon-blueprint",
"version": "2.16.0",
"blueprints": [
{
"name": "@embroider/addon-blueprint",
"isBaseBlueprint": true,
"options": [
"--addon-location=packages/ember",
"--ci-provider=github",
"--pnpm",
"--test-app-location=packages/ember-test-app",
"--test-app-name=ember-test-app",
"--typescript"
]
}
]
}
]
}
29 changes: 29 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"private": true,
"repository": "",
"license": "MIT",
"author": "",
"scripts": {
"build": "pnpm --filter ember-nrg-ui build",
"lint": "pnpm --filter '*' lint",
"lint:fix": "pnpm --filter '*' lint:fix",
"prepare": "pnpm build",
"start": "concurrently 'pnpm:start:*' --restart-after 5000 --prefix-colors cyan,white,yellow",
"start:addon": "pnpm --filter ember-nrg-ui start --no-watch.clearScreen",
KeithClinard marked this conversation as resolved.
Show resolved Hide resolved
"start:test-app": "pnpm --filter ember-test-app start",
"start:design-system": "pnpm --filter design-system start",
"test": "pnpm --filter '*' test",
"test:ember": "pnpm --filter '*' test:ember"
},
"devDependencies": {
"@glint/core": "^1.2.1",
"concurrently": "^8.2.0",
"prettier": "^3.0.3",
"prettier-plugin-ember-template-tag": "^1.1.0"
},
"pnpm": {
"overrides": {
"@types/eslint": "^7.0.0"
}
}
}
2 changes: 2 additions & 0 deletions packages/design-system/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
dist
node_modules
23 changes: 23 additions & 0 deletions packages/design-system/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"name": "design-system",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"build:sass": "sass --load-path node_modules src:dist",
"watch:sass": "sass --load-path node_modules --watch src:dist",
"start": "npm-run-all build:sass --parallel watch:sass",
"build": "npm-run-all build:sass",
KeithClinard marked this conversation as resolved.
Show resolved Hide resolved
"sasstest": "sass --help"
},
"keywords": [],
"author": "",
"license": "ISC",
"devDependencies": {
"@primer/css": "^21.3.4",
"@primer/primitives": "^8.2.0",
"@primer/view-components": "^0.26.1",
"sass": "^1.54.8",
"npm-run-all": "^4.1.5"
}
}
3 changes: 3 additions & 0 deletions packages/design-system/src/main.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@import 'primer';


Loading
Loading