Skip to content

Commit

Permalink
separate scss build
Browse files Browse the repository at this point in the history
  • Loading branch information
borosr committed Jul 5, 2024
1 parent bdef7e9 commit c34f747
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 4 deletions.
9 changes: 9 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
node_modules/
.vscode/
.github/
.idea

coverage/

Expand All @@ -15,3 +16,11 @@ public/
index.html
*.config.ts
*.config.js

.eslintrc.cjs
.nvmrc

src/docs/
src/fp-money/*.ts
src/fp-money/*.vue
src/fp-money/*.js
6 changes: 5 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,18 @@
"version": "2.0.0",
"private": false,
"description": "FluidPay input formatter and currency selector",
"repository": "github.com/fluidpay/fp-money",
"repository": {
"type": "git",
"url": "github.com/fluidpay/fp-money"
},
"license": "MIT",
"type": "module",
"main": "./dist/fp-money.umd.js",
"module": "./dist/fp-money.es.js",
"browser": "./dist/fp-money.umd.js",
"unpkg": "./dist/fp-money.umd.js",
"style": "./dist/style.css",
"scss": "./src/fp-money/fp-money.scss",
"exports": {
".": {
"import": "./dist/fp-money.es.js",
Expand Down
1 change: 0 additions & 1 deletion src/fp-money/fp-money.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { Currencies, currencies, intToFraction, fractionToInt, displayValue, getLocale, isNegative } from './helpers'

import './fp-money.scss'
export * from './helpers'

export interface Values {
Expand Down
14 changes: 12 additions & 2 deletions src/fp-money/rollup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import typescript from '@rollup/plugin-typescript';
import scss from "rollup-plugin-scss";

const libConfig: RollupOptions = {
plugins: [typescript({ tsconfig: 'tsconfig.build.json' }), scss({ fileName: 'style.css' })],
plugins: [typescript({ tsconfig: 'tsconfig.build.json' })],
input: fileURLToPath(new URL('fp-money.ts', import.meta.url)),
output: [
{
Expand All @@ -20,5 +20,15 @@ const libConfig: RollupOptions = {
]
};

const scssConfig: RollupOptions = {
plugins: [scss({ fileName: 'style.css' })],
input: fileURLToPath(new URL('fp-money.scss', import.meta.url)),
output: [
{
file: 'dist/style.css',
}
]
}


export default libConfig
export default [libConfig, scssConfig]

0 comments on commit c34f747

Please sign in to comment.