New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

ts-creator

Package Overview
Dependencies
Maintainers
1
Versions
56
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ts-creator - npm Package Compare versions

Comparing version 1.1.10 to 1.2.0-402e3359

bin/ts-creator

4

dist/types/src/index.d.ts

@@ -1,6 +0,6 @@

/// <reference path="../../../types/prettier.d.ts" />
import * as prettier from 'prettier/standalone';
export interface Options {
prettierOptions?: Options;
prettierOptions?: prettier.Options;
}
export default function create(code: string, options?: Options): string;
export { transformNode, transformSourceFile } from './transformer';
{
"name": "ts-creator",
"version": "1.1.10",
"version": "1.2.0-402e3359",
"description": "A code generator to generate TypeScript code generator from TypeScript code",
"main": "dist/index.js",
"types": "dist/types/index.d.ts",
"types": "dist/types/src/index.d.ts",
"scripts": {
"build": "cross-env NODE_ENV=production webpack --config webpack.config.js",
"dev": "webpack --config webpack.config.js",
"test": "webpack --config webpack.test.config.js && node ./dist/tests/index.js",
"build": "cross-env NODE_OPTIONS=--max_old_space_size=4096 NODE_ENV=production webpack --config webpack.config.js",
"dev": "cross-env NODE_OPTIONS=--max_old_space_size=4096 webpack --config webpack.config.js -w",
"test": "cross-env NODE_OPTIONS=--max_old_space_size=4096 webpack --config webpack.test.config.js && node ./dist/tests/index.js",
"lint": "prettier --config ./prettier.json --list-different ./src/**/* ./tests/**/*",

@@ -17,8 +17,15 @@ "prettier": "prettier --config ./prettier.json --write ./src/**/* ./tests/**/*"

"dependencies": {
"prettier": "^1.15.3",
"typescript": "^3.2.2"
"cardinal": "^2.1.1",
"get-stdin": "^6.0.0",
"prettier": "^1.16.0",
"typescript": "^3.2.2",
"yargs": "^12.0.5"
},
"bin": {
"ts-creator": "bin/ts-creator"
},
"files": [
"src",
"dist",
"bin",
"LICENSE",

@@ -30,4 +37,6 @@ "tsconfig.json",

"devDependencies": {
"@types/get-stdin": "^5.0.1",
"@types/node": "^10.12.18",
"@types/prettier": "^1.15.2",
"@types/yargs": "^12.0.6",
"cross-env": "^5.2.0",

@@ -39,2 +48,2 @@ "ts-loader": "^5.3.3",

}
}
}

@@ -1,15 +0,29 @@

# ts-creator
<div align="center">
<img width="520" src="./media/Logo.svg">
# ts-creator
A code generator to generate TypeScript code generator from TypeScript code
A code generator to generate TypeScript code generator from TypeScript code
[![Build Status](https://travis-ci.com/HearTao/ts-creator.svg?branch=master)](https://travis-ci.com/HearTao/ts-creator) [![NPM version](https://img.shields.io/npm/v/ts-creator.svg)](https://www.npmjs.com/package/ts-creator)
[![Build Status](https://travis-ci.com/HearTao/ts-creator.svg?branch=master)](https://travis-ci.com/HearTao/ts-creator) [![NPM version](https://img.shields.io/npm/v/ts-creator.svg)](https://www.npmjs.com/package/ts-creator)
👉 [Try It!](https://ts-creator.js.org/) 👈
</div>
[Try It!](https://ts-creator.js.org/)
## How to use it:
```
```shell
npm install ts-creator
```
### 0. generate from file
```shell
ts-creator ./a.ts -o ./output.ts
```
### 1. generate from code

@@ -16,0 +30,0 @@

@@ -1,18 +0,14 @@

///<reference path="../types/prettier.d.ts"/>
import { transformSourceFile } from './transformer'
import { isDef } from './utils'
import { Options as PrettierOptions, format } from 'prettier'
import { createPrinter, createSourceFile, ScriptTarget } from 'typescript'
// if standalone, that is external module, otherwise undefined
import tsPlugin from 'prettier-typescript-plugins'
import * as prettier from 'prettier/standalone'
import tsPlugin from 'prettier/parser-typescript'
export interface Options {
prettierOptions?: Options
prettierOptions?: prettier.Options
}
const defaultPrettierOptions: PrettierOptions = {
const defaultPrettierOptions: prettier.Options = {
parser: 'typescript',
plugins: [tsPlugin].filter(isDef),
plugins: [tsPlugin],
semi: false,

@@ -38,5 +34,5 @@ singleQuote: true,

}
return format(factoryCode, prettierOptions)
return prettier.format(factoryCode, prettierOptions)
}
export { transformNode, transformSourceFile } from './transformer'

@@ -8,2 +8,3 @@ {

"target": "es5",
"lib": ["es2015"],
"declaration": true,

@@ -10,0 +11,0 @@ "outDir": "./dist",

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

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