typescript-algorithms

  • Q5_417943
    了解作者
  • 12KB
    文件大小
  • zip
    文件格式
  • 0
    收藏次数
  • VIP专享
    资源类型
  • 0
    下载次数
  • 2022-06-14 23:36
    上传日期
TSDX用户指南 恭喜! 通过使用TSDX引导此项目,您只是节省了工作时间。 让我们让您了解这里的内容以及如何使用它。 此TSDX设置用于开发可发布到NPM的库(不是应用程序!)。 如果要构建Node应用程序,则可以使用ts-node-dev ,plain ts-node或简单的tsc 。 如果您是TypeScript的新手,请查看 指令 TSDX在/src内搭建新库。 要运行TSDX,请使用: npm start # or yarn start 这将构建为/dist并以监视模式运行项目,因此您保存在src所有编辑都会导致重建为/dist 。 要进行一次性构建,请使用npm run build或yarn build 。 要运行测试,请使用npm test或yarn test 。 配置 使用prettier , prettier husky和lint-staged为您设置代码质
typescript-algorithms-main.zip
内容介绍
# TSDX User Guide Congrats! You just saved yourself hours of work by bootstrapping this project with TSDX. Let’s get you oriented with what’s here and how to use it. > This TSDX setup is meant for developing libraries (not apps!) that can be published to NPM. If you’re looking to build a Node app, you could use `ts-node-dev`, plain `ts-node`, or simple `tsc`. > If you’re new to TypeScript, checkout [this handy cheatsheet](https://devhints.io/typescript) ## Commands TSDX scaffolds your new library inside `/src`. To run TSDX, use: ```bash npm start # or yarn start ``` This builds to `/dist` and runs the project in watch mode so any edits you save inside `src` causes a rebuild to `/dist`. To do a one-off build, use `npm run build` or `yarn build`. To run tests, use `npm test` or `yarn test`. ## Configuration Code quality is set up for you with `prettier`, `husky`, and `lint-staged`. Adjust the respective fields in `package.json` accordingly. ### Jest Jest tests are set up to run with `npm test` or `yarn test`. ### Bundle Analysis [`size-limit`](https://github.com/ai/size-limit) is set up to calculate the real cost of your library with `npm run size` and visualize the bundle with `npm run analyze`. #### Setup Files This is the folder structure we set up for you: ```txt /src index.tsx # EDIT THIS /test blah.test.tsx # EDIT THIS .gitignore package.json README.md # EDIT THIS tsconfig.json ``` ### Rollup TSDX uses [Rollup](https://rollupjs.org) as a bundler and generates multiple rollup configs for various module formats and build settings. See [Optimizations](#optimizations) for details. ### TypeScript `tsconfig.json` is set up to interpret `dom` and `esnext` types, as well as `react` for `jsx`. Adjust according to your needs. ## Continuous Integration ### GitHub Actions Two actions are added by default: - `main` which installs deps w/ cache, lints, tests, and builds on all pushes against a Node and OS matrix - `size` which comments cost comparison of your library on every pull request using [`size-limit`](https://github.com/ai/size-limit) ## Optimizations Please see the main `tsdx` [optimizations docs](https://github.com/palmerhq/tsdx#optimizations). In particular, know that you can take advantage of development-only optimizations: ```js // ./types/index.d.ts declare var __DEV__: boolean; // inside your code... if (__DEV__) { console.log('foo'); } ``` You can also choose to install and use [invariant](https://github.com/palmerhq/tsdx#invariant) and [warning](https://github.com/palmerhq/tsdx#warning) functions. ## Module Formats CJS, ESModules, and UMD module formats are supported. The appropriate paths are configured in `package.json` and `dist/index.js` accordingly. Please report if any issues are found. ## Named Exports Per Palmer Group guidelines, [always use named exports.](https://github.com/palmerhq/typescript#exports) Code split inside your React app instead of your React library. ## Including Styles There are many ways to ship styles, including with CSS-in-JS. TSDX has no opinion on this, configure how you like. For vanilla CSS, you can include it at the root directory and add it to the `files` section in your `package.json`, so that it can be imported separately by your users and run through their bundler's loader. ## Publishing to NPM We recommend using [np](https://github.com/sindresorhus/np).
评论
    相关推荐
    • vue3-element-plus-typescript:基于vue-cli vite + vue3.0 + element-p
      vue3-element-plus-typescript 基于vue-cli / vite + vue3.0 + element-plus +打字稿+ mock数据的后台管理系统列表页增删改查功能 vue-cli版: : vite版: : ... yarn install 编译和热重装以进行开发
    • Notes-App-Typescript
      notes-app-typescript 项目设置 yarn install 编译和热重装以进行开发 yarn serve 编译并最小化生产 yarn build 整理和修复文件 yarn lint 自定义配置 请参阅。
    • typescout:TypeScript类型搜索器
      TypeScout TypeScript类型搜索器 发展 yarn yarn dev 建造 yarn build 服务生产 yarn start 执照 麻省理工学院
    • ts-measurement:TypeScript不透明测量
      yarn add ts-measurement typescript@^4.0.0 不透明类型 目前,只有时间单位可用: Milliseconds Seconds Minutes Hours Days Weeks Months Years Decades Centuries Millenniums 不允许分配不同类型的...
    • nuxt-composition-api-typescript
      nuxt-compostion-api-typescript 构建设置 # install dependencies $ yarn install # serve with hot reload at localhost:3000 $ yarn dev # build for production and launch server $ yarn build $ yarn start # ...
    • TypeScript
      yarn global add typescript nodemon jest ts - jest esbuild npx concurrently 如何安装deps: npm install // or yarn 样板结构: // src/* - developers files // build/* - production files // src/c
    • react-typescript-recipe
      可用脚本 yarn start 该脚本将安装所有软件包并以开发模式启动应用程序。 打开在浏览器中查看它。
    • react-typescript-yarn-lerna-monorepo-eslint-prettier-boilerplate
      Typescript的起点,React(v16.8.0 +,已测试到v16.13.1 ),Yarn&Lerna monorepo项目,并为ESLint和Prettier进行了完整设置。 叠放 该项目使用初始化,包括: 打字稿 React(v16.8.0 +,已测试至v16.13.1 ) ...
    • node-typescript-template:使用TypeScriptyarn的节点项目的模板
      节点打字稿模板 使用TypeScriptyarn的节点项目的模板
    • GaussDB_100_1.0.1-DATABASE-REDHAT-64bit.tar.gz
      guassdb100在redhat上安装包,单机部署的包,安装步骤请看我的文中介绍,经过大量实验搭建总结出来的文档