You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Welcome, and thank you for your interest in contributing to create-ts-lib!
4
+
5
+
There are many ways that you can contribute, beyond writing code. The goal of this document is to provide a high-level overview of how you can get involved.
# Use NPX or npm install -g create-ts-lib to install it as a global package
32
+
npx create-ts-lib my-typescript-lib
33
+
cd my-typescript-lib && npm start
44
34
```
45
35
46
-
### Creating a TypeScript module
47
-
48
-
To create a new module, run:
36
+
Calling `create-ts-lib` with `my-typescript-lib` as an argument creates a directory `my-typescript-lib` inside the current directory.<br>
37
+
Inside that directory, the initial file structure of the project is generated with all the devDependencies installed.
49
38
50
39
```sh
51
-
create-ts-lib my-ts-module
52
-
cd my-ts-module
53
-
```
54
-
55
-
It will create a directory called `my-ts-module` inside the current folder.<br>
56
-
Inside that directory, it will generate the initial project structure and install the transitive dependencies:
57
-
58
-
```
59
-
my-ts-module
40
+
my-typescript-lib
60
41
βββ node_modules
61
42
βββ src
62
43
β βββ index.html
63
-
β βββ index.spec.ts
64
44
β βββ index.ts
65
-
β βββ vendor.js
45
+
β βββ MyLibrary.ts
46
+
β βββ MyLibrary.spec.ts
66
47
βββ tests
67
48
β βββ unit
68
49
β βββ spec-bundle.js
@@ -76,8 +57,7 @@ my-ts-module
76
57
βββ webpack.config.js
77
58
```
78
59
79
-
No configuration or complicated folder structures, just the files you need to build your app.<br>
80
-
Once the installation is done, you can run some commands inside the project folder:
60
+
No configuration or complicated folder structures, just the files you need to start your app / package / module.<br>
81
61
82
62
### `npm start` or `npm run server:prod`
83
63
@@ -89,13 +69,18 @@ Open [http://localhost:3000](http://localhost:3000) π to view it in the brows
89
69
Runs the unit tests using Karma as test runner and Jasmine as testing framework.
90
70
91
71
### `npm run build` or `npm run build:prod`
92
-
Build a development release
93
72
94
-
After build phase, 3 files are generated into the `dist` folder:
95
-
-`app.bundle.js` - contains the core of the application. From the entry point `src/index.ts`
96
-
-`vendor.bundle.js` - contains the vendor dependencies. From the entry point `src/vendor.ts` (lodash is added as an example)
97
-
-`index.html` - html page referencing these files
73
+
Creates a bundle into the `dist` folder:
74
+
75
+
```sh
76
+
dist
77
+
βββ MyLibrary.d.ts # - Example of a 'd.ts' declaration file
78
+
βββ app.bundle.js # - Main bundle of the application. name from webpack.config
79
+
βββ app.bundle.js.map # - Sourcemap
80
+
βββ index.d.ts
81
+
βββ index.html # - html page referencing app.bundle.js
82
+
```
98
83
99
84
## Development
100
85
101
-
We'd love to have your helping hand on `create-ts-lib`! See [CONTRIBUTING.md](CONTRIBUTING.md) for more information on what we're looking for and how to get started.
86
+
We'd love to have your helping hand on `create-ts-lib`! See [CONTRIBUTING.md](CONTRIBUTING.md) for more information on what we're looking for and how to get started.
0 commit comments