diff options
Diffstat (limited to 'packages')
-rw-r--r-- | packages/instant/CHANGELOG.json | 1 | ||||
-rw-r--r-- | packages/instant/CHANGELOG.md | 1 | ||||
-rw-r--r-- | packages/instant/README.md | 79 | ||||
-rw-r--r-- | packages/instant/package.json | 70 | ||||
-rw-r--r-- | packages/instant/src/components/zero_ex_instant.tsx | 5 | ||||
-rw-r--r-- | packages/instant/src/globals.d.ts | 6 | ||||
-rw-r--r-- | packages/instant/src/index.ts | 1 | ||||
-rw-r--r-- | packages/instant/tsconfig.json | 16 | ||||
-rw-r--r-- | packages/instant/tslint.json | 3 | ||||
-rw-r--r-- | packages/instant/typedoc-tsconfig.json | 7 | ||||
-rw-r--r-- | packages/instant/webpack.config.js | 20 |
11 files changed, 209 insertions, 0 deletions
diff --git a/packages/instant/CHANGELOG.json b/packages/instant/CHANGELOG.json new file mode 100644 index 000000000..fe51488c7 --- /dev/null +++ b/packages/instant/CHANGELOG.json @@ -0,0 +1 @@ +[] diff --git a/packages/instant/CHANGELOG.md b/packages/instant/CHANGELOG.md new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/packages/instant/CHANGELOG.md @@ -0,0 +1 @@ + diff --git a/packages/instant/README.md b/packages/instant/README.md new file mode 100644 index 000000000..ec114bd93 --- /dev/null +++ b/packages/instant/README.md @@ -0,0 +1,79 @@ +## @0xproject/instant + +## Installation + +```bash +yarn add @0xproject/instant +``` + +**Import** + +```typescript +import { ZeroExInstant } from '@0xproject/instant'; +``` + +or + +```javascript +var ZeroExInstant = require('@0xproject/instant').ZeroExInstant; +``` + +If your project is in [TypeScript](https://www.typescriptlang.org/), add the following to your `tsconfig.json`: + +```json +"compilerOptions": { + "typeRoots": ["node_modules/@0xproject/typescript-typings/types", "node_modules/@types"], +} +``` + +## Contributing + +We welcome improvements and fixes from the wider community! To report bugs within this package, please create an issue in this repository. + +Please read our [contribution guidelines](../../CONTRIBUTING.md) before getting started. + +### Install dependencies + +If you don't have yarn workspaces enabled (Yarn < v1.0) - enable them: + +```bash +yarn config set workspaces-experimental true +``` + +Then install dependencies + +```bash +yarn install +``` + +### Build + +To build this package and all other monorepo packages that it depends on, run the following from the monorepo root directory: + +```bash +PKG=@0xproject/instant yarn build +``` + +Or continuously rebuild on change: + +```bash +PKG=@0xproject/instant yarn watch +``` + +### Clean + +```bash +yarn clean +``` + +### Lint + +```bash +yarn lint +``` + +### Run Tests + +```bash +yarn test +``` diff --git a/packages/instant/package.json b/packages/instant/package.json new file mode 100644 index 000000000..e1131b7e6 --- /dev/null +++ b/packages/instant/package.json @@ -0,0 +1,70 @@ +{ + "name": "@0xproject/instant", + "version": "0.0.1", + "engines": { + "node": ">=6.12" + }, + "description": "0x Instant React Component", + "main": "lib/src/index.js", + "types": "lib/src/index.d.ts", + "scripts": { + "watch_without_deps": "tsc -w", + "lint": "tslint --project .", + "test": "yarn run_mocha", + "rebuild_and_test": "run-s clean build test", + "test:coverage": "nyc npm run test --all && yarn coverage:report:lcov", + "coverage:report:lcov": "nyc report --reporter=text-lcov > coverage/lcov.info", + "test:circleci": "yarn test:coverage", + "run_mocha": "mocha --require source-map-support/register --require make-promises-safe lib/test/**/*_test.js --exit", + "clean": "shx rm -rf lib test_temp scripts", + "build": "webpack --mode production && copyfiles -u 3 './lib/src/monorepo_scripts/**/*' ./scripts", + "manual:postpublish": "yarn build; node ./scripts/postpublish.js" + }, + "config": { + "postpublish": { + "assets": [] + } + }, + "repository": { + "type": "git", + "url": "https://github.com/0xProject/0x-monorepo.git" + }, + "author": "Francesco Agosti", + "license": "Apache-2.0", + "bugs": { + "url": "https://github.com/0xProject/0x-monorepo/issues" + }, + "homepage": "https://github.com/0xProject/0x-monorepo/packages/instant/README.md", + "dependencies": { + "@0xproject/connect": "^2.0.4", + "@0xproject/types": "^1.1.1", + "@0xproject/typescript-typings": "^2.0.2", + "@0xproject/utils": "^1.0.11", + "@0xproject/web3-wrapper": "^3.0.1", + "ethereum-types": "^1.0.8", + "lodash": "^4.17.10", + "react": "^16.5.2", + "react-dom": "^16.5.2" + }, + "devDependencies": { + "@0xproject/tslint-config": "^1.0.7", + "@types/lodash": "^4.14.116", + "@types/node": "*", + "@types/react": "16.4.7", + "@types/react-dom": "^16.0.8", + "awesome-typescript-loader": "^5.2.1", + "copyfiles": "^1.2.0", + "make-promises-safe": "^1.1.0", + "npm-run-all": "^4.1.2", + "nyc": "^11.0.1", + "shx": "^0.2.2", + "tslint": "5.11.0", + "typedoc": "0.12.0", + "typescript": "3.0.1", + "webpack": "^4.20.2", + "webpack-cli": "^3.1.1" + }, + "publishConfig": { + "access": "private" + } +} diff --git a/packages/instant/src/components/zero_ex_instant.tsx b/packages/instant/src/components/zero_ex_instant.tsx new file mode 100644 index 000000000..67e1b683d --- /dev/null +++ b/packages/instant/src/components/zero_ex_instant.tsx @@ -0,0 +1,5 @@ +import * as React from 'react'; + +export interface ZeroExInstantProps {} + +export const ZeroExInstant: React.StatelessComponent<ZeroExInstantProps> = () => <div>ZeroExInstant</div>; diff --git a/packages/instant/src/globals.d.ts b/packages/instant/src/globals.d.ts new file mode 100644 index 000000000..94e63a32d --- /dev/null +++ b/packages/instant/src/globals.d.ts @@ -0,0 +1,6 @@ +declare module '*.json' { + const json: any; + /* tslint:disable */ + export default json; + /* tslint:enable */ +} diff --git a/packages/instant/src/index.ts b/packages/instant/src/index.ts new file mode 100644 index 000000000..345246d09 --- /dev/null +++ b/packages/instant/src/index.ts @@ -0,0 +1 @@ +export { ZeroExInstant } from './components/zero_ex_instant'; diff --git a/packages/instant/tsconfig.json b/packages/instant/tsconfig.json new file mode 100644 index 000000000..69d2520fa --- /dev/null +++ b/packages/instant/tsconfig.json @@ -0,0 +1,16 @@ +{ + "extends": "../../tsconfig", + "compilerOptions": { + "outDir": "lib", + "rootDir": ".", + "jsx": "react", + "allowSyntheticDefaultImports": true, + "noImplicitAny": true, + "module": "ESNext", + "moduleResolution": "node", + "lib": ["es2015"], + "target": "es5", + "sourceMap": true + }, + "include": ["./src/**/*", "./test/**/*"] +} diff --git a/packages/instant/tslint.json b/packages/instant/tslint.json new file mode 100644 index 000000000..ffaefe83a --- /dev/null +++ b/packages/instant/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": ["@0xproject/tslint-config"] +} diff --git a/packages/instant/typedoc-tsconfig.json b/packages/instant/typedoc-tsconfig.json new file mode 100644 index 000000000..c9b0af1ae --- /dev/null +++ b/packages/instant/typedoc-tsconfig.json @@ -0,0 +1,7 @@ +{ + "extends": "../../typedoc-tsconfig", + "compilerOptions": { + "outDir": "lib" + }, + "include": ["./src/**/*", "./test/**/*"] +} diff --git a/packages/instant/webpack.config.js b/packages/instant/webpack.config.js new file mode 100644 index 000000000..f7500c69c --- /dev/null +++ b/packages/instant/webpack.config.js @@ -0,0 +1,20 @@ +const path = require('path'); +module.exports = { + entry: './src/index.ts', + output: { + filename: '[name].bundle.js', + path: path.resolve(__dirname, 'lib'), + }, + devtool: 'source-map', + resolve: { + extensions: ['.js', '.json', '.ts', '.tsx'], + }, + module: { + rules: [ + { + test: /\.(ts|tsx)$/, + loader: 'awesome-typescript-loader', + }, + ], + }, +}; |