Universal TypeScript starter kit for Angular 2 and React
Fast, reliable TypeScript development stack for building Angular 2.0 and React applications based on webpack using TypeScript 1.9x together with Babel (async/await and generators in ES5).
- Uses TypeScript 2.0 Pre
- Statically typed build system for working with Typescript
- Maintain a consistent code style with TSLint
- Production and development builds.
- Intelligent code editing with VSCode
- Mock modules for testing purposes with Rewire
- Run test doubles with Sinon.JS
- Sample unit tests with Mocha and Karma including code coverage via istanbul.
- Following the best practices.
- Manager of your type definitions using typings.
- ES7 to ES5 transpilation with Babel
- Test Driven Development (TDD)
- Async and await
- Code coverage report with Istanbul Instrumenter Loader
- Sourcemap
- Let you play with
CSS
,LESS
,SASS
,HTML
, andJSON
- Mocha & chai de facto standard
The only development dependency of this project is Node.js. So just make sure you have it installed. Then type few commands known to every Node developer...
git clone --depth 1 https://github.com/trixler/trixly.git
cd trixly
# install the project's dependencies
npm install
# dev build
npm run build:dev
# prod build
npm run build:prod
... and boom! You have it all setup for you!
npm run build
- build bundle both for development and productionnpm run build:dev
- builds bundle for developmentnpm run build:prod
- builds bundle for productionnpm run test
- runs all tests using Karma & Mochanpm run test:phantom
- runs the unit tests for browser with PhantomJSnpm run test:chrome
- runs the unit tests for browser with Chromenpm run test:node
- runs the unit tests in thenode.js
environmentnpm run clean
- remove the coverage report - and the dist foldernpm run clean:dist
- remove the dist foldernpm run prebuild:dev
- clear the dist folder and generate a non-minified scriptnpm run watch
- run all unit tests, and watch files for changesnpm run watch:node
- run all unit tests in thenode.js
environemnt, and watch files for changesnpm run watch:browser
- run all unit tests for browser and watch files for changesnpm run watch:chrome
- run all unit tests for browser with Chrome and watch files for changesnpm run lint
- validates all TypeScript files using tslintnpm run lint:src
- validates the source filesnpm run lint:tests
- validates the unit testsnpm run browser
- runs browser unit tests in the browser.npm run dependencies:check
- shows a list over dependencies with a higher version number then the current one - if anynpm run dependencies:upgrade
- automatically upgrade all devDependencies & dependencies, and update package.json
.
├── script # Babel configuration for React.
├── vscode # VSCode configuration.
├── dist # Built, ready to serve app.
├── config # Root folder for configurations.
│ ├── test # Test configurations.
│ ├── types # Global type definitions, written by us.
│ ├── webpack # Webpack configurations.
│ ├── circle-ci # Circle CI configuration.
│ ├── gl-ci # GitLab CI configuration.
│ ├── banner.js # Banner configuration for development builds
│ ├── karma.conf.js # Karma configuration.
│ ├── root.js # Util file for finding the root.
│ └── runner.hml # Mocha browser HTML configuration.
├── node_modules # Node Packages.
├── src # Source code.
│ └── trixly.ts # Entry point.
├── typings # Type definitions installed with typings.
├── .gitignore # Tells git which files to ignore.
├── package.json # Package configuration.
├── CLA.md # Contributor License Agreement.
├── LICENSE.md # License.
├── README.md # Readme.
├── tsconfig.json # TypeScript transpiler configuration.
├── tslint.json # TSLint configuration.
└── typings.json # Typings package configuration.
The browser spec runner - ./config/runner.html
- can be opened in a browser to run your tests. For it to work, you must first run npm run browser
, and then
open port 8080
. This will set up a watch task that will automatically refresh the tests when your scripts, or the tests, change.
The MIT License (MIT)
Copyright (c) 2016 KFlash
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.