GithubHelp home page GithubHelp logo

isabella232 / unitydeveloperhubunifiedtestrunnerplugin Goto Github PK

View Code? Open in Web Editor NEW
0.0 0.0 0.0 120 KB

Unified Test Runner plugin for Unity Developer Hub project

JavaScript 22.07% HTML 0.68% CSS 4.38% TypeScript 72.87%

unitydeveloperhubunifiedtestrunnerplugin's Introduction

Unity Developer Hub - Plugin Starter kit

UDH - Plugin starter kit is an opinionated boilerplate for web/app development build on top of React, containing modern web development tools such as Webpack, Typescript and SASS, helping you get get started quickly with modern web technologies.

!NB - This starter kit is in a very early stage, and the webpack configuration will change heavily, but it works very well for development of plugins.

Getting Started

Requirements

  • Mac OS X, Windows, or Linux
  • Yarn package + Node.js v7.8 or newer
  • Text editor or IDE pre-configured with Typescript/SCSS/React/JSX/ESlint (webstorm/Visual code is pre-configured)

Directrory layout

.
├── /dist/                                              # The folder for compiled output
├── /tests/                                             # The folder for test related files
│   └── /__mocks__/                                     # The folder for test mock files
│       ├── fileMock.js                                 # Mock file for files
│       └── styleMock.js                                # Mock file for SCSS file
├── /node_modules/                                      # 3rd-party libraries and utilities
├── /src/                                               # The source code of the application
│   ├── /app/                                           # Folder of app content
│       ├── /components/                                # React components
│           └── /component/                             # A React component
│               ├── /__tests__/                         # Folder for test for specific React component
│                   └── component.component.spec.tsx    # A React component test written in Jest
│               ├── component.component.scss            # A React component style
│               └── component.component.tsx             # A React component
│       ├── app.component.scss                          # React root component style
│       ├── app.component.tsx                           # React root component
│   ├── /assets/                                        # Folder for static assets and global styling and sass mixins + function etc..
│   ├── /typings/                                       # Folder for custom [type declerations](https://www.typescriptlang.org/docs/handbook/declaration-files/introduction.html)
│   └── /index.html                                     # Index.html are copied into the /dist folder on build
├── tsconfig.json                                       # Typescript configuration file
├── package.json                                        # The list of 3rd party libraries and utilities
├── webpack.dev.js                                      # Webpack configuration file for development
├── webpack.prod.js                                     # Webpack configuration file for production build
└── yarn.lock                                           # Fixed versions of all the dependencies

Note: The current version if the Plugin Starter Kit does not contain a FLUX library like redux or NGRXStore. You can implement any of your choice but we recommend Redux.

Quick Start

You can start by cloning the latest Plugin Starter Kit (PSK) to your local machine by running:

$ git clone [email protected]:Unity-Technologies/UnityDeveloperHubPluginStarterKit.git MyApp
$ cd MyApp

1. Run yarn install

This will install both run-time project dependencies and developer tools listed in package.json file.

2.1 Development (Web app)

To start a local development environment run:

$ yarn start

This command will build the app from the source files (/src) into the output /dist folder. As soon as the initial build completes, it will start a local development server with HMR on top of it.

http://localhost:8080/ — Webpack-dev-server with HMR, React Hot Transform

Now you can open your web app in a browser, on mobile devices and start hacking. Whenever you modify any of the source files inside the /src folder, the module bundler (Webpack) will recompile the app on the fly and refresh all the connected browsers.

2.2 Development (electron renderer app)

To start a local development environment for electron run:

$ yarn run start:electron

or

$ npm run start:electron

To run it in the Unity Dev Helper, run yarn run start:electron and open the plugin Development View from the Unity Dev Helper menu.

How to run tests

For testing we are using Jest and enzyme. To run all tests, run:

$ yarn run test

How to Build (Web app)

If you need just to build the app (without running a dev server), simply run:

$ yarn run build

How to Build (Electron renderer app)

If you need just to build the app (without running a dev server) and be ready for the Unity Developer Hub, simply run:

$ yarn run build:electron

Deploy to Unity Developer Helper

Unity Developer helper is not yet ready for deployment, but you can contact @emilmoeller in our unity slack channel if you have any questions.

unitydeveloperhubunifiedtestrunnerplugin's People

Contributors

mindwrapper avatar oleksiy-yakovenko avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.