@xylabs/ts-scripts-react-yarn3 6.0.9 → 6.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xylabs/ts-scripts-react-yarn3",
3
- "version": "6.0.9",
3
+ "version": "6.1.0",
4
4
  "description": "TypeScript project scripts",
5
5
  "keywords": [
6
6
  "xylabs",
@@ -39,15 +39,20 @@
39
39
  "package-deps": "dist/neutral/bin/package/deps.mjs",
40
40
  "xy": "dist/neutral/bin/xy.mjs"
41
41
  },
42
+ "files": [
43
+ "dist",
44
+ "README.md",
45
+ "LICENSE"
46
+ ],
42
47
  "dependencies": {
43
- "@xylabs/ts-scripts-yarn3": "^6.0.9",
48
+ "@xylabs/ts-scripts-yarn3": "^6.1.0",
44
49
  "chalk": "^5.4.1",
45
50
  "yargs": "^17.7.2"
46
51
  },
47
52
  "devDependencies": {
48
53
  "@types/yargs": "^17.0.33",
49
- "@xylabs/ts-scripts-yarn3": "^6.0.9",
50
- "@xylabs/tsconfig": "^6.0.9",
54
+ "@xylabs/ts-scripts-yarn3": "^6.1.0",
55
+ "@xylabs/tsconfig": "^6.1.0",
51
56
  "publint": "^0.3.9",
52
57
  "tsup": "8.4.0",
53
58
  "typescript": "^5.8.2"
@@ -1,5 +0,0 @@
1
- import { runSteps } from '@xylabs/ts-scripts-yarn3'
2
-
3
- export const analyze = () => {
4
- return runSteps('Analyze', [['yarn', ['source-map-explorer', 'build/static/js/*.ts']]])
5
- }
@@ -1,6 +0,0 @@
1
- #!/usr/bin/env node
2
- import { runSteps } from '@xylabs/ts-scripts-yarn3'
3
-
4
- export const eject = () => {
5
- return runSteps('Eject', [['yarn', 'react-scripts eject']])
6
- }
@@ -1,5 +0,0 @@
1
- export * from './analyze.ts'
2
- export * from './eject.ts'
3
- export * from './sitemap.ts'
4
- export * from './start.ts'
5
- export * from './test.ts'
@@ -1,6 +0,0 @@
1
- #!/usr/bin/env node
2
- import { runSteps } from '@xylabs/ts-scripts-yarn3'
3
-
4
- export const sitemap = () => {
5
- return runSteps('Sitemap', [['ts-node-script', './scripts/sitemap.ts']])
6
- }
@@ -1,6 +0,0 @@
1
- #!/usr/bin/env node
2
- import { runSteps } from '@xylabs/ts-scripts-yarn3'
3
-
4
- export const start = () => {
5
- return runSteps('Start', [['yarn', 'react-scripts start']])
6
- }
@@ -1,6 +0,0 @@
1
- #!/usr/bin/env node
2
- import { runSteps } from '@xylabs/ts-scripts-yarn3'
3
-
4
- export const test = () => {
5
- return runSteps('Test', [['yarn', 'react-scripts test']])
6
- }
@@ -1,5 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- import { packageCleanOutputs } from '@xylabs/ts-scripts-yarn3'
4
-
5
- process.exitCode = packageCleanOutputs()
@@ -1,5 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- import { packageCleanTypescript } from '@xylabs/ts-scripts-yarn3'
4
-
5
- process.exitCode = packageCleanTypescript()
@@ -1,12 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- import { packageClean } from '@xylabs/ts-scripts-yarn3'
4
-
5
- packageClean()
6
- .then(() => {
7
- process.exit(0)
8
- })
9
- .catch((error) => {
10
- console.error(error)
11
- process.exit(1)
12
- })
@@ -1,11 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- import { packageCompile } from '@xylabs/ts-scripts-yarn3'
4
- import chalk from 'chalk'
5
-
6
- packageCompile({ verbose: true, publint: false })
7
- .then(value => (process.exitCode = value))
8
- .catch((reason) => {
9
- console.error(chalk.red(reason))
10
- process.exitCode = 1
11
- })
@@ -1,11 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- import { packageCompileTsup } from '@xylabs/ts-scripts-yarn3'
4
- import chalk from 'chalk'
5
-
6
- packageCompileTsup({ verbose: true })
7
- .then(value => (process.exitCode = value))
8
- .catch((reason) => {
9
- console.error(chalk.red(reason))
10
- process.exitCode = 1
11
- })
@@ -1,15 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- import { packageCompile } from '@xylabs/ts-scripts-yarn3'
4
- import chalk from 'chalk'
5
-
6
- packageCompile({ verbose: false })
7
- .then((value) => {
8
- if (value) {
9
- process.exit(value)
10
- }
11
- })
12
- .catch((reason) => {
13
- console.error(chalk.red(reason))
14
- process.exit(-1)
15
- })
@@ -1,11 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- import { packageCopyAssets } from '@xylabs/ts-scripts-yarn3'
4
- import chalk from 'chalk'
5
-
6
- packageCopyAssets({ target: 'cjs' })
7
- .then(value => (process.exitCode = value))
8
- .catch((reason) => {
9
- console.error(chalk.red(reason))
10
- process.exitCode = 1
11
- })
@@ -1,11 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- import { packageCopyAssets } from '@xylabs/ts-scripts-yarn3'
4
- import chalk from 'chalk'
5
-
6
- packageCopyAssets({ target: 'esm' })
7
- .then(value => (process.exitCode = value))
8
- .catch((reason) => {
9
- console.error(chalk.red(reason))
10
- process.exitCode = 1
11
- })
@@ -1,11 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- import { packageDeps } from '@xylabs/ts-scripts-yarn3'
4
- import chalk from 'chalk'
5
-
6
- packageDeps()
7
- .then(value => (process.exitCode = value))
8
- .catch((ex: Error) => {
9
- console.error(`Deps Failed: ${chalk.red(ex)}`)
10
- process.exitCode = 0
11
- })
@@ -1,12 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- import { packageGenDocs } from '@xylabs/ts-scripts-yarn3'
4
-
5
- packageGenDocs()
6
- .then(() => {
7
- process.exit(0)
8
- })
9
- .catch((error) => {
10
- console.error(error)
11
- process.exit(1)
12
- })
@@ -1,12 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- import { packagePublint } from '@xylabs/ts-scripts-yarn3'
4
- import chalk from 'chalk'
5
-
6
- packagePublint()
7
- .then(value => (process.exitCode = value))
8
- .catch((ex: Error) => {
9
- console.error(`Publint Failed: ${chalk.red(ex)}`)
10
- console.error(chalk.gray(ex.stack))
11
- process.exitCode = -1
12
- })
@@ -1,11 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- import { packageRecompile } from '@xylabs/ts-scripts-yarn3'
4
- import chalk from 'chalk'
5
-
6
- packageRecompile()
7
- .then(value => (process.exitCode = value))
8
- .catch((reason) => {
9
- console.error(chalk.red(reason))
10
- process.exitCode = 1
11
- })
package/src/bin/xy.ts DELETED
@@ -1,12 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- import { xyReact } from '../lib/index.ts'
4
-
5
- xyReact()
6
- .then(() => {
7
- process.exit(0)
8
- })
9
- .catch((error) => {
10
- console.error(error)
11
- process.exit(1)
12
- })
package/src/index.ts DELETED
@@ -1,2 +0,0 @@
1
- export * from './actions/index.ts'
2
- export * from './lib/index.ts'
package/src/lib/index.ts DELETED
@@ -1 +0,0 @@
1
- export * from './xyReact.ts'
@@ -1,64 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- import {
4
- xyBuildCommands, xyCommonCommands, xyInstallCommands, xyLintCommands, xyParseOptions,
5
- } from '@xylabs/ts-scripts-yarn3'
6
- import chalk from 'chalk'
7
-
8
- import {
9
- analyze, eject, sitemap, start,
10
- } from '../actions/index.ts'
11
-
12
- export const xyReact = async () => {
13
- return await xyBuildCommands(xyInstallCommands(xyLintCommands(xyInstallCommands(xyCommonCommands(xyParseOptions())))))
14
- .command(
15
- 'analyze',
16
- 'Analyze - Analyze Bundles',
17
- (yargs) => {
18
- return yargs
19
- },
20
- (argv) => {
21
- if (argv.verbose) console.log('Analyzing')
22
- process.exitCode = analyze()
23
- },
24
- )
25
- .command(
26
- 'eject',
27
- 'Eject - Eject React project',
28
- (yargs) => {
29
- return yargs
30
- },
31
- (argv) => {
32
- if (argv.verbose) console.log('Ejecting')
33
- process.exitCode = eject()
34
- },
35
- )
36
- .command(
37
- 'sitemap',
38
- 'Sitemap - Generate sitemap for the project',
39
- (yargs) => {
40
- return yargs
41
- },
42
- (argv) => {
43
- if (argv.verbose) console.log('Generating Sitemap')
44
- process.exitCode = sitemap()
45
- },
46
- )
47
- .command(
48
- 'start',
49
- 'Start - Start project in browser',
50
- (yargs) => {
51
- return yargs
52
- },
53
- (argv) => {
54
- if (argv.verbose) console.log('Starting')
55
- process.exitCode = start()
56
- },
57
- )
58
- .demandCommand(1)
59
- .command('*', '', () => {
60
- console.error(chalk.yellow(`Command not found [${chalk.magenta(process.argv[2])}]`))
61
- console.log(chalk.gray("Try 'yarn xy --help' for list of commands"))
62
- })
63
- .help().argv
64
- }
@@ -1,29 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "allowImportingTsExtensions": true,
4
- "allowSyntheticDefaultImports": true,
5
- "declaration": true,
6
- "declarationMap": true,
7
- "downlevelIteration": true,
8
- "emitDecoratorMetadata": true,
9
- "esModuleInterop": true,
10
- "experimentalDecorators": true,
11
- "isolatedModules": true,
12
- "importHelpers": true,
13
- "incremental": false,
14
- "module": "NodeNext",
15
- "moduleResolution": "NodeNext",
16
- "noImplicitAny": true,
17
- "noImplicitOverride": true,
18
- "outDir": "dist",
19
- "removeComments": true,
20
- "resolveJsonModule": true,
21
- "skipDefaultLibCheck": true,
22
- "skipLibCheck": true,
23
- "sourceMap": true,
24
- "strict": true,
25
- "target": "ESNext",
26
- },
27
- "exclude": [".github", ".vscode", ".yarn", "dist", "node_modules", "storybook-static", "build"],
28
- "include": ["src"]
29
- }
package/tsconfig.json DELETED
@@ -1,4 +0,0 @@
1
- {
2
- "exclude": ["dist"],
3
- "extends": "@xylabs/tsconfig"
4
- }
@@ -1,4 +0,0 @@
1
- {
2
- "extends": "./tsconfig.json",
3
- "include": ["**/*.spec.ts"]
4
- }
package/tsup.config.ts DELETED
@@ -1,21 +0,0 @@
1
- import { defineConfig } from 'tsup'
2
-
3
- export default defineConfig({
4
- bundle: true,
5
- cjsInterop: true,
6
- clean: false,
7
- dts: { entry: ['src/index.ts'] },
8
- entry: ['src'],
9
- format: ['esm'],
10
- outExtension({ format }) {
11
- if (format === 'cjs') {
12
- return { js: '.cjs' }
13
- }
14
- return { js: '.mjs' }
15
- },
16
- outDir: 'dist',
17
- sourcemap: true,
18
- splitting: false,
19
- target: 'esnext',
20
- tsconfig: 'tsconfig.build.json',
21
- })
package/xy.config.ts DELETED
@@ -1,10 +0,0 @@
1
- import type { XyTsupConfig } from '@xylabs/ts-scripts-yarn3'
2
- const config: XyTsupConfig = {
3
- compile: {
4
- browser: {},
5
- entryMode: 'all',
6
- node: {},
7
- },
8
- }
9
-
10
- export default config