Skip to content

Commit

Permalink
fix: Quick updates
Browse files Browse the repository at this point in the history
  • Loading branch information
DimChtz committed Mar 15, 2024
1 parent 66c41d6 commit 0f68786
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 15 deletions.
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@
},
"scripts": {
"build": "rollup --bundleConfigAsCjs -c rollup.config.js",
"test": "node --experimental-vm-modules node_modules/jest/bin/jest.js --coverage && eslint ."
"test": "npm run test:eslint && npm run test:jest",
"test:eslint": "eslint src/**/*.js",
"test:jest": "node --experimental-vm-modules node_modules/jest/bin/jest.js --coverage",
"fix": "eslint --fix src/**/*.js"
},
"keywords": [
"css",
Expand Down
24 changes: 10 additions & 14 deletions rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,19 @@ import * as pckg from './package.json';
const year = new Date().getFullYear();
const banner = `//! PostCSS Flexup v${pckg.version} Copyright (c) ${year} ${pckg.author}`;

const getOutputOptions = (file, format) => ({
file,
format,
sourcemap: true,
exports: 'default',
banner: banner
});

export default () => [{
input: 'src/index.js',
output: [
{
file: 'dist/index.cjs',
format: 'cjs',
sourcemap: true,
exports: 'default',
banner: banner
},
{
file: 'dist/index.mjs',
format: 'esm',
sourcemap: true,
exports: 'default',
banner: banner
}
getOutputOptions('dist/index.cjs', 'cjs'),
getOutputOptions('dist/index.mjs', 'esm')
],
plugins: [
commonjs(),
Expand Down

0 comments on commit 0f68786

Please sign in to comment.