config files

This commit is contained in:
cupcakearmy 2019-02-09 19:09:04 +01:00
commit 45d00c0f42
8 changed files with 153 additions and 0 deletions

6
.gitignore vendored Normal file
View File

@ -0,0 +1,6 @@
node_modules/
package-lock.json
.idea
test/bundle.js
lib

3
.npmignore Normal file
View File

@ -0,0 +1,3 @@
*
!lib/index.js
!lib/index.d.ts

21
LICENSE Normal file
View File

@ -0,0 +1,21 @@
MIT License
Copyright (c) 2019 Nicco
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.

15
README.md Normal file
View File

@ -0,0 +1,15 @@
# canihazusername
## Install
```bash
npm install --save canihazusername
```
## Quickstart
```jsx
import cihu from 'aspekto'
console.log(cihu())
```

36
package.json Normal file
View File

@ -0,0 +1,36 @@
{
"name": "canihazusername",
"version": "1.0.0",
"description": "Username Generator",
"main": "./lib/index.js",
"types": "./lib/index.d.ts",
"scripts": {
"dev": "webpack -d -w",
"build": "webpack -p",
"test": "mocha",
"prepublish": "npm run build && npm run test"
},
"repository": {
"type": "git",
"url": "git+https://github.com/CupCakeArmy/canihazusername.git"
},
"keywords": [
"UI"
],
"author": "Niccolo Borgioli",
"license": "MIT",
"bugs": {
"url": "https://github.com/CupCakeArmy/canihazusername/issues"
},
"homepage": "https://github.com/CupCakeArmy/canihazusername#readme",
"dependencies": {},
"devDependencies": {
"awesome-typescript-loader": "^5.2.1",
"dts-bundle": "^0.7.3",
"dts-bundle-webpack": "^1.0.2",
"mocha": "^5.2.0",
"typescript": "^3.2.4",
"webpack": "^4.29.0",
"webpack-cli": "^3.2.1"
}
}

34
src/webpack.config.js Normal file
View File

@ -0,0 +1,34 @@
const webpack = require('webpack')
const path = require('path')
const DtsBundleWebpack = require('dts-bundle-webpack')
module.exports = {
context: `${__dirname}`,
target: 'node',
entry: [
`./index.ts`,
],
output: {
path: `${__dirname}/../lib`,
filename: 'index.js',
libraryTarget: 'umd',
},
resolve: {
extensions: ['.js', '.jsx', '.ts', '.tsx'],
},
optimization: {
minimize: true,
},
module: {
rules: [{
test: /\.tsx?$/,
loader: 'awesome-typescript-loader'
}, ],
},
plugins: [
new DtsBundleWebpack({
name: 'index',
main: `./lib/index.d.ts`
})
],
}

21
tsconfig.json Normal file
View File

@ -0,0 +1,21 @@
{
"compilerOptions": {
"outDir": "./lib",
"target": "es6",
"module": "commonjs",
"noImplicitAny": true,
"strictNullChecks": true,
"removeComments": true,
"declaration": true,
"sourceMap": true,
"noEmit": true,
"jsx": "react"
},
"include": [
"./src/**/*.tsx",
"./src/**/*.ts"
],
"exclude": [
"node_modules"
]
}

17
webpack.config.js Normal file
View File

@ -0,0 +1,17 @@
const common = {
stats: {
assets: true,
assetsSort: 'size',
all: false,
errors: true,
colors: true,
performance: true,
timings: true,
},
}
const src = require('./src/webpack.config.js')
module.exports = [
Object.assign({}, common, src),
]