Skip to content

Commit

Permalink
Merge pull request #3 from City-of-Helsinki/release/0.1.0
Browse files Browse the repository at this point in the history
Release 0.1.0
  • Loading branch information
Jokinen authored May 6, 2020
2 parents ff6fc77 + 317cc62 commit 7e3fe9d
Show file tree
Hide file tree
Showing 25 changed files with 7,879 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"env": {
"node": true,
"jest": true
},
"extends": [
"airbnb-base",
"plugin:prettier/recommended"
],
"parserOptions": {
"ecmaVersion": 2017
},
"rules": {
"no-var": 0
}
}
37 changes: 37 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. '...'
2. '...'
3. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

**Smartphone (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]

**Additional context**
Add any other context about the problem here.
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: 'enhancement'
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
19 changes: 19 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
## Description

<!-- Describe your changes in detail -->
<!-- Add [Feature] or [BreakingChange] to the title -->

## Related Issue

<!-- If suggesting a new feature or change, please discuss it in an issue first -->
<!-- If fixing a bug, please link to the issue here: -->

Closes #

## Motivation and Context

<!-- Why is this change required? What problem does it solve? -->

## How Has This Been Tested?

## Screenshots (if appropriate):
24 changes: 24 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@

# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage

# production
/build

# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*
3 changes: 3 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Will cause an error when node version declared in package.json engines
# field is not satisfied.
engine-strict=true
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v12.16.3
14 changes: 14 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
sudo: false
language: node_js
node_js:
- '10'
cache:
directories:
- node_modules
install:
- npm i
jobs:
include:
- stage: 'Test'
name: 'Run code linting and test'
script: npm run lint && npm test
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Changelog
All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

## [Unreleased]

## [0.1.0] - 2020-04-06

### Added
- Add fetch-translations script
3 changes: 3 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Please make your pull requests short, elegant, and only handle one issue at a time! Observe our coding practices at https://github.com/City-of-Helsinki/bestpractice/.

Our contribution handling guidelines are at https://github.com/City-of-Helsinki/bestpractice/blob/master/accepting-contributions.md
52 changes: 52 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,54 @@
# helsinki-utils-js
Common code used by various City of Helsinki frontends. Please note that components should go to helsinki-design-system instead!

## Setup

### Prerequisites

- Node >= 10
- npm

### Installation

This package is currently available through GitHub:
```
npm install City-of-Helsinki/helsinki-utils-js#<version_tag>
```
_Please remember to target a version tag when installing_

## Commands

| Name | Description |
| :- | :- |
| `npm test` | Run tests |
| `npm test -- -watch` | Run tests in watch mode |

## For Developers of the Library

This repo was initially set up based on a quick discussion on Slack. The goal was to get a first usable version out with minimal effort. This is why we haven't published this package in `npm` (yet) or set up a more robust build for it.

As of now the repo is still in flux and unfortunately there have been no decisions on how its architecture should look like now or in the future. We kindly ask you to use your best judgement when fixing or adding to this library. Attempt to maintain a strong separation of concerns to make it easier to refactor the implementation once a direction is adopted.

## Packages

### Scripts

**fetch-translations**

Fetch translations from a Google sheets.
[Go to docs](./scripts/fetch-translations/README.md)

## Bin Scripts

These scripts are configured for use when this package is installed

**fetch-translations**
```bash
Usage: fetch-translation [options] <sheetId>

Options:
-d, --debug Output extra debugging
-l, --languages <items> Comma separated list of languages to extract
-o, --output <value>
-h, --help display help for command
```
5 changes: 5 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
var scripts = require("./scripts");

module.exports = {
scripts,
};
Loading

0 comments on commit 7e3fe9d

Please sign in to comment.