trixly
v0.1.9
Published
Universal TypeScript 2.0 Pre starter kit for Angular 2 and React
Downloads
9
Maintainers
Readme
Trixly
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).
Features
- [x] Uses TypeScript 2.0 Pre
- [x] Statically typed build system for working with Typescript
- [x] Maintain a consistent code style with TSLint
- [x] Production and development builds.
- [x] Intelligent code editing with VSCode
- [x] Mock modules for testing purposes with Rewire
- [x] Run test doubles with Sinon.JS
- [x] Sample unit tests with Mocha and Karma including code coverage via istanbul.
- [x] Following the best practices.
- [x] Manager of your type definitions using typings.
- [x] ES7 to ES5 transpilation with Babel
- [x] Test Driven Development (TDD)
- [x] Async and await
- [x] Code coverage report with Istanbul Instrumenter Loader
- [x] Sourcemap
- [x] Let you play with
CSS
,LESS
,SASS
,HTML
, andJSON
- [x] Mocha & chai de facto standard
Quick start
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!
Workflow
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
Folder structure
.
├── 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.
Browser tests
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.
License
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.