Skip to content

Commit

Permalink
feat: set type in package.json to module (#73)
Browse files Browse the repository at this point in the history
  • Loading branch information
web-padawan committed Jul 2, 2022
1 parent de8ceeb commit f31219e
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"license": "MIT",
"main": "hex-color-picker.js",
"module": "hex-color-picker.js",
"type": "module",
"types": "hex-color-picker.d.ts",
"repository": {
"type": "git",
Expand Down Expand Up @@ -66,14 +67,14 @@
"build": "npm run styles && tsc",
"deploy": "npm run dist && gh-pages -d dist",
"dev": "npm run watch & npm run serve",
"dist": "npm run build && rimraf dist && rollup -c rollup.config.js",
"dist": "npm run build && rimraf dist && rollup -c rollup.config.cjs",
"lint": "eslint src --ext .ts",
"prepublishOnly": "npm run build && npm run analyze",
"release": "standard-version",
"serve": "web-dev-server --node-resolve --open",
"size": "npm run build && size-limit",
"start": "web-dev-server --app-index dist/index.html --open",
"styles": "node ./scripts/build-styles.js",
"styles": "node ./scripts/build-styles.cjs",
"test": "wtr src/test/*.ts --coverage",
"test:visual": "wtr src/test/visual/*.ts",
"test:update": "UPDATE_REFS=true wtr src/test/visual/*.ts",
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion scripts/build-styles.js → scripts/build-styles.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const readFile = util.promisify(fs.readFile);
const delimiter = /<%\s*content\s*%>/;

async function minifyCss(cssFile) {
const data = await readFile(cssFile);
const data = await readFile(cssFile, 'utf8');
const result = csso.minify(data);
return result.css;
}
Expand Down
6 changes: 3 additions & 3 deletions web-test-runner.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const { esbuildPlugin } = require('@web/dev-server-esbuild');
const { visualRegressionPlugin } = require('@web/test-runner-visual-regression/plugin');
import { esbuildPlugin } from '@web/dev-server-esbuild';
import { visualRegressionPlugin } from '@web/test-runner-visual-regression/plugin';

module.exports = {
export default {
nodeResolve: true,
plugins: [
esbuildPlugin({ ts: true }),
Expand Down

0 comments on commit f31219e

Please sign in to comment.