Skip to content

Commit

Permalink
Added build for system.css stylesheet
Browse files Browse the repository at this point in the history
  • Loading branch information
Egor Kloos committed Jan 12, 2024
1 parent 3be3185 commit a21c3b0
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 3 deletions.
1 change: 1 addition & 0 deletions build/system.min.css

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

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
"type": "module",
"description": "A base stylesheet using system colors and css keywords.",
"scripts": {
"build": "vite build"
"build": "vite build && npm run lib",
"lib": "vite build -c vite.lib.config.js"
},
"author": "C. Egor Kloos",
"license": "AGPLv3",
Expand Down
3 changes: 1 addition & 2 deletions vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ import { defineConfig } from 'vite';
export default defineConfig({
base: '/system.css/',
build: {
minify: false,
target: ['esnext', 'safari17', 'firefox124', 'chrome117'],
minify: true,
rollupOptions: {
input: {
main: resolve(__dirname, 'index.html'),
Expand Down
19 changes: 19 additions & 0 deletions vite.lib.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import { resolve } from 'path';
import { defineConfig } from 'vite';

export default defineConfig({
base: '/system.css/',
build: {
outDir: 'build',
minify: true,
target: ['esnext', 'safari17', 'firefox124', 'chrome117'],
rollupOptions: {
input: {
system: resolve(__dirname, 'index.css'),
},
output: {
assetFileNames: `[name].min.[ext]`,
},
},
},
});

0 comments on commit a21c3b0

Please sign in to comment.