Skip to content
This repository has been archived by the owner on Dec 25, 2018. It is now read-only.

Commit

Permalink
Added special README.md to distributions and updated gulp tasks to help.
Browse files Browse the repository at this point in the history
Added publish.cmd to automatically publish all of them.
  • Loading branch information
electricessence committed Jun 11, 2016
1 parent f2516bc commit 6c07c26
Show file tree
Hide file tree
Showing 16 changed files with 111 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .npmignore
Expand Up @@ -11,7 +11,7 @@ tests
coverage
documentation
typings
coverage.bat
coverage.cmd
.npmignore
test.js
tsc-flags.txt
Expand Down
12 changes: 5 additions & 7 deletions README.md
Expand Up @@ -59,20 +59,18 @@ Version 2.5 was the first NPM release. The goal is to get this as user friendly
***All distributions contain source-maps.***
https://www.npmjs.com/search?q=typescript-dotnet

#### Universal Module Definition (UMD)
#### [Universal Module Definition (UMD)](https://www.npmjs.com/package/typescript-dotnet-umd)
```
npm install typescript-dotnet-umd
```

It's highly recommended to use the UMD (minified) version for most cases since it works for AMD and CommonJS.

#### Other Published NPM Module Types
```
typescript-dotnet-es6
typescript-dotnet-commonjs
typescript-dotnet-amd
typescript-dotnet-system
```
* [```typescript-dotnet-es6```](https://www.npmjs.com/package/typescript-dotnet-es6)
* [```typescript-dotnet-commonjs```](https://www.npmjs.com/package/typescript-dotnet-commonjs)
* [```typescript-dotnet-amd```](https://www.npmjs.com/package/typescript-dotnet-amd)
* [```typescript-dotnet-system```](https://www.npmjs.com/package/typescript-dotnet-system)

Install on only the module type you need in order to avoid type collisions.

Expand Down
2 changes: 1 addition & 1 deletion bower.json
@@ -1,6 +1,6 @@
{
"name": "typescript-dotnet",
"version": "3.0.1",
"version": "3.0.2",
"ignore": [
".bowercc",
".gitignore",
Expand Down
File renamed without changes.
21 changes: 21 additions & 0 deletions dist/README.md
@@ -0,0 +1,21 @@
This package is a distribution for [typescript-dotnet](https://www.npmjs.com/package/typescript-dotnet).
https://www.npmjs.com/package/typescript-dotnet

The [typescript-dotnet](https://www.npmjs.com/package/typescript-dotnet) package includes the source code along with unminified UMD JavaScript and will function perfectly within another project but requires a reference to the ```/source/``` folder.

It is recommended you select the module type that you intend to use:

* [```typescript-dotnet-umd```](https://www.npmjs.com/package/typescript-dotnet-umd)
* [```typescript-dotnet-es6```](https://www.npmjs.com/package/typescript-dotnet-es6)
* [```typescript-dotnet-commonjs```](https://www.npmjs.com/package/typescript-dotnet-commonjs)
* [```typescript-dotnet-amd```](https://www.npmjs.com/package/typescript-dotnet-amd)
* [```typescript-dotnet-system```](https://www.npmjs.com/package/typescript-dotnet-system)

**Example:**

The following example will install the UMD version which works with both CommonJS and AMD module types.

```
npm install typescript-dotnet-umd
```

3 changes: 2 additions & 1 deletion dist/amd/package.json
@@ -1,6 +1,6 @@
{
"name": "typescript-dotnet-amd",
"version": "3.0.1",
"version": "3.0.2",
"license": "MIT",
"author": "electricessence <npm@electrified.net>",
"description": "A JavaScript-Friendly .NET Based TypeScript Library.",
Expand All @@ -19,6 +19,7 @@
"Regex",
"TypeValidator",
"Promise",
"Parallel",
"IDisposable",
"IEnumerable",
"ICollection",
Expand Down
3 changes: 2 additions & 1 deletion dist/commonjs/package.json
@@ -1,6 +1,6 @@
{
"name": "typescript-dotnet-commonjs",
"version": "3.0.1",
"version": "3.0.2",
"license": "MIT",
"author": "electricessence <npm@electrified.net>",
"description": "A JavaScript-Friendly .NET Based TypeScript Library.",
Expand All @@ -19,6 +19,7 @@
"Regex",
"TypeValidator",
"Promise",
"Parallel",
"IDisposable",
"IEnumerable",
"ICollection",
Expand Down
21 changes: 21 additions & 0 deletions dist/es6/README.md
@@ -0,0 +1,21 @@
This package is a distribution for [typescript-dotnet](https://www.npmjs.com/package/typescript-dotnet).
https://www.npmjs.com/package/typescript-dotnet

The [typescript-dotnet](https://www.npmjs.com/package/typescript-dotnet) package includes the source code along with unminified UMD JavaScript and will function perfectly within another project but requires a reference to the ```/source/``` folder.

It is recommended you select the module type that you intend to use:

* [```typescript-dotnet-umd```](https://www.npmjs.com/package/typescript-dotnet-umd)
* [```typescript-dotnet-es6```](https://www.npmjs.com/package/typescript-dotnet-es6)
* [```typescript-dotnet-commonjs```](https://www.npmjs.com/package/typescript-dotnet-commonjs)
* [```typescript-dotnet-amd```](https://www.npmjs.com/package/typescript-dotnet-amd)
* [```typescript-dotnet-system```](https://www.npmjs.com/package/typescript-dotnet-system)

**Example:**

The following example will install the UMD version which works with both CommonJS and AMD module types.

```
npm install typescript-dotnet-umd
```

3 changes: 2 additions & 1 deletion dist/es6/package.json
@@ -1,6 +1,6 @@
{
"name": "typescript-dotnet-es6",
"version": "3.0.1",
"version": "3.0.2",
"license": "MIT",
"author": "electricessence <npm@electrified.net>",
"description": "A JavaScript-Friendly .NET Based TypeScript Library.",
Expand All @@ -19,6 +19,7 @@
"Regex",
"TypeValidator",
"Promise",
"Parallel",
"IDisposable",
"IEnumerable",
"ICollection",
Expand Down
3 changes: 2 additions & 1 deletion dist/system/package.json
@@ -1,6 +1,6 @@
{
"name": "typescript-dotnet-system",
"version": "3.0.1",
"version": "3.0.2",
"license": "MIT",
"author": "electricessence <npm@electrified.net>",
"description": "A JavaScript-Friendly .NET Based TypeScript Library.",
Expand All @@ -19,6 +19,7 @@
"Regex",
"TypeValidator",
"Promise",
"Parallel",
"IDisposable",
"IEnumerable",
"ICollection",
Expand Down
3 changes: 2 additions & 1 deletion dist/umd.min/package.json
@@ -1,6 +1,6 @@
{
"name": "typescript-dotnet-umd",
"version": "3.0.1",
"version": "3.0.2",
"license": "MIT",
"author": "electricessence <npm@electrified.net>",
"description": "A JavaScript-Friendly .NET Based TypeScript Library.",
Expand All @@ -19,6 +19,7 @@
"Regex",
"TypeValidator",
"Promise",
"Parallel",
"IDisposable",
"IEnumerable",
"ICollection",
Expand Down
13 changes: 12 additions & 1 deletion gulp/dist.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion gulp/dist.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 14 additions & 1 deletion gulp/dist.ts
Expand Up @@ -2,6 +2,7 @@

import * as TARGET from "./constants/Targets";
import * as MODULE from "./constants/ModuleTypes";
import * as EVENT from "./constants/Events";
import * as gulp from "gulp";
import * as tsc from "./tsc";
import * as TASK from "./constants/TaskNames";
Expand Down Expand Up @@ -63,7 +64,19 @@ function savePackage(dist:string, folder:string = dist):PromiseLike<void>
if(err) reject(err);
else resolve();
})
}));
}))
.then(()=>
copyReadme(folder));
}

function copyReadme(folder:string):PromiseLike<void>
{
return new Promise<void>((resolve)=>
{
gulp.src("./dist/README.md")
.pipe(gulp.dest(`./dist/${folder}/`))
.on(EVENT.END, resolve);
});
}

gulp.task(
Expand Down
2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "typescript-dotnet",
"version": "3.0.1",
"version": "3.0.2",
"license": "MIT",
"author": "electricessence <npm@electrified.net>",
"description": "A JavaScript-Friendly .NET Based TypeScript Library.",
Expand Down
24 changes: 24 additions & 0 deletions publish.cmd
@@ -0,0 +1,24 @@
call npm publish
cd dist

cd es6
call npm publish
cd ..

cd commonjs
call npm publish
cd ..

cd amd
call npm publish
cd ..

cd umd.min
call npm publish
cd ..

cd system.js
call npm publish
cd ..

cd ..

0 comments on commit 6c07c26

Please sign in to comment.