Skip to content

Commit

Permalink
adjustments to build config
Browse files Browse the repository at this point in the history
  • Loading branch information
ef4 committed Dec 19, 2024
1 parent bf3a6c3 commit 6f8976e
Show file tree
Hide file tree
Showing 6 changed files with 104 additions and 35 deletions.
3 changes: 1 addition & 2 deletions packages/boxel-ui/addon/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
"@babel/plugin-transform-class-static-block": "^7.22.11",
"@babel/plugin-transform-typescript": "^7.22.15",
"@babel/runtime": "^7.24.4",
"@embroider/addon-dev": "^7.0.0",
"@embroider/addon-dev": "7.0.1-unstable.4070ba7",
"@embroider/macros": "^1.16.9",
"@rollup/plugin-babel": "^6.0.4",
"@tsconfig/ember": "3.0.1",
Expand All @@ -97,7 +97,6 @@
"prettier-plugin-ember-template-tag": "^1.1.0",
"rollup": "^4.18.1",
"rollup-plugin-copy": "^3.5.0",
"rollup-plugin-import-css": "^3.5.7",
"svgo": "3.0.2"
},
"peerDependencies": {
Expand Down
23 changes: 10 additions & 13 deletions packages/boxel-ui/addon/rollup.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { Addon } from '@embroider/addon-dev/rollup';
import { babel } from '@rollup/plugin-babel';
import { scopedCSS } from 'glimmer-scoped-css/rollup';
import copy from 'rollup-plugin-copy';
import css from 'rollup-plugin-import-css';

const addon = new Addon({
srcDir: 'src',
Expand All @@ -16,7 +15,6 @@ export default {

plugins: [
scopedCSS('src'),
css(),

// These are the modules that users should be able to import from your
// addon. Anything not listed here may get optimized away.
Expand Down Expand Up @@ -44,29 +42,28 @@ export default {
// Ensure that .gjs files are properly integrated as Javascript
addon.gjs(),

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

// these asset types are imported for their URLs
addon.keepAssets(
[
'styles/**/*.css',
'**/*.css',
'**/*.otf',
'**/*.png',
'**/*.webp',
'**/*.woff2',
],
['**/*.otf', '**/*.png', '**/*.webp', '**/*.woff2'],
'default',
),

// Remove leftover build artifacts when starting a new build.
addon.clean({ runOnce: true }),

// Copy Readme and License into published package
// Copy files into published package
copy({
targets: [
{ src: '../README.md', dest: '.' },
{ src: '../LICENSE.md', dest: '.' },
{ src: './src/styles/*.{css,woff2,otf}', dest: './dist/styles' },
],
// this makes it late enough that the `clean()` hook above doesn't remove
// our copied files
hook: 'generateBundle',
}),

// This babel config should *not* apply presets or compile away ES modules.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { LoadingIndicator } from '@cardstack/boxel-ui/components';
import { fn, hash } from '@ember/helper';
import { on } from '@ember/modifier';
import { action } from '@ember/object';
import Component from '@glimmer/component';
import { tracked } from '@glimmer/tracking';

import { and, eq } from '../../helpers/truth-helpers.ts';
import LoadingIndicator from '../loading-indicator/index.gts';

const isFastBoot = typeof (globalThis as any).FastBoot !== 'undefined';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { cssVar } from '@cardstack/boxel-ui/helpers';
import { fn } from '@ember/helper';
import Component from '@glimmer/component';
import { tracked } from '@glimmer/tracking';
Expand All @@ -9,6 +8,7 @@ import {
} from 'ember-freestyle/decorators/css-variable';
import { get } from 'lodash';

import cssVar from '../../helpers/css-var.ts';
import Pill from '../pill/index.gts';
import DndKanbanBoard, { DndColumn } from './index.gts';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import DayComponent from 'ember-power-calendar/components/days';
import NavComponent from 'ember-power-calendar/components/nav';
import type DayComponent from 'ember-power-calendar/components/days';
import type NavComponent from 'ember-power-calendar/components/nav';

declare module 'ember-power-calendar/components/power-calendar-range' {
interface PowerCalendarRangeDefaultBlock {
Expand Down
105 changes: 89 additions & 16 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 6f8976e

Please sign in to comment.