Skip to content

Commit 0d25bcc

Browse files
committed
Setup package
0 parents  commit 0d25bcc

10 files changed

+172
-0
lines changed

.babelrc

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"presets": [
3+
"@babel/preset-env"
4+
]
5+
}

.eslintrc

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"extends": "airbnb-base",
3+
"parser": "babel-eslint",
4+
"env": {
5+
"mocha": true
6+
}
7+
}

.gitignore

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
6+
# Runtime data
7+
pids
8+
*.pid
9+
*.seed
10+
11+
# Directory for instrumented libs generated by jscoverage/JSCover
12+
lib-cov
13+
14+
# Coverage directory used by tools like istanbul
15+
coverage
16+
17+
# nyc test coverage
18+
.nyc_output
19+
20+
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
21+
.grunt
22+
23+
# node-waf configuration
24+
.lock-wscript
25+
26+
# Compiled binary addons (http://nodejs.org/api/addons.html)
27+
build/Release
28+
29+
# Dependency directories
30+
node_modules
31+
jspm_packages
32+
33+
# Optional npm cache directory
34+
.npm
35+
36+
# Optional REPL history
37+
.node_repl_history
38+
dist
39+
40+
#PhpStorm and WebStorm settings folder
41+
.idea
42+
43+
# np publishing tool
44+
.np-config.js

.travis.yml

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
language: node_js
2+
node_js:
3+
- "11"
4+
- "10"
5+
- "8"
6+
- "node"
7+
install: "npm install && npm run build"
8+
after_success: "npm install -g coveralls && npm run coverage && cat ./coverage/lcov.info | coveralls"

CHANGELOG.md

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
### Unreleased
2+
3+
- Created the library by extracting code from https://github.com/ecamp/ecamp3

LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2016 Yury Dymov
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# hal-json-vuex
2+
3+
Utility to normalize HAL JSON data for Vuex applications.
4+
5+
[![npm version](https://img.shields.io/npm/v/hal-json-normalizer.svg?style=flat)](https://www.npmjs.com/package/hal-json-normalizer)
6+
[![Downloads](http://img.shields.io/npm/dm/hal-json-normalizer.svg?style=flat-square)](https://npmjs.org/package/hal-json-normalizer)
7+
[![Build Status](https://img.shields.io/travis/carlobeltrame/hal-json-normalizer/master.svg?style=flat)](https://travis-ci.org/carlobeltrame/hal-json-normalizer)
8+
[![Coverage Status](https://coveralls.io/repos/github/carlobeltrame/hal-json-normalizer/badge.svg?branch=master)](https://coveralls.io/github/carlobeltrame/hal-json-normalizer?branch=master)
9+
10+
# Description
11+
12+
A module to access [HAL JSON](https://tools.ietf.org/html/draft-kelly-json-hal-08) data from an API, using a [Vuex](https://vuex.vuejs.org) store, restructured to make life easier.
13+
14+
# Install
15+
16+
```shell
17+
$ npm install ecamp/hal-json-vuex#master
18+
```
19+
20+
# Example
21+
22+
```JavaScript
23+
// TODO
24+
```

package.json

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"name": "hal-json-vuex",
3+
"version": "1.0.0",
4+
"description": "Use a HAL JSON API with Vuex",
5+
"main": "src/index.js",
6+
"scripts": {
7+
"test": "echo \"Error: no test specified\" && exit 1"
8+
},
9+
"repository": {
10+
"type": "git",
11+
"url": "git+https://github.com/ecamp/hal-json-vuex.git"
12+
},
13+
"keywords": [
14+
"HAL",
15+
"JSON",
16+
"API",
17+
"HATEOAS",
18+
"Vuex",
19+
"Vue"
20+
],
21+
"author": "Carlo Beltrame",
22+
"license": "MIT",
23+
"bugs": {
24+
"url": "https://github.com/ecamp/hal-json-vuex/issues"
25+
},
26+
"homepage": "https://github.com/ecamp/hal-json-vuex#readme"
27+
}

src/index.js

Whitespace-only changes.

webpack.config.js

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
var path = require('path');
2+
var webpack = require('webpack');
3+
var nodeExternals = require('webpack-node-externals');
4+
5+
module.exports = {
6+
externals: [nodeExternals()],
7+
entry: [
8+
'./src/normalize'
9+
],
10+
output: {
11+
path: path.join(__dirname, 'dist'),
12+
filename: 'bundle.js',
13+
libraryTarget: 'commonjs2'
14+
},
15+
plugins: [
16+
new webpack.DefinePlugin({
17+
'process.env': {
18+
'NODE_ENV': JSON.stringify('production')
19+
}
20+
})
21+
],
22+
module: {
23+
rules: [
24+
{ test: /\.js?$/, use: ['babel-loader', 'eslint-loader'], exclude: /node_modules/ },
25+
]
26+
},
27+
resolve: {
28+
modules: [
29+
path.join(__dirname, 'src'),
30+
'node_modules'
31+
]
32+
}
33+
};

0 commit comments

Comments
 (0)