Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace scss to css compiler while rollup #528

Merged
merged 1 commit into from
Nov 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions ember-power-calendar/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -120,12 +120,11 @@
"eslint-plugin-import": "^2.30.0",
"eslint-plugin-n": "^17.10.2",
"eslint-plugin-prettier": "^5.2.1",
"node-sass": "^9.0.0",
"postcss": "^8.4.45",
"prettier": "^3.3.3",
"prettier-plugin-ember-template-tag": "^2.0.2",
"rollup": "^4.21.2",
"rollup-plugin-styles": "^4.0.0",
"rollup-plugin-sass": "^1.13.2",
"rsvp": "^4.8.5",
"sass": "^1.78.0",
"typescript": "^5.5.4",
Expand Down
24 changes: 21 additions & 3 deletions ember-power-calendar/rollup.config.mjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { babel } from '@rollup/plugin-babel';
import { Addon } from '@embroider/addon-dev/rollup';
import styles from 'rollup-plugin-styles';
import sass from 'rollup-plugin-sass';
import postcss from 'postcss';

const addon = new Addon({
srcDir: 'src',
Expand All @@ -16,8 +17,25 @@ export default [
assetFileNames: '[name][extname]',
},
plugins: [
styles({
mode: ['extract', 'ember-power-calendar.css'],
sass({
output: './vendor/ember-power-calendar.css',
}),
],
},
{
input: './ember-power-calendar-for-css-generate.scss',
output: {
file: './vendor/ember-power-calendar.js',
assetFileNames: '[name][extname]',
},
plugins: [
sass({
processor: (css) =>
postcss()
.process(css, {
from: undefined,
})
.then((result) => result.css),
}),
],
},
Expand Down
Loading