From 871417325698d536cff29d9e80aa61e9f50e852c Mon Sep 17 00:00:00 2001 From: Matt Karl Date: Fri, 6 Jan 2023 20:32:14 -0500 Subject: [PATCH] Chore: Convert toolchain to extension-scripts (#39) --- .github/workflows/nodejs.yml | 4 +- .gitignore | 2 +- config/api-extractor.json | 48 - config/rollup.js | 53 - config/webdoc.json | 43 - {demo => examples}/OpenSans-Bold.ttf | Bin {demo => examples}/OpenSans-Regular.ttf | Bin {demo => examples}/index.html | 2 +- package-lock.json | 13208 ++++++++++------------ package.json | 123 +- test/HTMLTextStyle.test.ts | 23 +- test/jest-global-setup.ts | 29 - test/jest-global-teardown.ts | 20 - tsconfig.json | 24 +- 14 files changed, 6233 insertions(+), 7346 deletions(-) delete mode 100644 config/api-extractor.json delete mode 100644 config/rollup.js delete mode 100644 config/webdoc.json rename {demo => examples}/OpenSans-Bold.ttf (100%) rename {demo => examples}/OpenSans-Regular.ttf (100%) rename {demo => examples}/index.html (97%) delete mode 100644 test/jest-global-setup.ts delete mode 100644 test/jest-global-teardown.ts diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index 0e1de08..ca00401 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -18,7 +18,9 @@ jobs: run: npm install -g npm@8 - name: Install Dependencies run: npm ci - - name: Built and Test + - name: Build + run: npm run build + - name: Test uses: GabrielBB/xvfb-action@v1 with: run: npm test \ No newline at end of file diff --git a/.gitignore b/.gitignore index ae30812..55bb1a6 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,6 @@ node_modules dist +lib docs .DS_Store -.types_output example.api.json* \ No newline at end of file diff --git a/config/api-extractor.json b/config/api-extractor.json deleted file mode 100644 index 267c2f9..0000000 --- a/config/api-extractor.json +++ /dev/null @@ -1,48 +0,0 @@ - { - "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", - "projectFolder": "..", - "mainEntryPointFilePath": "/.types_output/index.d.ts", - "bundledPackages": [], - "compiler": { - "tsconfigFilePath": "/tsconfig.json" - }, - "apiReport": { - "enabled": false - }, - "docModel": { - "enabled": false - }, - "dtsRollup": { - "enabled": true, - "untrimmedFilePath": "/dist/html-text.d.ts" - }, - "tsdocMetadata": { - "enabled": false - }, - "messages": { - "compilerMessageReporting": { - "default": { - "logLevel": "warning" - } - }, - "extractorMessageReporting": { - "default": { - "logLevel": "warning" - }, - "ae-missing-release-tag": { - "logLevel": "none" - }, - "ae-forgotten-export": { - "logLevel": "none" - }, - "ae-setter-with-docs": { - "logLevel": "none" - } - }, - "tsdocMessageReporting": { - "default": { - "logLevel": "none" - } - } - } -} \ No newline at end of file diff --git a/config/rollup.js b/config/rollup.js deleted file mode 100644 index 4c9e0f8..0000000 --- a/config/rollup.js +++ /dev/null @@ -1,53 +0,0 @@ -import esbuild from 'rollup-plugin-esbuild'; -import pkg from '../package.json'; - -const compiled = (new Date()).toUTCString().replace(/GMT/g, 'UTC'); -const banner = [ - `/*!`, - ` * ${pkg.name} - v${pkg.version}`, - ` * Compiled ${compiled}`, - ` *`, - ` * ${pkg.name} is licensed under the MIT License.`, - ` * http://www.opensource.org/licenses/mit-license`, - ` */`, -].join('\n'); - -const name = '_pixi_htmltext'; - -export default { - input: 'src/index.ts', - external: Object.keys(pkg.peerDependencies), - plugins: [ - esbuild({ - target: 'es2017', - minify: process.env.NODE_ENV === 'production', - }) - ], - output: [ - { - file: pkg.module, - format: 'es', - sourcemap: true, - banner, - }, - { - file: pkg.main, - format: 'cjs', - sourcemap: true, - banner, - }, - { - file: pkg.bundle, - format: 'iife', - name, - footer: `Object.assign(PIXI, ${name});`, - sourcemap: true, - banner, - globals: { - '@pixi/sprite': 'PIXI', - '@pixi/core': 'PIXI', - '@pixi/text': 'PIXI', - } - } - ] -} diff --git a/config/webdoc.json b/config/webdoc.json deleted file mode 100644 index 9b16c8d..0000000 --- a/config/webdoc.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "tags": { - "allowUnknownTags": false - }, - "source": { - "include": [ - "src/**/*.ts" - ] - }, - "templates": { - "applicationName": "PixiJS HTMLText", - "meta": { - "title": "PixiJS HTMLText", - "description": "API Documentation for HTMLText for PixiJS", - "keyword": "PixiJS, Text, canvas, rendering, typography, CSS, SVG" - }, - "cleverLinks": false, - "linenums": true, - "monospaceLinks": false, - "default": { - "outputSourceFiles": true - } - }, - "plugins": [ - "plugins/markdown" - ], - "markdown": { - "parser": "gfm", - "hardwrap": false - }, - "template": { - "readme": "./README.md", - "repository": "https://github.com/pixijs/html-text/" - }, - "opts": { - "encoding": "utf8", - "recurse": true, - "private": false, - "lenient": true, - "destination": "docs", - "template": "@pixi/webdoc-template" - } -} \ No newline at end of file diff --git a/demo/OpenSans-Bold.ttf b/examples/OpenSans-Bold.ttf similarity index 100% rename from demo/OpenSans-Bold.ttf rename to examples/OpenSans-Bold.ttf diff --git a/demo/OpenSans-Regular.ttf b/examples/OpenSans-Regular.ttf similarity index 100% rename from demo/OpenSans-Regular.ttf rename to examples/OpenSans-Regular.ttf diff --git a/demo/index.html b/examples/index.html similarity index 97% rename from demo/index.html rename to examples/index.html index 7e74487..c37e2a8 100644 --- a/demo/index.html +++ b/examples/index.html @@ -4,7 +4,7 @@ PixiJS HTMLText - +