Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v1.0.0 release #139

Merged
merged 43 commits into from
Oct 1, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
7bd0000
Clean up deprecated methods
danburzo Aug 5, 2021
1791a91
Merge remote-tracking branch 'origin/main' into 1.x
danburzo Sep 18, 2021
a1f81d8
Merge remote-tracking branch 'origin/main' into 1.x
danburzo Sep 18, 2021
ca85aaf
Re: #142, switch to type:module in package.json and update tools / de…
danburzo Sep 18, 2021
7d0585c
Updates to package.json
danburzo Sep 18, 2021
7169076
Add build.js script, add src/ folder to npm, rename build/ to bundled/
danburzo Sep 18, 2021
480ee80
1.0.0-alpha.0
danburzo Sep 18, 2021
50a45dd
Change names of bundles, update exports in package.json
danburzo Sep 18, 2021
5da032a
1.0.0-alpha.1
danburzo Sep 18, 2021
5ecc0f3
Fix relative exports
danburzo Sep 18, 2021
cd87bd2
1.0.0-alpha.2
danburzo Sep 18, 2021
be1cec1
1.0.0-alpha.3
danburzo Sep 18, 2021
a207c6f
Split in packs, provide entry points
danburzo Sep 18, 2021
75fa5bd
1.0.0-alpha.4
danburzo Sep 18, 2021
f9381fd
Retry exports
danburzo Sep 18, 2021
4fe058c
1.0.0-alpha.5
danburzo Sep 18, 2021
79f69cb
attempt 'require' export
danburzo Sep 18, 2021
0a04d80
1.0.0-alpha.6
danburzo Sep 18, 2021
f217ccc
Add main export
danburzo Sep 18, 2021
a153a58
1.0.0-alpha.7
danburzo Sep 18, 2021
b4ab63b
Merge remote-tracking branch 'origin/main' into 1.x
danburzo Sep 18, 2021
74dec26
Remove 'fns' entry for exports
danburzo Sep 18, 2021
f789d2a
1.0.0-alpha.8
danburzo Sep 18, 2021
f05b050
switch to .cjs for 11ty config
danburzo Sep 20, 2021
3cf81ec
Use husky 7.x
danburzo Sep 24, 2021
1baa869
...actually just use the 'prepare' script instead of husky 7.x
danburzo Sep 24, 2021
b7d4bf5
git-config: we're looking for --replace-all, not --add
danburzo Sep 24, 2021
a4bc86f
[Breaking] Extending culori: changed names of methods and color space…
danburzo Oct 1, 2021
a22b1e0
Make culori tree-shakeable, fixes #143. Culori now provides three fla…
danburzo Oct 1, 2021
7c32beb
1.0.0-alpha.9
danburzo Oct 1, 2021
7ec79e8
Docs: add migration guide, update API to ESM
danburzo Oct 1, 2021
b8b49a6
Fix legacy package exports
danburzo Oct 1, 2021
511fc82
1.0.0-alpha.10
danburzo Oct 1, 2021
18423e3
IIFE build: include globalName
danburzo Oct 1, 2021
a319638
1.0.0-alpha.11
danburzo Oct 1, 2021
4891145
Use jsdelivr field, maybe fixes Observable require()
danburzo Oct 1, 2021
b362677
1.0.0-alpha.12
danburzo Oct 1, 2021
1f13ec2
Add back rollup for UMD, publish for jsdelivr
danburzo Oct 1, 2021
79c886a
1.0.0-alpha.13
danburzo Oct 1, 2021
ea3ed7d
Updated docs
danburzo Oct 1, 2021
c331fdf
Use esbuild to make UMD build
danburzo Oct 1, 2021
5eb0010
1.0.0-alpha.14
danburzo Oct 1, 2021
1219492
Update docs
danburzo Oct 1, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 0 additions & 25 deletions .eslintrc.js

This file was deleted.

