https://github.com/openforge/juntoscope-deprecated
https://github.com/openforge/juntoscope-deprecated
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/openforge/juntoscope-deprecated
- Owner: openforge
- License: mit
- Created: 2018-03-23T13:22:25.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-03-23T15:06:14.000Z (about 8 years ago)
- Last Synced: 2025-01-19T22:25:38.077Z (about 1 year ago)
- Language: TypeScript
- Size: 149 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
# juntoscope
A project build with Stencil.js!
## Getting Started
Clone this repository:
```bash
git clone https://github.com/openforge/juntoscope.git
cd juntoscope
```
Be sure you are using version 8 of node
If you have node version manager installed, run this command:
```
nvm use 8
```
and run:
```bash
npm install
npm start
```
To view the build, start an HTTP server inside of the `/www` directory.
To watch for file changes during development, run:
```bash
npm run dev
```
To build the app for production, run:
```bash
npm run build
```
To run the unit tests once, run:
```
npm test
```
To run the unit tests and watch for file changes during development, run:
```
npm run test.watch
```
## Development
### File Structure
**UI** components should reside in the `src/components` folder.
While **Page** components should reside in the `src/pages` folder. A page component is responsible for the grouping and layout of various different components into a page. Also responsible for any logic around the communication between the different components, the rest of the application (i.e. routing), and with the external world.
### Tools
#### Linting & Code Formatting:
[](https://github.com/prettier/prettier)
This project uses:
- [prettier](http://prettier.io/) for code formatting.
- [tslint](https://palantir.github.io/tslint/) for linting with rules from:
- [tslint-react](https://github.com/palantir/tslint-react)
- [tslint-config-airbnb](https://github.com/progre/tslint-config-airbnb)
- [tslint-config-prettier](https://github.com/alexjoverm/tslint-config-prettier)
`package.json` defines an npm script for linting. To lint the project at any time, simply run the script with
```
$ npm run lint
```
#### Versioning & Changelog
We utilize [Conventional Changelog](https://github.com/conventional-changelog/conventional-changelog) to generate a changelog from git metadata.
The following tools are used to achieve this purpose:
- [commitizen](https://github.com/commitizen/cz-cli)
- [cz-conventional-changelog](https://www.npmjs.com/package/cz-conventional-changelog)
- [conventional-changelog-cli](https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-cli)
With the current configuration, after a developer stages their changes for a commit. They can use the following npm script to walk them through committing their changes.
```
npm run cz
```
Read more about the commit guidelines [here](http://conventionalcommits.org/)
After all changes have been committed, a release and a changelog can be triggered by using the npm [version](https://docs.npmjs.com/cli/version) command. And the current configuration takes care of generating the changelog file based on git metadata.
#### Automation & Hooks
The project uses [husky](https://github.com/typicode/husky) for git hook integations. And uses [lint-staged](https://github.com/okonet/lint-staged) to run automatically run linters on staged files. And [commitlint](https://github.com/marionebl/commitlint) to ensure commits messages follow the conventions.
For every commit, it will ensure files are linted and that the code is formatted to `prettier`'s configuration. It will also confirm that the proposed commit message matches the defined guidelines. If any error occurs in the process, it will **stop and prevent** the commit until the issues are fixed.
If a developer went through providing all the information during a `npm run cz` only to find that there were issues with their commit. They may fix them and instruct commitizen to try the commit again with `npm run cz -- --retry`