Skip to content
This repository was archived by the owner on Feb 26, 2024. It is now read-only.

Commit cd6c3fe

Browse files
committed
chore: publish esm + umd
closes #57
2 parents 5c704f1 + f18bc66 commit cd6c3fe

14 files changed

+1129
-103
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# "angular-in-memory-web-api" versions
22

3+
<a name="0.1.11"></a>
4+
## 0.1.11 (2016-10-19)
5+
* npm publish as esm + an umd bundle
6+
37
<a name="0.1.10"></a>
48
## 0.1.10 (2016-10-19)
59
* Catch a `handleRequest` error and return as a failed server response.

bundles/in-memory-web-api.umd.js

Lines changed: 1013 additions & 0 deletions
Large diffs are not rendered by default.

gulpfile.js

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ var $ = require('gulp-load-plugins')({lazy: true});
33
var args = require('yargs').argv;
44
var cp = require('child_process');
55
var del = require('del');
6+
var rollup = require('rollup-stream');
7+
var source = require('vinyl-source-stream');
68

79
var path = require("path");
810

@@ -19,18 +21,25 @@ gulp.task('help', $.taskListing.withFilters(function (taskName) {
1921
return shouldRemove;
2022
}));
2123

22-
gulp.task('build', ['ngc'], function(){
24+
gulp.task('build', ['umd'], function(){
2325
return gulp
2426
.src(jsCopySrc)
2527
.pipe(gulp.dest('./'));
2628
});
2729

28-
gulp.task('ngc',['clean'], function(done) {
30+
gulp.task('ngc', ['clean'], function(done) {
2931
runNgc('./', done);
3032
});
3133

34+
// Uses rollup-stream plugin https://www.npmjs.com/package/rollup-stream
35+
gulp.task('umd', ['ngc'], function(done) {
36+
return rollup('rollup.config.js')
37+
.pipe(source('in-memory-web-api.umd.js'))
38+
.pipe(gulp.dest('./bundles'));
39+
});
40+
3241
gulp.task('clean', function(done) {
33-
clean([ngcOutput+'*.js', '*.js.map', '*.d.ts', '!gulpfile.js', '*.metadata.json'], done);
42+
clean([ngcOutput+'*.js', '*.js.map', '*.d.ts', '!gulpfile.js', '*.metadata.json', './bundles/in-memory-web-api.umd.js'], done);
3443
});
3544

3645
/**

http-status-codes.js

Lines changed: 2 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

http-status-codes.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)