Skip to content

Commit

Permalink
Merge pull request #245 from josemarluedke/feat/forms-addon-v2
Browse files Browse the repository at this point in the history
Move forms and changeset-form to v2 addon and glint
  • Loading branch information
josemarluedke committed Dec 26, 2023
2 parents a062f5e + de66084 commit 259ad8c
Show file tree
Hide file tree
Showing 201 changed files with 5,946 additions and 6,413 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ jobs:
run: yarn install --frozen-lockfile
- name: Lint JS
run: yarn lint:js
- name: Lint HBS
run: yarn lint:hbs
# - name: Lint HBS
# run: yarn lint:hbs
- name: Build V2 Addons
run: yarn workspace @frontile/core run build && yarn workspace @frontile/buttons run build && yarn workspace @frontile/notifications run build
run: yarn workspace @frontile/core run build && yarn workspace @frontile/buttons run build && yarn workspace @frontile/notifications run build && yarn workspace @frontile/forms run build&& yarn workspace @frontile/changeset-form run build
- name: Test
run: yarn test

Expand Down
11 changes: 6 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"test-app"
],
"scripts": {
"build": "yarn workspaces run build",
"build": "yarn workspace @frontile/core run build && yarn workspace @frontile/buttons run build && yarn workspace @frontile/notifications run build && yarn workspace @frontile/forms run build && yarn workspace @frontile/changeset-form run build && yarn workspace @frontile/overlays run build ",
"lint:hbs": "ember-template-lint .",
"lint:js": "eslint . --ext .js,.ts,.gts,.gjs",
"start": "yarn workspace site start",
Expand All @@ -20,19 +20,20 @@
"ember-element-helper": "^0.7.1"
},
"dependencies": {
"@ember/test-waiters": "^3.0.2",
"@embroider/test-setup": "^3.0.1"
},
"devDependencies": {
"@glint/core": "1.0.2",
"@glint/environment-ember-loose": "1.0.2",
"@glint/environment-ember-template-imports": "1.0.2",
"@glint/core": "1.2.1",
"@glint/environment-ember-loose": "1.2.1",
"@glint/environment-ember-template-imports": "1.2.1",
"@underline/eslint-config-ember-typescript": "^0.15.1",
"@underline/eslint-config-node": "^0.15.1",
"ember-source-channel-url": "^3.0.0",
"ember-template-lint": "^5.11.1",
"eslint": "^8.47.0",
"eslint-plugin-prettier": "^5.0.0",
"lerna": "^4.0.0",
"lerna": "^8.0.1",
"prettier": "^3.0.0",
"prettier-plugin-ember-template-tag": "^1.0.2",
"typescript": "^5.1.6"
Expand Down
11 changes: 10 additions & 1 deletion packages/buttons/babel.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
module.exports = {
presets: [['@babel/preset-typescript', { onlyRemoveTypeImports: true }]],
presets: [
[
'@babel/preset-typescript',
{
onlyRemoveTypeImports: true,
ignoreExtensions: true,
allExtensions: true
}
]
],
plugins: [
'@embroider/addon-dev/template-colocation-plugin',
[
Expand Down
23 changes: 12 additions & 11 deletions packages/buttons/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"tailwind"
],
"scripts": {
"build": "concurrently 'npm:build:*'",
"build": "concurrently -m 1 'npm:build:*'",
"build:js": "rollup --config",
"build:types": "glint --declaration",
"lint": "concurrently 'npm:lint:*(!fix)' --names 'lint:'",
Expand All @@ -44,21 +44,22 @@
"@frontile/tailwindcss-plugin-helpers": "^0.15.0"
},
"devDependencies": {
"@babel/core": "7.22.9",
"@babel/core": "7.23.6",
"@babel/plugin-proposal-class-properties": "7.18.6",
"@babel/plugin-proposal-decorators": "7.22.7",
"@babel/plugin-transform-class-static-block": "^7.22.5",
"@babel/preset-typescript": "7.22.5",
"@embroider/addon-dev": "3.2.0",
"@glint/core": "1.0.2",
"@glint/environment-ember-loose": "1.0.2",
"@glint/environment-ember-template-imports": "1.0.2",
"@glint/template": "1.0.2",
"@babel/plugin-proposal-decorators": "7.23.6",
"@babel/plugin-transform-class-static-block": "^7.23.4",
"@babel/preset-typescript": "7.23.3",
"@embroider/addon-dev": "4.1.3",
"@glint/core": "1.2.1",
"@glint/environment-ember-loose": "1.2.1",
"@glint/environment-ember-template-imports": "1.2.1",
"@glint/template": "1.2.1",
"@rollup/plugin-node-resolve": "^15.2.3",
"@tsconfig/ember": "^3.0.0",
"babel-plugin-ember-template-compilation": "^2.1.1",
"concurrently": "^8.2.0",
"ember-source": "^5.1.2",
"rollup": "^3.27.0",
"rollup": "^4.9.1",
"rollup-plugin-ts": "^3.2.0",
"tailwindcss": "^3.3.3",
"typescript": "^5.1.6"
Expand Down
24 changes: 13 additions & 11 deletions packages/buttons/rollup.config.mjs
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import ts from "rollup-plugin-ts";
import ts from 'rollup-plugin-ts';
import { Addon } from '@embroider/addon-dev/rollup';
import { nodeResolve } from '@rollup/plugin-node-resolve';

const addon = new Addon({
srcDir: 'src',
destDir: 'dist',
destDir: 'dist'
});
const extensions = ['.js', '.gjs', '.ts', '.gts'];

export default {
// This provides defaults that work well alongside `publicEntrypoints` below.
Expand All @@ -18,7 +20,7 @@ export default {
'components/**/*.js',
'helpers/**/*.js',
'utils/**/*.js',
'template-registry.js',
'template-registry.js'
]),

// These are the modules that should get reexported into the traditional
Expand All @@ -27,7 +29,7 @@ export default {
addon.appReexports([
'components/**/*.js',
'helpers/**/*.js',
'utils/**/*.js',
'utils/**/*.js'
]),

// Follow the V2 Addon rules about dependencies. Your code can import from
Expand All @@ -37,27 +39,27 @@ export default {

addon.gjs(),

nodeResolve({ extensions }),

// This babel config should *not* apply presets or compile away ES modules.
// It exists only to provide development niceties for you, like automatic
// template colocation.
// See `babel.config.json` for the actual Babel configuration!
ts({
transpiler: "babel",
transpiler: 'babel',
transpileOnly: true,
babelConfig: "./babel.config.js",
browserslist: ["last 2 firefox versions", "last 2 chrome versions"],
babelConfig: './babel.config.js',
browserslist: ['last 2 firefox versions', 'last 2 chrome versions']
}),


// Ensure that standalone .hbs files are properly integrated as Javascript.
addon.hbs(),


// addons are allowed to contain imports of .css files, which we want rollup
// to leave alone and keep in the published output.
addon.keepAssets(['**/*.css']),

// Remove leftover build artifacts when starting a new build.
addon.clean(),
],
addon.clean()
]
};
9 changes: 0 additions & 9 deletions packages/changeset-form/.ember-cli

This file was deleted.

3 changes: 0 additions & 3 deletions packages/changeset-form/.watchmanconfig

This file was deleted.

4 changes: 4 additions & 0 deletions packages/changeset-form/addon-main.js
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);
Empty file.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

0 comments on commit 259ad8c

Please sign in to comment.