Skip to content
This repository was archived by the owner on Apr 11, 2024. It is now read-only.

Commit

Permalink
Initial (dummy) repo
Browse files Browse the repository at this point in the history
  • Loading branch information
mkevinosullivan committed Sep 14, 2020
0 parents commit 1bcadac
Show file tree
Hide file tree
Showing 12 changed files with 5,173 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
node_modules
.DS_STORE
dist
coverage/
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [Unreleased]

- Start of Changelog
9 changes: 9 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
MIT License

Copyright (c) 2020-present, Shopify 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.
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# `@shopify/shopify-node-api`

<!-- ![Build Status]() -->
[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](LICENSE.md)
<!-- [![npm version](https://badge.fury.io/js/%40shopify%2Fkoa-shopify-auth.svg)](https://badge.fury.io/js/%40shopify%2Fshopify-node-api) -->

Node API supporting authentication, graphql proxy, webhooks for [Shopify](https://www.shopify.ca/) applications.

## Installation

```bash
$ yarn add @shopify/shopify-node-api
```

## Usage

TBD
6 changes: 6 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module.exports = {
presets: [
['babel-preset-shopify/node', {typescript: true}]
],
sourceMaps: 'inline',
};
12 changes: 12 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
module.exports = {
moduleFileExtensions: ['ts', 'js', 'json'],
transform: {
'^.+\\.[t|j]sx?$': 'babel-jest',
},
watchPathIgnorePatterns: [
'<rootDir>/node_modules/',
],
testRegex: '.*\\.test\\.tsx?$',
coverageDirectory: './coverage/',
collectCoverage: true,
};
35 changes: 35 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"name": "@shopify/shopify-node-api",
"version": "0.0.1",
"description": "Shopify Node API to supporting core functionality (auth, graphql proxy, webhooks)",
"main": "dist/src/index.js",
"types": "dist/src/index.d.ts",
"scripts": {
"test": "jest",
"build": "tsc",
"lint": "eslint",
"clean": "rimraf ./dist"
},
"repository": {
"type": "git",
"url": "git+https://github.com/Shopify/shopify-node-api.git"
},
"bugs": {
"url": "https://github.com/Shopify/shopify-node-api/issues"
},
"homepage": "https://github.com/Shopify/shopify-node-api/README.md",
"author": "Shopify Inc.",
"license": "MIT",
"dependencies": {},
"devDependencies": {
"babel-preset-shopify": "^21.0.0",
"eslint": "^7.9.0",
"jest": "^26.4.2",
"rimraf": "^3.0.2",
"typescript": "^4.0.2"
},
"files": [
"dist/*",
"!tsconfig.tsbuildinfo"
]
}
1 change: 1 addition & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { sayHello, sayGoodbye } from './world/hello-goodbye';
6 changes: 6 additions & 0 deletions src/world/hello-goodbye.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export function sayHello(name: String) {
return 'Hello, ' + name;
}
export function sayGoodbye(name: String) {
return 'Goodbye, ' + name;
}
9 changes: 9 additions & 0 deletions src/world/test/hello-goodbye.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
const hg = require('../hello-goodbye');

test('response from hello', () => {
expect(hg.sayHello('test')).toMatch('Hello, test');
});

test('response from goodbye', () => {
expect(hg.sayGoodbye('test')).toMatch('Goodbye, test');
});
44 changes: 44 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
"compileOnSave": false,
"compilerOptions": {
"composite": true,
"declaration": true,
"declarationMap": true,
"pretty": true,
"moduleResolution": "node",
"target": "es5",
"downlevelIteration": true,
"esModuleInterop": true,
"strictNullChecks": true,
"noImplicitAny": false,
"sourceMap": false,
"noEmitOnError": false,
"experimentalDecorators": true,
"noUnusedParameters": true,
"noUnusedLocals": true,
"importHelpers": true,
"lib": [
"dom",
"dom.iterable",
"es2015",
"es2016",
"es2017",
"es2018",
"esnext.asynciterable"
],
"typeRoots": [
"./node_modules/@types"
],
"outDir": "./dist",
"baseUrl": ".",
"rootDir": "."
},
"include": [
"./src/**/*.ts",
"./src/**/*.tsx"
],
"exclude": [
"**/*.test.ts",
"**/*.test.tsx"
]
}
Loading

0 comments on commit 1bcadac

Please sign in to comment.