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

Commit

Permalink
feat: Initial port
Browse files Browse the repository at this point in the history
  • Loading branch information
aldeed committed Apr 24, 2018
0 parents commit 00f4c2c
Show file tree
Hide file tree
Showing 13 changed files with 10,834 additions and 0 deletions.
59 changes: 59 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@

version: 2
jobs:
build:
docker:
- image: node:8

dependencies:
pre:
- echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc

steps:
- checkout

- restore_cache:
keys:
- v1-dependencies-{{ checksum "package.json" }}
# fallback to using the latest cache if no exact match is found
- v1-dependencies-

- run: npm install
- run: npm run lint
- run: npm test

- save_cache:
paths:
- node_modules
key: v1-dependencies-{{ checksum "package.json" }}

deploy:
docker:
- image: node:8

steps:
- checkout

- restore_cache:
keys:
- v1-dependencies-{{ checksum "package.json" }}
# fallback to using the latest cache if no exact match is found
- v1-dependencies-

- run: npm install
- run: npm run build
- run: npx semantic-release

workflows:
version: 2
build_deploy:
jobs:
- build:
context: reaction-publish-semantic-release
- deploy:
context: reaction-publish-semantic-release
requires:
- build
filters:
branches:
only: master
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@

*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*

dist
node_modules
1 change: 1 addition & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
src
20 changes: 20 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
The MIT License (MIT)

Copyright (c) 2018 Reaction Commerce, Inc.

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.
25 changes: 25 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Random

A drop-in replacement for the [Meteor random package](https://docs.meteor.com/packages/random.html). Unlike the Meteor package, you can use this either with or without Meteor.

## Installation

```bash
npm i --save @reactioncommerce/random
```

## Usage

```js
import Random from "@reactioncommerce/random";

const id = Random.id();
```

## API

[See Meteor package documentation](https://docs.meteor.com/packages/random.html)

## Other similar packages

The [meteor-random](https://www.npmjs.com/package/meteor-random) NPM package ported Meteor's random package a few years back. This has the latest updates, modernized code, and tests.
Loading

0 comments on commit 00f4c2c

Please sign in to comment.