mirror of
https://github.com/chenasraf/megahal.js.git
synced 2026-05-17 17:48:02 +00:00
build: fix build
This commit is contained in:
19
.github/workflows/release.yml
vendored
19
.github/workflows/release.yml
vendored
@@ -36,12 +36,27 @@ jobs:
|
||||
- build
|
||||
- test
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
release_created: ${{ steps.release.outputs.release_created }}
|
||||
steps:
|
||||
- uses: googleapis/release-please-action@v4
|
||||
id: release
|
||||
with:
|
||||
token: ${{ secrets.RELEASE_PLEASE_TOKEN }}
|
||||
release-type: node
|
||||
- run: npm publish
|
||||
|
||||
publish:
|
||||
needs: release
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ needs.release.outputs.release_created }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20
|
||||
- run: npm i -g pnpm
|
||||
- run: pnpm run ci
|
||||
- run: pnpm build
|
||||
- run: cd build && npm publish
|
||||
env:
|
||||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||
if: ${{ steps.release.outputs.release_created }}
|
||||
|
||||
3
.gitignore
vendored
3
.gitignore
vendored
@@ -128,3 +128,6 @@ dist
|
||||
.yarn/build-state.yml
|
||||
.yarn/install-state.gz
|
||||
.pnp.*
|
||||
|
||||
# Output files
|
||||
build/
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"ci": "pnpm install --frozen-lockfile",
|
||||
"build": "tsc",
|
||||
"build": "rm -rf build && tsc && cp package.json README.md build/",
|
||||
"test": "jest"
|
||||
},
|
||||
"keywords": [
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { MegaHAL } from '@/megahal'
|
||||
import { MegaHAL } from '../megahal'
|
||||
|
||||
MegaHAL.addPersonality('aliens', [
|
||||
"Hello there, it is indeed a great pleasure to meet you. I'm Bishop.",
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { MegaHAL } from '@/megahal'
|
||||
import { MegaHAL } from '../megahal'
|
||||
|
||||
MegaHAL.addPersonality('bill', [
|
||||
'Thank you for coming, I can now take your questions.',
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { MegaHAL } from '@/megahal'
|
||||
import { MegaHAL } from '../megahal'
|
||||
|
||||
MegaHAL.addPersonality('caitsith', [
|
||||
'Hello there, it is indeed a great pleasure to meet you.',
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { MegaHAL } from '@/megahal'
|
||||
import { MegaHAL } from '../megahal'
|
||||
|
||||
MegaHAL.addPersonality('default', [
|
||||
'Hello there, it is indeed a great pleasure to meet you.',
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { MegaHAL } from '@/megahal'
|
||||
import { MegaHAL } from '../megahal'
|
||||
|
||||
MegaHAL.addPersonality('ferris', [
|
||||
"Hello there, it is indeed a great pleasure to meet you. I'm Ferris.",
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { MegaHAL } from '@/megahal'
|
||||
import { MegaHAL } from '../megahal'
|
||||
|
||||
MegaHAL.addPersonality('manson', [
|
||||
'Anti choice',
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { MegaHAL } from '@/megahal'
|
||||
import { MegaHAL } from '../megahal'
|
||||
|
||||
MegaHAL.addPersonality('pepys', [
|
||||
`I was sent for to the Privy Seal, whither I was forced to go and stay so long and late that I was much vexed.`,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { MegaHAL } from '@/megahal'
|
||||
import { MegaHAL } from '../megahal'
|
||||
|
||||
MegaHAL.addPersonality('pulp', [
|
||||
`Hello there, it is indeed a great pleasure to meet you. I'm Marsellus.`,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { MegaHAL } from '@/megahal'
|
||||
import { MegaHAL } from '../megahal'
|
||||
|
||||
MegaHAL.addPersonality('scream', [
|
||||
`Hello there, it is indeed a great pleasure to meet you. I'm Randy.`,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { MegaHAL } from '@/megahal'
|
||||
import { MegaHAL } from '../megahal'
|
||||
|
||||
MegaHAL.addPersonality('sherlock', [
|
||||
'I think, Watson, that you have put on seven and a half pounds since I saw you.',
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { MegaHAL } from '@/megahal'
|
||||
import { MegaHAL } from '../megahal'
|
||||
|
||||
MegaHAL.addPersonality('startrek', [
|
||||
`Hello, it is indeed a great pleasure to meet you. I am Lt. Commander Data. `,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { MegaHAL } from '@/megahal'
|
||||
import { MegaHAL } from '../megahal'
|
||||
|
||||
MegaHAL.addPersonality('starwars', [
|
||||
`Hello there, it is indeed a great pleasure to meet you. I'm Threepio.`,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import fs from 'node:fs/promises'
|
||||
import path from 'node:path'
|
||||
import os from 'node:os'
|
||||
import MegaHAL from '@/index'
|
||||
import MegaHAL from '../src/index'
|
||||
import '@/personalities/sherlock'
|
||||
|
||||
describe('megahal', () => {
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
{
|
||||
"include": [
|
||||
"src/**/*"
|
||||
],
|
||||
"compilerOptions": {
|
||||
/* Visit https://aka.ms/tsconfig to read more about this file */
|
||||
/* Projects */
|
||||
@@ -26,9 +29,11 @@
|
||||
// "rootDir": "./", /* Specify the root folder within your source files. */
|
||||
// "moduleResolution": "node10", /* Specify how TypeScript looks up a file from a given module specifier. */
|
||||
"baseUrl": "./src" /* Specify the base directory to resolve non-relative module names. */,
|
||||
"paths": {
|
||||
"@/*": ["./*"]
|
||||
} /* Specify a set of entries that re-map imports to additional lookup locations. */,
|
||||
// "paths": {
|
||||
// "@/*": [
|
||||
// "./*"
|
||||
// ]
|
||||
// } /* Specify a set of entries that re-map imports to additional lookup locations. */,
|
||||
// "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */
|
||||
// "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */
|
||||
// "types": [], /* Specify type package names to be included without being referenced in a source file. */
|
||||
@@ -46,7 +51,7 @@
|
||||
// "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */
|
||||
// "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */
|
||||
/* Emit */
|
||||
// "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */
|
||||
"declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */
|
||||
// "declarationMap": true, /* Create sourcemaps for d.ts files. */
|
||||
// "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */
|
||||
// "sourceMap": true, /* Create source map files for emitted JavaScript files. */
|
||||
|
||||
Reference in New Issue
Block a user