Skip to content

Commit

Permalink
Convert to TypeScript, upgrade to v7
Browse files Browse the repository at this point in the history
  • Loading branch information
bigtimebuddy committed Sep 21, 2022
1 parent aa57833 commit 3d2b793
Show file tree
Hide file tree
Showing 10 changed files with 15,110 additions and 3,257 deletions.
5 changes: 0 additions & 5 deletions .eslintrc

This file was deleted.

4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
node_modules
dist
docs
.DS_Store
.DS_Store
.types_output
example.api.json*
48 changes: 48 additions & 0 deletions config/api-extractor.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
"projectFolder": "..",
"mainEntryPointFilePath": "<projectFolder>/.types_output/index.d.ts",
"bundledPackages": [],
"compiler": {
"tsconfigFilePath": "<projectFolder>/tsconfig.json"
},
"apiReport": {
"enabled": false
},
"docModel": {
"enabled": false
},
"dtsRollup": {
"enabled": true,
"untrimmedFilePath": "<projectFolder>/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"
}
}
}
}
21 changes: 7 additions & 14 deletions rollup.config.js → config/rollup.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import { terser } from 'rollup-plugin-terser';
import bubel from 'rollup-plugin-buble';
import pkg from './package.json';
import esbuild from 'rollup-plugin-esbuild';
import pkg from '../package.json';

const prod = process.env.NODE_ENV === 'production'
const compiled = (new Date()).toUTCString().replace(/GMT/g, 'UTC');
const banner = [
`/*!`,
Expand All @@ -17,15 +15,13 @@ const banner = [
const name = '_pixi_htmltext';

export default {
input: 'src/index.js',
input: 'src/index.ts',
external: Object.keys(pkg.peerDependencies),
plugins: [
bubel(),
...prod ? [terser({
output: {
comments: (node, comment) => comment.line === 1
}
})] : []
esbuild({
target: 'es2017',
minify: process.env.NODE_ENV === 'production',
})
],
output: [
{
Expand All @@ -49,10 +45,7 @@ export default {
banner,
globals: {
'@pixi/sprite': 'PIXI',
'@pixi/settings': 'PIXI',
'@pixi/core': 'PIXI',
'@pixi/utils': 'PIXI.utils',
'@pixi/math': 'PIXI',
'@pixi/text': 'PIXI',
}
}
Expand Down
32 changes: 22 additions & 10 deletions jsdoc.json → config/webdoc.json
Original file line number Diff line number Diff line change
@@ -1,31 +1,43 @@
{
"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
}
},
"source": {
"include": ["./src/"],
"includePattern": ".+\\.js(doc)?$",
"excludePattern": "docs"
},
"plugins": [
"plugins/markdown",
"@pixi/jsdoc-template/plugins/es6-fix"
"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": false,
"destination": "./docs",
"template": "./node_modules/@pixi/jsdoc-template"
"lenient": true,
"destination": "docs",
"template": "@pixi/webdoc-template"
}
}
12 changes: 0 additions & 12 deletions index.d.ts

This file was deleted.

Loading

0 comments on commit 3d2b793

Please sign in to comment.