Skip to content
This repository has been archived by the owner on Feb 17, 2022. It is now read-only.

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
kytta committed Jan 17, 2020
2 parents a4b00c6 + 4775904 commit 2fc9438
Show file tree
Hide file tree
Showing 8 changed files with 802 additions and 630 deletions.
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
lts/dubnium
47 changes: 5 additions & 42 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,47 +1,10 @@
language: node_js
node_js:
- stable
- lts/dubnium
- lts/erbium
- node
cache: npm

install: npm install

stages:
- test
- name: deploy
if: tag IS present

before_script:
- npm run build

jobs:
include:
- stage: test
name: "Test"
script:
- npm run test && npm i -g codecov && codecov

- stage: deploy
name: Deploy to GitHub Releases
script: skip
deploy:
provider: releases
api_key:
secure: PmUkI/oJ8HDDGlxMbTzmDC6BVHuv0ITBmSQkcO61ksjNgUpbaCx3b0K8S8v/CF1R0Lq34AavREdwrWvVIbWHLVqNlCU+7pFhc2Qv3pfErLFGW4z1aLQsmEWSm1nhHOdYa7G0Tna0F90lU8YZlilNH52yK0PXeAQyx3d0yWMIHq2HPasPh7NwEacGYbkyD8hdQfjl4UsKXZXIczyy0m0Li7+1mixadUeSGmz39p6idBwoLP3hgCX5V7kJD6b37zcuKINRVLMKMalUtKHSysyJ8WgGphTMSHvnSFXYJxDb6RDFTHiDzjHApMy2j9ykQbkdaeqmtjO2KQ950m84dAPcKvJzZpYSKl6NWKaR/YPKkCdjiiY9hO+079dNSu6fMKUCrtvHTJQz9oaMvuVYjQXTlJuQenfwtHS4dKceZOUyLC4Jywus4NooCagyxp4A6R0QI3OAbXAGAC0UEn0VtXkxgzszstdsYoJsNibxMBXV//RKszTyjBLNE8g0dnTibqIJMtviTcBf5PfppYvhUh+ax4v5Io2ADRjBrDZi0XDk9XaBliK2VPl3eoQ1Qp+Y0W3bsR8WRygle4h+fxHPOpJH2jOylnGCua4eTTBpDi6VslFwlgdNtanNSUn/qIPeAQCSvvj1ZjhbFgo6C95LB9pDXCTfE40Jc95WtXsVqIrv/rM=
file:
- ./dist/pretty-money.umd.js
- ./dist/pretty-money.esm.js
skip_cleanup: true
draft: true
on:
tags: true
- stage: deploy
name: Deploy to NPM
script: skip
deploy:
provider: npm
email: [email protected]
api_key:
secure: DXa8qj0RO+ft6oWsnAQBkj1KpOjuqkrGKpKUyxo0emzYHhJhZYmHvwbf92xwJyDkheF/d/HkyQUrR01OJkOCmispBRrPh32/zIoqAsOZoUmTsZAqQVqYavYhZYdjrnHWjOL5SsAjiTpiioGTMgkCYSiomuncG9bJJ5BXB/RpKj31zZNKZnBhZlev854PS7sFk8vf7/vABpERaEsSXH/ZbrSw9hj/K4FiGidZYFFm2TZopO+SYHztDmDVRxBXXgNrVOaxINGztF31PPauBTnE9ovlCPDSw0pRnB6P5jGL2FF3+v4NRAMsogh1vWjhP1eY+ilypeFUlRDsVBv/7VkQyn6G/F7HJPikfSRpHuOXSdYtitF78azsTZiRCTyGRQ2viUZv+mGmJOPYkrIeWTWw/FnW3T5L3N8MQjfo+Y0Td1S3mNR8NXy+DNwmcAV07ZPaeY5SIkhDE6P1J85KQxCLeoLH06AgC9OfYubMRILZuNx681W4X6d5Bbkfvo0hPjJJJ5SVYoUcAaqHUE7SFq+sil+rXM/TDigX37KF4ZhjFi1YHixpA92d3jrv3GA+IJJGMOesBu25ypoUvxPfo8zMaWzv6V9jQP4yPu0lfUmEXLPkoFPo7nSONXwND4o803lySKEEYPPrGEe8prfX8OuJBDhYwWp7TjYHPwe4wimw/HE=
skip_cleanup: true
on:
tags: true
script: npm run test
after_script: npm install -g codecov && codecov
21 changes: 10 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# pretty-money

<img src="https://raw.githubusercontent.com/googlefonts/noto-emoji/master/png/128/emoji_u1f4b8.png"
align="right"
alt="Money With Wings emoji"
width="96"
height="96">

A tiny currency formatting library for JavaScript.

- **Small.** Dependency-free. 468 bytes minified and gzipped. Controlled by
Expand All @@ -13,7 +19,7 @@ let price = prettyMoney({ currency: "EUR" }, 10000); //=> "10000 EUR"
```

Works in any ES3-compatible environment, be that Node.js or a browser.
[**See it for yourself**](https://os.karamoff.ru/pretty-money#demo)
[**Try it yourself**](https://os.karamoff.dev/pretty-money#demo)!

## Install

Expand Down Expand Up @@ -176,18 +182,11 @@ around with the developer build, here's all you need to know:
- `npm run build` to build the production-ready minified version of the library
and output it to `./dist/pretty-money.umd.js` and
`./dist/pretty-money.esm.js`
- `npm run checks` to run all tests
- `npm run test` to build the project and run all tests, which include:
- `npm run test:lint` to check the code formatting with ESLint (this won't
auto fix errors)
- `npm run test:unit` to run the Jest unit tests
- `npm run test:size` to check the size
- `npm run test` to first build and run all tests. Helpful if you tend to forget
the first step

There are no peer dependencies and other extra requirements. There are no commit
message rules. Any help is welcome if it keeps things simple and small.

----

Created by [Nikita Karamov](https://karamoff.ru) and distributed under the MIT
License.
There are no peer dependencies and other extra requirements. Any help is welcome
when it keeps things simple and small.
18 changes: 12 additions & 6 deletions config/build/plugins.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
import rpStrip from 'rollup-plugin-strip';
import rpStrip from '@rollup/plugin-strip';
import { terser as rpTerser } from 'rollup-plugin-terser';
import rpTypescript2 from 'rollup-plugin-typescript2';
import rpTypescript from '@rollup/plugin-typescript';

export const strip = () => rpStrip({
debugger: true,
functions: ['console.log', 'console.debug'],
sourceMap: false
functions: ['console.log', 'console.debug']
});

export const terser = () => rpTerser();
export const terser = () => rpTerser({
sourcemap: false,
ie8: true,
output: {
comments: false,
ecma: 3
}
});

export const typescript = () => rpTypescript2();
export const typescript = () => rpTypescript();
2 changes: 1 addition & 1 deletion config/build/rollup.config.prod.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export default {
],
plugins: [
typescript(),
strip(),
terser(),
strip()
]
}
2 changes: 1 addition & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ <h2>
</main>

<footer>
<p>by <a href="https://karamoff.ru" target="_blank">Nikita Karamov</a></p>
<p>by <a href="https://karamoff.dev" target="_blank">Nikita Karamov</a></p>
<p>Website built with <a href="https://igoradamenko.github.io/awsm.css/index.html" target="_blank">awsm.css</a></p>
</footer>
</body>
Expand Down
Loading

0 comments on commit 2fc9438

Please sign in to comment.