Skip to content

Commit 9b5a97c

Browse files
author
Geoff Davis
committed
init git with some stuff
0 parents  commit 9b5a97c

11 files changed

+2975
-0
lines changed

.babelrc

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"env": {
3+
"es6": {
4+
"presets": []
5+
},
6+
"js": {
7+
"presets": ["es2015"]
8+
}
9+
}
10+
}

.eslintrc.json

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"env": {
3+
"browser": true,
4+
"es6": true
5+
},
6+
"extends": "eslint:recommended",
7+
"parserOptions": {
8+
"sourceType": "module"
9+
},
10+
"rules": {
11+
"indent": [
12+
"error",
13+
"tab"
14+
],
15+
"linebreak-style": [
16+
"error",
17+
"unix"
18+
],
19+
"quotes": [
20+
"error",
21+
"single"
22+
],
23+
"semi": [
24+
"error",
25+
"never"
26+
]
27+
}
28+
}

.gitignore

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# simpleParse.js ignores...
2+
node_modules
3+
.DS_Store
4+
npm-debug.log

README.md

Whitespace-only changes.

dist/index.es6

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
2+
export function getURLParams(url = window.location.search) {
3+
return url;
4+
}

dist/index.js

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
"use strict";
2+
3+
Object.defineProperty(exports, "__esModule", {
4+
value: true
5+
});
6+
exports.getURLParams = getURLParams;
7+
function getURLParams() {
8+
var url = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : window.location.search;
9+
10+
return url;
11+
}

index.html

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<title>simpleParse.js Test</title>
6+
</head>
7+
<body>
8+
<script src="dist/index.js"></script>
9+
</body>
10+
</html>

package.json

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"name": "simpleParse.js",
3+
"version": "0.0.0",
4+
"description": "Simple JS library for parsing form data and URL parameters",
5+
"main": "dist/index.js",
6+
"author": "geoffdavis92@gmail.com",
7+
"license": "MIT",
8+
"scripts": {
9+
"babel:es6": "BABEL_ENV=es6 babel --watch source/index.js -o dist/index.es6",
10+
"babel:js": "BABEL_ENV=js babel --watch source/index.js -o dist/index.js",
11+
"lint": "eslint dist",
12+
"serve": "php -S localhost:51292"
13+
},
14+
"devDependencies": {
15+
"babel-preset-es2015": "^6.22.0",
16+
"eslint": "^3.16.1",
17+
"babel-loader": "^6.3.2",
18+
"webpack": "^2.2.1"
19+
}
20+
}

source/index.js

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
2+
export function getURLParams (url=window.location.search) {
3+
return url
4+
}

webpack.config.js

Whitespace-only changes.

0 commit comments

Comments
 (0)