Skip to content

Commit

Permalink
V2 addon format and switch to pnpm, change localization and styles se…
Browse files Browse the repository at this point in the history
…tup (#1911)

* move to V2 format

* simplify CI - ember-try already included

* begin work on documentation

* css usage

* don't include all languages by default

* stylelint css

* installing missing peerDep

* try-scenarios

* support for ember 4.8 and 4.4 is back

* downgrade test helpers to pass ember-source 4.4 test

* add lts 4.12 to CI

* upgrade ember-cli-addon-docs to v7

* remove duplicates in gitignore

* removing leftover
  • Loading branch information
AmauryD authored Jan 8, 2024
1 parent 88eb99f commit 8377a03
Show file tree
Hide file tree
Showing 96 changed files with 18,490 additions and 580 deletions.
40 changes: 13 additions & 27 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,30 +23,13 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: 16.x
cache: yarn
- name: Install Dependencies
run: yarn install --frozen-lockfile
- name: Lint
run: yarn lint
- name: Run Tests
run: yarn test:ember

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

steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: pnpm/action-setup@v2
with:
node-version: 16.x
cache: yarn
version: 8
- name: Install Dependencies
run: yarn install --no-lockfile
run: pnpm install --frozen-lockfile
- name: Run Tests
run: yarn test:ember

run: pnpm test
try-scenarios:
name: ${{ matrix.try-scenario }}
runs-on: ubuntu-latest
Expand All @@ -59,6 +42,7 @@ jobs:
try-scenario:
- ember-lts-4.4
- ember-lts-4.8
- ember-lts-4.12
- ember-release
- ember-beta
- ember-canary
Expand All @@ -71,19 +55,21 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: 16.x
cache: yarn
- uses: pnpm/action-setup@v2
with:
version: 8
- name: Install Dependencies
run: yarn install --frozen-lockfile
run: pnpm install --frozen-lockfile
- name: Run Tests
run: ./node_modules/.bin/ember try:one ${{ matrix.try-scenario }}

working-directory: test-app
run: pnpm ember try:one ${{ matrix.try-scenario }}
automerge:
needs: [test, floating, try-scenarios]
needs: [test, try-scenarios]
runs-on: ubuntu-latest
permissions:
pull-requests: write
contents: write
steps:
- uses: fastify/github-action-merge-dependabot@v3.2.0
with:
github-token: ${{secrets.GITHUB_TOKEN}}
github-token: ${{secrets.GITHUB_TOKEN}}
35 changes: 6 additions & 29 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,34 +1,11 @@
# See https://help.github.com/ignore-files/ for more about ignoring files.

# compiled output
/dist/
/tmp/

# dependencies
/bower_components/
/node_modules/
node_modules/

# misc
/.env*
/.pnp*
/.sass-cache
/.eslintcache
/connect.lock
/coverage/
/libpeerconnection.log
/npm-debug.log*
/testem.log
/yarn-error.log

# ember-try
/.node_modules.ember-try/
/bower.json.ember-try
/npm-shrinkwrap.json.ember-try
/package.json.ember-try
/package-lock.json.ember-try
/yarn.lock.ember-try

# broccoli-debug
/DEBUG/

.idea/
.env*
.pnpm-debug.log
npm-debug.log*
yarn-error.log
.eslintcache
50 changes: 0 additions & 50 deletions .npmignore

This file was deleted.

1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
auto-install-peers=false
25 changes: 0 additions & 25 deletions .prettierignore

This file was deleted.

6 changes: 6 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"eslint.validate": [
"glimmer-ts",
"glimmer-js"
]
}
3 changes: 0 additions & 3 deletions .watchmanconfig

This file was deleted.

6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@

* `git clone <repository-url>`
* `cd ember-flatpickr`
* `yarn install`
* `pnpm install`

## Linting

* `yarn lint`
* `yarn lint:fix`
* `pnpm lint`
* `pnpm lint:fix`

## Running tests

Expand Down
6 changes: 3 additions & 3 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ Once the prep work is completed, the actual release is straight forward:
# using https://volta.sh
volta install release-it
# using Yarn
yarn global add release-it
# using pnpm
pnpm global add release-it
# using npm
npm install --global release-it
Expand All @@ -47,7 +47,7 @@ npm install --global release-it
* Second, ensure that you have installed your projects dependencies:

```
yarn install
pnpm install
```

* And last (but not least 😁) do your release. It requires a
Expand Down
1 change: 0 additions & 1 deletion app/components/ember-flatpickr.js

This file was deleted.

28 changes: 0 additions & 28 deletions ember-cli-build.js

This file was deleted.

9 changes: 9 additions & 0 deletions ember-flatpickr/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# unconventional js
/blueprints/*/files/

# compiled output
/declarations/
/dist/

# misc
/coverage/
4 changes: 0 additions & 4 deletions .eslintrc.js → ember-flatpickr/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,6 @@ module.exports = {
env: {
browser: true,
},
globals: {
flatpickr: false,
},
rules: {},
overrides: [
// node files
{
Expand Down
49 changes: 49 additions & 0 deletions ember-flatpickr/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# 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.
/LICENSE.md
/README.md

# compiled output
/declarations
/dist

# npm/pnpm/yarn pack output
*.tgz

# compiled output
/tmp/

# dependencies
/bower_components/
/node_modules/

# misc
/.env*
/.pnp*
/.sass-cache
/.eslintcache
/connect.lock
/coverage/
/libpeerconnection.log
/npm-debug.log*
/testem.log
/yarn-error.log

# ember-try
/.node_modules.ember-try/
/bower.json.ember-try
/npm-shrinkwrap.json.ember-try
/package.json.ember-try
/package-lock.json.ember-try
/yarn.lock.ember-try

# broccoli-debug
/DEBUG/

.idea/
.env*
.pnpm-debug.log
npm-debug.log*
yarn-error.log
.eslintcache
9 changes: 9 additions & 0 deletions ember-flatpickr/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# unconventional js
/blueprints/*/files/

# compiled output
/declarations/
/dist/

# misc
/coverage/
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
5 changes: 5 additions & 0 deletions ember-flatpickr/addon-main.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
'use strict';

const { addonV1Shim } = require('@embroider/addon-shim');

module.exports = addonV1Shim(__dirname);
23 changes: 23 additions & 0 deletions ember-flatpickr/babel.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"plugins": [
[
"@babel/plugin-transform-typescript",
{
"allExtensions": true,
"allowDeclareFields": true,
"onlyRemoveTypeImports": true
}
],
"@embroider/addon-dev/template-colocation-plugin",
"@babel/plugin-transform-class-static-block",
[
"babel-plugin-ember-template-compilation",
{
"targetFormat": "hbs",
"transforms": []
}
],
["@babel/plugin-proposal-decorators", { "version": "legacy" }],
"@babel/plugin-transform-class-properties"
]
}
Loading

0 comments on commit 8377a03

Please sign in to comment.