Skip to content

Commit

Permalink
Replace scss to css compiler while rollup
Browse files Browse the repository at this point in the history
  • Loading branch information
mkszepp committed Nov 11, 2024
1 parent 9fd3856 commit 8c262c0
Show file tree
Hide file tree
Showing 3 changed files with 2,224 additions and 3,322 deletions.
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

0 comments on commit 8c262c0

Please sign in to comment.