24 changes: 24 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"env": {
"browser": true,
"es2021": true,
"node": true
},
"extends": ["eslint:recommended", "plugin:import/recommended"],
"parserOptions": {
"ecmaVersion": 12,
"sourceType": "module"
},
"plugins": ["import"],
"rules": {
"constructor-super": 1,
"import/no-anonymous-default-export": 1,
"import/no-unused-modules": 1,
"no-const-assign": 1,
"no-mixed-spaces-and-tabs": 0,
"no-this-before-super": 1,
"no-undef": 2,
"no-unused-vars": [1, { "args": "none" }],
"valid-typeof": 1
}
}
2 changes: 2 additions & 0 deletions .git-hooks/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/sh
npx pretty-quick --staged
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.md
84 changes: 84 additions & 0 deletions build.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
import { build } from 'esbuild';

// Bundled CJS
build({
entryPoints: ['./src/index.js'],
logLevel: 'info',
bundle: true,
format: 'cjs',
outfile: 'bundled/culori.cjs'
});

// Bundled CJS, minified
build({
entryPoints: ['./src/index.js'],
logLevel: 'info',
bundle: true,
minify: true,
format: 'cjs',
outfile: 'bundled/culori.min.cjs'
});

// Bundled ESM
build({
entryPoints: ['./src/index.js'],
logLevel: 'info',
bundle: true,
format: 'esm',
outfile: 'bundled/culori.mjs'
});

// Bundled ESM, minified
build({
entryPoints: ['./src/index.js'],
logLevel: 'info',
bundle: true,
minify: true,
format: 'esm',
outfile: 'bundled/culori.min.mjs'
});

// Bundled IIFE
build({
entryPoints: ['./src/index.js'],
logLevel: 'info',
bundle: true,
format: 'iife',
globalName: 'culori',
outfile: 'bundled/culori.js'
});

// Bundled IIFE, minified
build({
entryPoints: ['./src/index.js'],
logLevel: 'info',
bundle: true,
minify: true,
format: 'iife',
globalName: 'culori',
outfile: 'bundled/culori.min.js'
});

// Bundled UMD
// Adapted from: https://github.com/umdjs/umd/blob/master/templates/returnExports.js
build({
entryPoints: ['./src/index.js'],
logLevel: 'info',
bundle: true,
format: 'iife',
globalName: 'culori',
banner: {
js: `(function(root, factory) {
if (typeof define === 'function' && define.amd) {
define([], factory);
} else if (typeof module === 'object' && module.exports) {
module.exports = factory();
} else {
root.culori = factory();
}
}
(typeof self !== 'undefined' ? self : this, function() {`
},
footer: { js: `return culori; }));` },
outfile: 'bundled/culori.umd.js'
});
2 changes: 1 addition & 1 deletion docs/_includes/layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ <h1>{{ title }}</h1>
</div>
{% include 'partials/footer.html' %}

<script src="https://unpkg.com/culori"></script>
<script src="https://unpkg.com/culori@{{ pkg.version }}"></script>
<script type="text/javascript">
document.body.style.setProperty(
'--random-1',
Expand Down
9 changes: 2 additions & 7 deletions docs/_includes/partials/footer.html
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
<footer>
<div class="container">
<p>
A <a href="https://labs.moqups.com">Moqups Labs</a> thing. Source
code available on
<a href="https://github.com/evercoder/culori">GitHub</a>.
</p>

<p>
Can this page be improved?
A <a href="https://labs.moqups.com">Moqups Labs</a> thing. Can this
page be improved?
<a
href="https://github.com/Evercoder/culori/blob/main/{{ page.inputPath }}"
>Edit it on GitHub</a
Expand Down
10 changes: 8 additions & 2 deletions docs/_includes/partials/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,17 @@
</div>
<nav>
<ul>
{%- for post in (collections.all | sortby('menu-order')) -%}
{%- for post in (collections.all | sortby('menu-order')) -%} {%
if post.data['menu-order'] %}
<li class="{% if page.url == post.url %}active {% endif %}">
<a href="{{ post.url }}">{{ post.data.title }}</a>
</li>
{%- endfor -%}
{% endif %} {%- endfor -%}
<li>
<a href="https://github.com/Evercoder/culori"
>GitHub <span aria-hidden="true">↗</span></a
>
</li>
</ul>
</nav>
</div>
Expand Down
Loading