Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

bob-ts

Package Overview
Dependencies
Maintainers
1
Versions
37
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bob-ts - npm Package Compare versions

Comparing version 0.0.7 to 1.0.0

4

lib/rollupConfig.js

@@ -20,6 +20,6 @@ 'use strict';

const target = "es2019";
const input = (await globby(entryPoints, {
const input = (await globby(entryPoints.map((v) => v.replace(/\\/g, "/")), {
absolute: true,
ignore: ["**/node_modules"]
})).filter((v) => v.endsWith(".ts") && !v.endsWith(".d.ts"));
})).filter((v) => v.endsWith(".tsx") || v.endsWith(".ts") && !v.endsWith(".d.ts"));
const inputOptions = {

@@ -26,0 +26,0 @@ input,

{
"name": "bob-ts",
"version": "0.0.7",
"version": "1.0.0",
"homepage": "https://github.com/PabloSzx/bob-esbuild",

@@ -68,5 +68,4 @@ "bugs": "https://github.com/PabloSzx/bob-esbuild/issues",

"scripts": {
"dev": "bob-esbuild watch",
"postpublishasd": "gh-release"
"dev": "bob-esbuild watch"
}
}
# bob-ts
Transpile your TypeScript applications quickly using **esbuild** + **rollup**.
Transpile your **TypeScript** projects quickly using **esbuild** + **rollup**, made to accelerate and simplify the TypeScript development with watcher and first class support for JavaScript testing frameworks.
> This library doesn't handle type definitions, but you can add them simply doing `tsc --declaration --emitDeclarationOnly`
## Install

@@ -23,5 +25,5 @@

If you have `"type": "module"` in your `package.json`, `ESM` will be outputted with the extension `.mjs` and `CJS` as `.js`.
If you **don't** have `"type": "module"` in your `package.json`, `ESM` will be outputted with the extension `.mjs` and `CJS` as `.js`
If you **don't** have `"type": "module"` in your `package.json`, `ESM` will be outputted with the extension `.js` and `CJS` as `.cjs`
If you **do** have `"type": "module"` in your `package.json`, `ESM` will be outputted with the extension `.js` and `CJS` as `.cjs`.

@@ -37,3 +39,3 @@ ### Build

-f, --format <format> Format, it can be 'cjs', 'esm' or 'interop' (default: "esm")
--cwd <dir> Custom target directory (default: "/home/pablosz/learner-model-gql/gateway")
--cwd <dir> Custom target directory (default: "__current_directory__")
--no-clean No clean output dir (default: true)

@@ -78,2 +80,14 @@ -h, --help display help for **command**

The primary reason that for the default input being `"."` is because this library has primary support for being used for JavaScript test frameworks like [Mocha](https://mochajs.org/) and [Node-Tap](https://node-tap.org/), and having all the tests files inside an specific test directory, for example, `test`, and simply executing the transpiled version of your tests with all the sourcemaps, being a better and faster alternative than `ts-node/register`, specially for **ESM support**, which `ts-node` struggles with.
> Example structure
```
src/
index.ts
test/
main.test.ts
package.json
```
## Mocha

@@ -86,7 +100,7 @@

```sh
yarn add -D mocha @istanbuljs/esm-loader-hook
yarn add -D mocha nyc @istanbuljs/esm-loader-hook
```
```sh
npm install -D mocha @istanbuljs/esm-loader-hook
npm install -D mocha nyc @istanbuljs/esm-loader-hook
```

@@ -101,4 +115,9 @@

"start": "bob-ts && node/dist/src/index.mjs",
"test": "bob-ts && nyc mocha --experimental-loader=@istanbuljs/esm-loader-hook --enable-source-maps dist/test",
"test:watch": "bob-ts-watch -c \"nyc mocha --experimental-loader=@istanbuljs/esm-loader-hook --enable-source-maps dist/test\""
"test": "bob-ts && nyc mocha dist/test",
"test:watch": "bob-ts-watch -c \"nyc mocha dist/test\""
},
"mocha": {
"enable-source-maps": true,
"no-warnings": true,
"experimental-loader": "@istanbuljs/esm-loader-hook"
}

@@ -116,3 +135,6 @@ }

"test": "bob-ts -f cjs && nyc mocha dist/test",
"test:watch": "bob-ts-watch -f cjs -c \"nyc moca dist/test\""
"test:watch": "bob-ts-watch -f cjs -c \"nyc mocha dist/test\""
},
"mocha": {
"enable-source-maps": true
}

@@ -166,1 +188,5 @@ }

```
## LICENSE
MIT

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc