Skip to content

Commit

Permalink
feat: first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
alvarocastro committed Jun 11, 2024
0 parents commit e9f5395
Show file tree
Hide file tree
Showing 89 changed files with 37,919 additions and 0 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
77 changes: 77 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
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
timeout-minutes: 10

steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18
cache: npm
- name: Install Dependencies
run: npm ci
- name: Lint
run: npm run lint
- name: Run Tests
run: npm run test

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

steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18
cache: npm
- name: Install Dependencies
run: npm install --no-package-lock
- name: Run Tests
run: npm run 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: actions/setup-node@v4
with:
node-version: 18
cache: npm
- name: Install Dependencies
run: npm ci
- name: Run Tests
run: ./node_modules/.bin/ember try:one ${{ matrix.try-scenario }} --skip-cleanup
working-directory: test-app
32 changes: 32 additions & 0 deletions .github/workflows/push-dist.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# 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
timeout-minutes: 10

steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18
cache: npm
- name: Install Dependencies
run: npm ci
- uses: kategengler/[email protected]
with:
branch: dist
token: ${{ secrets.GITHUB_TOKEN }}
working-directory: 'ember-draggable'
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
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-draggable`
- `npm install`

## Linting

- `npm run lint`
- `npm run lint:fix`

## Building the addon

- `cd ember-draggable`
- `npm build`

## Running tests

- `cd test-app`
- `npm run test` – Runs the test suite on the current Ember version
- `npm run test:watch` – Runs the test suite in "watch mode"

## Running the test application

- `cd test-app`
- `npm run 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/).
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

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.
26 changes: 26 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# ember-draggable

[Short description of the addon.]

## Compatibility

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

## Installation

```
ember install ember-draggable
```

## 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).
19 changes: 19 additions & 0 deletions config/ember-cli-update.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"schemaVersion": "1.0.0",
"projectName": "ember-draggable",
"packages": [
{
"name": "@embroider/addon-blueprint",
"version": "2.16.0",
"blueprints": [
{
"name": "@embroider/addon-blueprint",
"isBaseBlueprint": true,
"options": [
"--ci-provider=github"
]
}
]
}
]
}
9 changes: 9 additions & 0 deletions ember-draggable/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# unconventional js
/blueprints/*/files/

# compiled output
/dist/
/declarations/

# misc
/coverage/
50 changes: 50 additions & 0 deletions ember-draggable/.eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
'use strict';

module.exports = {
root: true,
parser: '@babel/eslint-parser',
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
babelOptions: {
root: __dirname,
},
},
plugins: ['ember', 'import'],
extends: [
'eslint:recommended',
'plugin:ember/recommended',
'plugin:prettier/recommended',
],
env: {
browser: true,
},
rules: {},
overrides: [
// require relative imports use full extensions
{
files: ['src/**/*.{js,gjs}'],
rules: {
'import/extensions': ['error', 'always', { ignorePackages: true }],
},
},
// node files
{
files: [
'./.eslintrc.cjs',
'./.prettierrc.cjs',
'./.template-lintrc.cjs',
'./addon-main.cjs',
],
parserOptions: {
sourceType: 'script',
},
env: {
browser: false,
node: true,
},
plugins: ['n'],
extends: ['plugin:n/recommended'],
},
],
};
17 changes: 17 additions & 0 deletions ember-draggable/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# The authoritative copies of these live in the monorepo root (because they're
# more useful on github that way), but the build copies them into here so they
# will also appear in published NPM packages.
/README.md
/LICENSE.md

# compiled output
dist/
declarations/

# npm/pnpm/yarn pack output
*.tgz

# deps & caches
node_modules/
.eslintcache
.prettiercache
9 changes: 9 additions & 0 deletions ember-draggable/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# unconventional js
/blueprints/*/files/

# compiled output
/dist/
/declarations/

# misc
/coverage/
6 changes: 6 additions & 0 deletions ember-draggable/.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,
};
5 changes: 5 additions & 0 deletions ember-draggable/.template-lintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
'use strict';

module.exports = {
extends: 'recommended',
};
4 changes: 4 additions & 0 deletions ember-draggable/addon-main.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
'use strict';

const { addonV1Shim } = require('@embroider/addon-shim');
module.exports = addonV1Shim(__dirname);
10 changes: 10 additions & 0 deletions ember-draggable/babel.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"plugins": [
"@embroider/addon-dev/template-colocation-plugin",
["babel-plugin-ember-template-compilation", {
"targetFormat": "hbs",
"transforms": []
}],
["module:decorator-transforms", { "runtime": { "import": "decorator-transforms/runtime" } }],
]
}
Loading

0 comments on commit e9f5395

Please sign in to comment.