Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
ak-appinventiv committed Feb 13, 2019
0 parents commit 710812a
Show file tree
Hide file tree
Showing 13 changed files with 5,099 additions and 0 deletions.
64 changes: 64 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# nyc test coverage
.nyc_output

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# TypeScript v1 declaration files
typings/

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env

# next.js build output
.next

# build output
dist
674 changes: 674 additions & 0 deletions LICENSE

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Express API
A library to document your express apis.
34 changes: 34 additions & 0 deletions demo/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title><%= htmlWebpackPlugin.options.title %></title>
<link rel="icon" href="logo.png" />
<link href="styles.css" rel="stylesheet" />
</head>
<body>
<div class="container center">
<div class="wrapper">
<div class="icon-wrapper center">
<img src="logo.png">
</div>
<div class="title-heading center">
<span><%= htmlWebpackPlugin.options.title %></span>
</div>
<div class="title-description center">
<span><%= htmlWebpackPlugin.options.description %></span>
</div>
<div class="github-btn-container center">
<a href="https://github.com/akgurjar/LTS" class="github-btn center">
<svg aria-hidden="true" class="octicon-mark-github" height="32" version="1.1" viewBox="0 0 16 16" width="32">
<path fill-rule="evenodd" d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0 0 16 8c0-4.42-3.58-8-8-8z"></path>
</svg>
<span>Github Docs</span>
</a>
</div>
</div>
</div>
</body>
</html>
Binary file added demo/public/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file added demo/public/script.js
Empty file.
71 changes: 71 additions & 0 deletions demo/public/styles.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
html,
body{
height: 100%;
}
body{
padding: 0px;
background-color: #F5F5F5;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
overflow: hidden;
}

.center{
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
}

.container{
height: 100%;
width: 100%;
}
.wrapper{
width: 400px;
height: 440px;
background-color: #FFF;
box-shadow: 0 2px 1px -1px rgba(0,0,0,.2), 0 1px 1px 0 rgba(0,0,0,.14), 0 1px 3px 0 rgba(0,0,0,.12);
border-radius: 5px;
padding: 24px;
}

.icon-wrapper{
height: 180px;
box-sizing: border-box;
padding-top: 60px;
}
.title-heading{
height: 100px;
font-size: 60px;
font-weight: bold;
color: #2980b9;
align-items: flex-end;
}
.title-description{
color: #3498db;
font-size: 20px;
}
.github-btn-container{
height: 120px;
}
.github-btn{
padding: 8px 14px;
height: 42px;
box-sizing: border-box;
border: 1px solid rgba(0, 0, 0, .1);
border-radius: 2px;
font-size: 17px;
font-weight: bold;
background-color: #9b59b6;
color: #FFF;
text-decoration: none;
}
.github-btn:hover{
background-color: #8e44ad;
}
.octicon-mark-github{
margin-right: 12px;
}
.octicon-mark-github>path{
fill: #F5F5F5;
}
23 changes: 23 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"name": "epi",
"version": "1.0.0",
"description": "A express api documentor..",
"main": "dist/lts.js",
"types": "dist/index.d.ts",
"repository": "https://github.com/akgurjar/express-api.git",
"author": "Ashish Gurjar <[email protected]>",
"license": "GNU",
"private": false,
"scripts": {
"start": "webpack-dev-server",
"build": "webpack"
},
"devDependencies": {
"html-webpack-plugin": "^3.2.0",
"ts-loader": "^5.3.3",
"typescript": "^3.3.1",
"webpack": "^4.29.0",
"webpack-cli": "^3.2.1",
"webpack-dev-server": "^3.1.14"
}
}
14 changes: 14 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/**
* Library Class
*/
export * from './lib/index';

/**
* A Function to set library configurations.
* @param config A Configuration Data
*/
export function configLibrary(config: any) {
// Library config
console.info(config);
}

3 changes: 3 additions & 0 deletions src/lib/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@


export class MyLibrary {}
20 changes: 20 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"compilerOptions": {
"rootDir": "src/",
"outDir": "dist/",
"noImplicitAny": true,
"removeComments": true,
"preserveConstEnums": true,
"sourceMap": true,
"declaration": true,
"target": "es5",
"module":"es2015",
"lib": ["es2015", "es2016", "es2017"],
"typeRoots": [
"node_modules/@types/*"
]
},
"include": [
"src"
]
}
38 changes: 38 additions & 0 deletions webpack.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
const path = require('path');
const HTMLWebpackPlugin = require('html-webpack-plugin');

module.exports = {
entry: './src/index.ts',
output: {
filename: 'epi.js',
path: path.resolve(__dirname, 'dist'),
library: 'epi'
},
mode: 'development',
devtool: "source-map",
module: {
rules: [
{
test: /\.tsx?$/,
use: 'ts-loader',
exclude: /node_modules/
}
]
},
resolve: {
extensions: [ '.tsx', '.ts', '.js' ]
},
devServer: {
contentBase: [path.join(__dirname, 'dist'), path.join(__dirname, 'demo/public')],
compress: true,
port: 9000,
filename: 'lts.js'
},
plugins: [
new HTMLWebpackPlugin({
template: 'demo/index.html',
title: 'LTS',
description: 'Starter for Typescript Library'
})
]
};
Loading

0 comments on commit 710812a

Please sign in to comment.