Add some feathers dependencies

This commit is contained in:
R. Tyler Croy 2018-08-10 15:50:38 -07:00
parent 5b926a51a3
commit 42ad24c416
No known key found for this signature in database
GPG Key ID: 1426C7DC3F51E16F
8 changed files with 4014 additions and 0 deletions

44
.eslintrc.json Normal file
View File

@ -0,0 +1,44 @@
{
"env": {
"es6": true,
"node": true,
"jest": true
},
"parserOptions": {
"ecmaVersion": 2017
},
"extends": "eslint:recommended",
"rules": {
"indent": [
"error",
2
],
"linebreak-style": [
"error",
"unix"
],
"quotes": [
"error",
"single"
],
"semi": [
"error",
"always"
],
"prefer-arrow-callback": [
"error",
{ "allowNamedFunctions": true }
],
"no-var": "error",
"keyword-spacing": "error",
"block-spacing": "error",
"space-before-blocks": "error",
"spaced-comment": "error",
"space-infix-ops": "error",
"semi-spacing": "error",
"template-tag-spacing": "error",
"curly": "error",
"brace-style": "error",
"no-trailing-spaces": "error"
}
}

1
.gitignore vendored
View File

@ -1,2 +1,3 @@
*.sw*
build/
node_modules/

3
activate Normal file
View File

@ -0,0 +1,3 @@
#!/bin/sh
export PATH=./node_modules/.bin:${PWD}/tools:${PATH}

3902
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

29
tools/node Executable file
View File

@ -0,0 +1,29 @@
#!/usr/bin/env bash
# If we're executing from a normal shell, allow input. If we're in a
# subprocess, like under Jenkins Pipeline, don't allow it
tty -s
if [ $? -eq 0 ]; then
TTY_ARGS="-ti"
fi;
COMMAND=$@
# The caller is passing in some custom paraneters to the `node` binary, so we
# need to override the entrypoint to explicitly call node
if [[ "${1}" =~ "--" ]]; then
COMMAND="node $@";
fi;
exec docker run --rm ${TTY_ARGS} \
-u $(id -u):$(id -g) \
-w ${PWD} \
--mount type=tmpfs,destination=/.npm \
--mount type=tmpfs,destination=/.config \
-v ${PWD}:${PWD} \
-e PATH=$PWD/node_modules/.bin:/usr/local/bin:$PATH \
-e LANG=C.UTF-8 \
-e LOG_LEVEL=$LOG_LEVEL \
$(printenv | grep -i \^node | awk '{ print "-e", $1 }') \
node:9-alpine \
${COMMAND}

3
tools/npm Executable file
View File

@ -0,0 +1,3 @@
#!/bin/sh
exec $(dirname $0)/node npm $@

10
tsconfig.json Normal file
View File

@ -0,0 +1,10 @@
{
"compilerOptions": {
"module" : "none",
"outDir": "./dist/",
"noImplicitAny": true,
"module": "es6",
"target": "es5",
"allowJs": true
}
}

22
webpack.config.js Normal file
View File

@ -0,0 +1,22 @@
const path = require('path');
module.exports = {
entry: './src/index.ts',
module: {
rules: [
{
test: /\.tsx?$/,
use: 'ts-loader',
exclude: /node_modules/
}
]
},
resolve: {
extensions: [ '.tsx', '.ts', '.js' ]
},
output: {
filename: 'main.js',
path: path.resolve(__dirname, 'dist')
}
};