Skip to content

Commit

Permalink
fix: use netlify for docs, update dep, remove package-lock
Browse files Browse the repository at this point in the history
  • Loading branch information
scttcper committed May 28, 2019
1 parent dbaae13 commit ffdbd74
Show file tree
Hide file tree
Showing 10 changed files with 35 additions and 12,329 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,4 @@ dist
demo/**/*.js
demo/**/*.js.map
junit.xml
yarn.lock
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
package-lock=false
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright 2018 Scott Cooper <[email protected]>
Copyright (c) Scott Cooper <[email protected]>

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
A fork of [tinycolor2](https://github.com/bgrins/TinyColor) by [Brian Grinstead](https://github.com/bgrins)

__DEMO__: https://tinycolor.netlify.com/

### Changes from tinycolor2

* reformatted into TypeScript / es2015 and requires node >= 8
Expand Down
11 changes: 0 additions & 11 deletions circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,6 @@ jobs:
- run: npm install
- run: npm run build
- run: npm run semantic-release
- run:
name: Install and configure dependencies
command: |
git config credential.helper "cache --timeout=120"
git config user.email "[email protected]"
git config user.name "ci-build"
ssh-add -D
- run: npm run build:docs
- run: cp -r demo/public/ docs
- run: npm run build:demo
- run: npx gh-pages -x -d docs -m "update docs [ci skip]" -r https://${GH_TOKEN}@github.com/scttcper/ts-trueskill.git

workflows:
version: 2
Expand Down
12 changes: 6 additions & 6 deletions demo/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import tinycolor from '../../src/umd_api';

// make tinycolor available in the console
(window as any).tinycolor = tinycolor;
console.log(`try "new TinyColor('blue')" or "tinycolor.random()" or tinycolor('red')`);
console.log('try "new TinyColor(\'blue\')" or "tinycolor.random()" or tinycolor(\'red\')');

const input = document.querySelector<HTMLInputElement>('#color');

Expand Down Expand Up @@ -45,10 +45,8 @@ function colorChange(color) {
const brighten = new tinycolor.TinyColor(color).brighten(20).toHexString();
filtersEl.querySelector<HTMLElement>('.brighten').style['background-color'] = brighten;

const allColors = [];
for (const i in tinycolor.names) {
allColors.push(i);
}
const allColors = Object.keys(tinycolor.names);

const readable = tinycolor.mostReadable(color, allColors);
mostReadableEl.style['background-color'] = readable.toHexString();

Expand All @@ -61,10 +59,12 @@ function colorChange(color) {
filtersEl.querySelector('.analogous').innerHTML = colorArrayToHTML(tiny.analogous());
filtersEl.querySelector('.sc').innerHTML = colorArrayToHTML(tiny.splitcomplement());
}
(window as any).handleChange = function handleChange(color) {

(window as any).handleChange = function (color) {
input.value = color;
colorChange(color);
};

colorChange({ r: 150, g: 0, b: 100 });

// Set that box next to the title to a random color
Expand Down
3 changes: 2 additions & 1 deletion demo/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@
"strict": false,
"target": "es5",
},
"files": ["./src/main"]
"files": ["./src/main.ts"],
"include": ["./**/*.ts"]
}
Loading

0 comments on commit ffdbd74

Please sign in to comment.