Skip to content

Commit

Permalink
Add default TypeScript structure
Browse files Browse the repository at this point in the history
  • Loading branch information
Hyunje Jun committed May 31, 2018
1 parent 5942144 commit d82c182
Show file tree
Hide file tree
Showing 6 changed files with 49 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,6 @@ typings/

# Serverless directories
.serverless

# Built files
dist
2 changes: 2 additions & 0 deletions bin/tinypack
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/usr/bin/env node
require("../dist/tinypack");
20 changes: 20 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"name": "tinypack",
"version": "0.0.0",
"description": "A simple TypeScript module bundler",
"repository": "[email protected]:utatti/tinypack.git",
"author": "Hyunje Jun <[email protected]>",
"license": "MIT",
"main": "dist/tinypack.js",
"bin": {
"tinypack": "bin/tinypack"
},
"scripts": {
"build": "tsc",
"dev": "tsc --watch"
},
"dependencies": {
"@types/node": "^10.1.4",
"typescript": "^2.8.4"
}
}
2 changes: 2 additions & 0 deletions src/tinypack.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import { readFileSync } from "fs";
console.log(readFileSync(process.argv[2], "utf-8"));
11 changes: 11 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"compilerOptions": {
"module": "commonjs",
"outDir": "dist",
"strict": true,
"target": "es2017"
},
"files": [
"src/tinypack.ts"
]
}
11 changes: 11 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1


"@types/node@^10.1.4":
version "10.1.4"
resolved "https://registry.yarnpkg.com/@types/node/-/node-10.1.4.tgz#606651d3f8a8bec08b8cb262161aab9209f4a29d"

typescript@^2.8.4:
version "2.8.4"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.8.4.tgz#0b1db68e6bdfb0b767fa2ab642136a35b059b199"

0 comments on commit d82c182

Please sign in to comment.