Skip to content

Commit

Permalink
ci: library import fix (#10)
Browse files Browse the repository at this point in the history
* Initial port of color-java (#1)

* ci: Fixing typo in readme, and adding initial stubs for github actions.

* doc: Updating build-test action link.

* ci: Adding initial build files

* test: Adding test stub configs

* chore: Porting classes from color-java project.

* chore: Porrting Color from color-java

* refactor: Moving functions around to be next to overloaded functions.

* refactor: Changing type any to (number | string)

* fix: Fixing compile errors in ColorUtils.ts

* fix: Removed most helper methods from color since typescript sucks.

* chore: Port from  color-java/ColorUtilsTest, with tests disabled.

* ci: Getting tests running

* test: uncommenting out tests for 'test valid'

* fix: Allowing for null on isValidHex calls

* fix: Correcting porting errors.

* test: uncommenting out most of 'test utils'

* fix: Correcting porting errors in toHSL

* chore: Port if ColorTest from color-java.  All commented out.

* test: uncommenting out and fixing helper methods

* test: Uncommenting out test color creation

* fix: Fixing recursion on setRed, setBule, setGreen

* fix: Trying to handle floating points at 0 and at 1

* test: Uncommenting out color hex constants test.

* test: Uncommenting test hex integers test.

* test: Uncommenting out alpha integer test

* test: Uncommenting RGB test

* test: uncommenting hex integers test

* test: uncommenting arithmetic test

* test: uncommenting hex singles test

* test: uncommenting color hsl test

* test: commenting out color with alpha check.  Fixing TODO's

* test: fixing last remaing TODOs

* ci: Porting over ReadmeTest from color-java

* doc: Updating readme from ReadmeTest.ts

* Preparing for release (#2)

* doc: Correcting spacing in README usage

* chore: Removing unused index.ts file

* doc: Removing node as an engine

* doc: Updating readme

* ci: Trying new github action

* ci: Fixing github actions

* ci: Removing coveralls step

* ci: More github action fixing

* doc: Removing link to ngagoint.github.io

* ci: Adding docs directory

* ci: Removing references to color-java in docs

* ci: Adding coveralls (#6)

* ci: Adding coverall action

* ci: Adding coverage and coveralls

* ci: Trying coveralls again

* ci: Adding test step before coverage

* ci: Calling test:rrun from coverage

* fix: Adding index.ts to fix importing of the color library (#8)

* doc: bump version to 1.1.0-beta.0

* ci: attempt to fix import of library (#9)

* ci: Updating build

* ci: Adding types to package.json

* ci: Adding prettier and lint

* fix: Changing lib to dist for exports

* ci: Adding types to package.json

* refactor: moving source to src instead of lib

* ci: Removing copying of node_modules into the test-lib area

* ci: Adding prepare script

* ci: Adding coverage and lint steps

* ci: Removed build workflow and breaking out individual steps

* fix: Fixing test step that only did a build

* ci: Adding if check on coveralls for master branch

* fix: Correcting removing rreferences to dist that was missed

* refactor: Cleaning up tsconfigs

* fix: Fixing linter errors

* fix: Correcting issue with alpha

* ci: Removing npm-run-all and ts-node from dependencies

* ci: Adding module script

* ci: removing files from package.json

* ci: adding .npmignore

* ci: cleanup of build

* test: changing mocha to look in dist

* ci: adding more files to .npmignore

* ci: removing typings

* ci: more cleanup of build

* refactor: moving index.js

* ci: adding index.js to package.json

* fix: Moving index.js back to src

* ci: chainging main entry point yet again

* fix: trying to get entry point setup

* ci: removing test from package

* fix: changing main to index.js instead of index.ts

* fix: updating typings

* 2.0.0

* feat: bump to version 2.0.0

* 2.0.1-beta.0

* ci: Correcting dist

* 2.0.1-beta.1

* ci: Getting dist directory cleaned up and removing prerelease

* ci: more dist cleanup

* 2.0.1-beta.2

* feat: bump to 2.0.1
  • Loading branch information
gillandk authored Sep 22, 2022
1 parent eee7a3c commit 9a4ef04
Show file tree
Hide file tree
Showing 23 changed files with 4,110 additions and 6,304 deletions.
27 changes: 18 additions & 9 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Build & Test

on: [push]
on: [push, pull_request]

jobs:
build:
Expand All @@ -10,16 +10,25 @@ jobs:
steps:
- name: Checkout Repository
uses: actions/checkout@v1
- name: Build & Test
run: |
npm install
npm run build --if-present
npm run test
npm run coverage
env:
CI: true

- name: Install
run: npm ci

- name: Build
run: npm run build

- name: Test
run: npm run test

- name: Lint
run: npm run lint

- name: Coverage
run: npm run coverage

- name: Coveralls
uses: coverallsapp/github-action@master
if: github.ref_name == 'master'
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: ./docs/coverage/lcov.info
19 changes: 0 additions & 19 deletions .github/workflows/build.yml

This file was deleted.

1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ test/fixtures/private
**/*/tmp

dist
test-dist
**/*/package-lock.json

built
Expand Down
4 changes: 2 additions & 2 deletions .mocharc.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module.exports = {
spec: 'test-dist/**/*.js',
ignore: 'test-dist/node_modules/**',
spec: 'dist/**/*.js',
ignore: 'dist/node_modules/**',
import: [
],
};
13 changes: 13 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
.github/
.vscode/
build/
docs/
src/
test/

*.js.map

.mocharc.js
.prettierrc
tsconfig.json
tslint.json
5 changes: 5 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"printWidth": 120,
"trailingComma": "all",
"singleQuote": true
}
16 changes: 16 additions & 0 deletions build/dist.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import * as fs from "fs";

async function main(): Promise<void> {

const ROOT = `${__dirname}/..`;
const DIST = `${ROOT}/dist`;

if (fs.existsSync(`${DIST}/src`)) {
fs.cpSync(`${DIST}/src`, `${DIST}/`, { recursive: true });
fs.rmSync(`${DIST}/src`, { recursive: true });
}
if (fs.existsSync(`${DIST}/test`)) {
fs.rmSync(`${DIST}/test`, { recursive: true });
}
}
main();
6 changes: 6 additions & 0 deletions index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/**
* @since 1.1.0
*/
export * from './dist/Color';
export * from './dist/ColorConstants';
export * from './dist/ColorUtils';
Loading

0 comments on commit 9a4ef04

Please sign in to comment.