Skip to content

Commit

Permalink
chore: refactor code to es module (#336)
Browse files Browse the repository at this point in the history
* chore: refactor code to es module

* switch to pnpm

* convert tests to vitest

* convert tests to vitest

* prettier code formatting

* update dependencies

* fix husky setup

* move bundles to dist

* one more test

* convert css2rgb test

* migrate more tests, upgrade eslint, prettier check in lint

* migrate more tests

* 3 more

* fix chroma.luminance bug

see #334

* link to discord chat in readme

* two more tests

* bump travis node version

* migrate more tests

* test: migrate to vitest (#337)

* 2.5.0-0

* fix imports

* 2.5.0-1

* fix imports

* 2.5.0-2

* fix imports

* 2.5.0-3

* update version number in src instead of relying on rollup replace

* 2.5.0-4

* prepare version bump

* 2.5.0

* npm publish

---------

Co-authored-by: Chris <[email protected]>
  • Loading branch information
gka and zyyv authored Jul 30, 2024
1 parent c118d3d commit 1a9b198
Show file tree
Hide file tree
Showing 178 changed files with 12,573 additions and 10,298 deletions.
15 changes: 15 additions & 0 deletions .bin/update-version.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// update-version.js
const fs = require('fs');
const path = require('path');

const packageJsonPath = path.join(__dirname, '../package.json');
const versionFilePath = path.join(__dirname, '../src', 'version.js');

const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf8'));
const version = packageJson.version;

const versionFileContent = `// this gets updated automatically\nexport const version = '${version}';\n`;

fs.writeFileSync(versionFilePath, versionFileContent);

console.log(`Updated version to ${version} in ${versionFilePath}`);
15 changes: 0 additions & 15 deletions .eslintrc.cjs

This file was deleted.

2 changes: 2 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
npm run lint
npm test -- --run
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
language: node_js
node_js:
- "10"
- "20"
before_script: "npm install"
script: "npm test"
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
chroma.js - JavaScript library for color conversions

Copyright (c) 2011-2019, Gregor Aisch
Copyright (c) 2011-2024, Gregor Aisch
All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand Down
58 changes: 0 additions & 58 deletions chroma-light.min.js

This file was deleted.

58 changes: 0 additions & 58 deletions chroma.min.js

This file was deleted.

Loading

0 comments on commit 1a9b198

Please sign in to comment.