Permalink
Browse files

feat(): abstruse-cli

  • Loading branch information...
Izak88 committed Sep 5, 2017
1 parent ba10a07 commit e73ffda8177842542a3b2d250777cea4e98c7557
Showing with 100 additions and 0 deletions.
  1. +3 −0 src/cli/encrypt.ts
  2. +14 −0 src/cli/index.ts
  3. +5 −0 src/cli/package-lock.json
  4. +18 −0 src/cli/package.json
  5. +23 −0 src/cli/tsconfig.json
  6. +37 −0 src/cli/webpack.cli.js
@@ -0,0 +1,3 @@
export function encrypt(variable: string): string {
return 'not implemented!';
}
@@ -0,0 +1,14 @@
const minimist = require('minimist');
const argv = minimist(process.argv.slice(2));

import { encrypt } from './encrypt';

if (argv.encryptVariable) {
encrypt(argv.encryptVariable);
console.log('not implemented yet');
}

if (argv.checkConfig) {
console.log(argv.checkConfig);
console.log('not implemented yet');
}

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
@@ -0,0 +1,18 @@
{
"name": "abstruse-cli",
"version": "0.0.1",
"description": "Abstruse CLI",
"bin": {
"abstruse-cli": "./dist/index.js"
},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"build": "webpack --config webpack.cli.js --hide-modules"
},
"keywords": [
"abstruse",
"cli"
],
"author": "Bleenco OSS Team <oss@bleenco.com",
"license": "MIT"
}
@@ -0,0 +1,23 @@
{
"compilerOptions": {
"module": "commonjs",
"moduleResolution": "node",
"target": "es2015",
"noImplicitAny": false,
"sourceMap": false,
"declaration": false,
"outDir": "./dist",
"types": ["node"],
"skipLibCheck": true
},
"formatCodeOptions": {
"indentSize": 2,
"tabSize": 1
},
"files": [
"./index.ts"
],
"awesomeTypescriptLoaderOptions": {
"silent": true
}
}
@@ -0,0 +1,37 @@
const path = require('path');
const root = path.resolve(__dirname);
const webpack = require('webpack');
const uglify = require('uglifyjs-webpack-plugin');

module.exports = {
context: __dirname,
target: 'node',
resolve: { extensions: ['.ts', '.js'] },
entry: {
index: path.join(root, 'index.ts')
},
output: {
path: path.join(root, 'dist'),
filename: '[name].js'
},
plugins: [
new webpack.BannerPlugin({ banner: '#!/usr/bin/env node', raw: true }),
new uglify()
],
module: {
rules: [
{ test: /\.ts$/, loaders: ['ts-loader?silent=true'] },
]
},
stats: {
warnings: false
},
node: {
console: false,
global: false,
process: false,
Buffer: false,
__filename: false,
__dirname: false
}
};

0 comments on commit e73ffda

Please sign in to comment.