Skip to content

Commit

Permalink
Merge pull request #128 from miguelcobain/sync-embroider-addon-blueprint
Browse files Browse the repository at this point in the history
Sync with embroider-addon blueprint
  • Loading branch information
SergeAstapov authored Aug 3, 2023
2 parents 6c33862 + 8b83cd0 commit 0f37cd0
Show file tree
Hide file tree
Showing 17 changed files with 1,200 additions and 254 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- name: Install Node
uses: actions/setup-node@v3
with:
node-version: 14.x
node-version: 16.x
cache: yarn

- name: Install Dependencies
Expand Down Expand Up @@ -53,7 +53,7 @@ jobs:
- name: Install Node
uses: actions/setup-node@v3
with:
node-version: 14.x
node-version: 16.x
cache: yarn

- name: Install Dependencies
Expand All @@ -73,7 +73,7 @@ jobs:
- name: Install Node
uses: actions/setup-node@v3
with:
node-version: 14.x
node-version: 16.x
cache: yarn

- name: Install Dependencies
Expand All @@ -93,7 +93,7 @@ jobs:
- name: Install Node
uses: actions/setup-node@v3
with:
node-version: 14.x # ember-cli-addon-docs requires Node.js 14
node-version: 16.x # ember-cli-addon-docs requires Node.js 14
cache: yarn

- name: Install Dependencies
Expand Down Expand Up @@ -131,7 +131,7 @@ jobs:
- name: Install Node
uses: actions/setup-node@v3
with:
node-version: 14.x
node-version: 16.x
cache: yarn

- name: Install Dependencies
Expand Down Expand Up @@ -161,7 +161,7 @@ jobs:
- name: Install Node
uses: actions/setup-node@v3
with:
node-version: 14.x # ember-modifier 4.x requires Node.js 14
node-version: 16.x # ember-modifier 4.x requires Node.js 14
cache: yarn

- name: Install Dependencies
Expand Down
33 changes: 33 additions & 0 deletions .github/workflows/push-dist.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# 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:
node-version: 16.x
cache: yarn

- name: Install Dependencies
run: yarn install --frozen-lockfile

- uses: kategengler/[email protected]
with:
branch: dist
token: ${{ secrets.GITHUB_TOKEN }}
working-directory: ember-css-transitions
21 changes: 19 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,28 @@

# compiled output
dist/
declarations/

# npm/pnpm/yarn pack output
*.tgz

# dependencies
node_modules/

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

# ember-try
/.node_modules.ember-try/
/package.json.ember-try
/yarn.lock.ember-try
28 changes: 17 additions & 11 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,28 +8,34 @@ This repo is divided into multiple packages using Yarn workspaces:

## Installation

* `git clone https://github.com/miguelcobain/ember-css-transitions.git`
* `cd ember-css-transitions`
* `yarn install`
- `git clone https://github.com/miguelcobain/ember-css-transitions.git`
- `cd ember-css-transitions`
- `yarn install`

## Linting

* `yarn lint`
* `yarn lint:fix`
- `yarn lint`
- `yarn lint:fix`

## Building the addon

- `cd ember-css-transitions`
- `yarn build`

## Running tests

* `cd ember-css-transitions && yarn start` – Builds the addon in "watch mode" so changes picked up by test app.
* `cd test-app && ember test` – Runs the test suite on the current Ember version
* `cd test-app && ember test --server` – Runs the test suite in "watch mode"
* `cd test-app && ember try:each` – Runs the test suite against multiple Ember versions
- `cd ember-css-transitions && yarn start` – Builds the addon in "watch mode" so changes picked up by test app.
- `cd test-app && ember test` – Runs the test suite on the current Ember version
- `cd test-app && ember test --server` – Runs the test suite in "watch mode"
- `cd test-app && ember try:each` – Runs the test suite against multiple Ember versions

During development, if you'd like test app to pick up changes in the addon, make sure to run both
`cd ember-css-transitions && yarn start` and `cd test-app && ember test --server` in different terminals.

## Running the test application

* `cd test-app && ember serve`
* Visit the test application at [http://localhost:4200](http://localhost:4200).
- `cd test-app`
- `yarn 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/).
23 changes: 23 additions & 0 deletions config/ember-cli-update.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"schemaVersion": "1.0.0",
"packages": [
{
"name": "@embroider/addon-blueprint",
"version": "2.1.0",
"blueprints": [
{
"name": "@embroider/addon-blueprint",
"isBaseBlueprint": true,
"options": [
"--welcome",
"--yarn",
"--ci-provider=github",
"--addon-location=ember-css-transitions",
"--test-app-location=test-app",
"--release-it"
]
}
]
}
]
}
8 changes: 1 addition & 7 deletions ember-css-transitions/.eslintignore
Original file line number Diff line number Diff line change
@@ -1,15 +1,9 @@
# unconventional js
/blueprints/*/files/
/vendor/

# compiled output
/dist/

# dependencies
/node_modules/
/declarations/

# misc
/coverage/
!.*
.*/
.eslintcache
54 changes: 54 additions & 0 deletions ember-css-transitions/.eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
'use strict';

module.exports = {
root: true,
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
babelOptions: {
root: __dirname,
},
},
plugins: ['ember'],
extends: [
'eslint:recommended',
'plugin:ember/recommended',
'plugin:prettier/recommended',
],
env: {
browser: true,
},
rules: {},
overrides: [
// ts files
{
files: ['**/*.ts'],
extends: [
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
],
rules: {
// Add any custom rules here
},
},
// node files
{
files: [
'./.eslintrc.cjs',
'./.prettierrc.js',
'./.template-lintrc.cjs',
'./addon-main.cjs',
],
parserOptions: {
sourceType: 'script',
},
env: {
browser: false,
node: true,
},
plugins: ['n'],
extends: ['plugin:n/recommended'],
},
],
};
43 changes: 0 additions & 43 deletions ember-css-transitions/.eslintrc.js

This file was deleted.

8 changes: 1 addition & 7 deletions ember-css-transitions/.prettierignore
Original file line number Diff line number Diff line change
@@ -1,15 +1,9 @@
# unconventional js
/blueprints/*/files/
/vendor/

# compiled output
/dist/

# dependencies
/node_modules/
/declarations/

# misc
/coverage/
!.*
.eslintcache
.lint-todo/
File renamed without changes.
5 changes: 5 additions & 0 deletions ember-css-transitions/.template-lintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
'use strict';

module.exports = {
extends: 'recommended',
};
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
'use strict';

const { addonV1Shim } = require('@embroider/addon-shim');
module.exports = addonV1Shim(__dirname);
3 changes: 2 additions & 1 deletion ember-css-transitions/babel.config.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"plugins": [
"@embroider/addon-dev/template-colocation-plugin",
["@babel/plugin-proposal-decorators", { "legacy": true }]
["@babel/plugin-proposal-decorators", { "version": "legacy" }],
"@babel/plugin-proposal-class-properties"
]
}
Loading

0 comments on commit 0f37cd0

Please sign in to comment.