File tree Expand file tree Collapse file tree 6 files changed +48
-0
lines changed
Expand file tree Collapse file tree 6 files changed +48
-0
lines changed Original file line number Diff line number Diff line change 1+ node_modules /
2+ package-lock.json
Original file line number Diff line number Diff line change 1+ /node_modules/
2+ package-lock.json
Original file line number Diff line number Diff line change 33# Copyright (C) NGINX, Inc.
44
55. auto/deps
6+ . ts/config
67
78echo "creating $NJS_MAKEFILE"
89
@@ -264,10 +265,19 @@ benchmark: $NJS_BUILD_DIR/njs_auto_config.h \\
264265ts:
265266 mkdir -p $NJS_BUILD_DIR/ts
266267 cp ts/* $NJS_BUILD_DIR/ts/
268+ rm $NJS_BUILD_DIR/ts/config
269+ NJS_VER=`grep NJS_VERSION src/njs.h | sed -e 's/.*"\(.*\)".*/\1/'`; \\
270+ NJS_TYPES_VER=\$\${NJS_VER}-$NJS_TYPES_VER_SUFFIX; \\
271+ sed 's/\("version":\s*\)"\([^"]\+\)"/\1"'\$\${NJS_TYPES_VER}'"/' \\
272+ ts/package.json > $NJS_BUILD_DIR/ts/package.json
267273
268274ts_test: ts
275+ cd $NJS_BUILD_DIR/ts && tsc
269276 tsc ./test/ts/test.ts
270277
278+ ts_publish: ts
279+ npm publish $NJS_BUILD_DIR/ts
280+
271281dist:
272282 NJS_VER=`grep NJS_VERSION src/njs.h | sed -e 's/.*"\(.*\)".*/\1/'`; \\
273283 rm -rf njs-\$\${NJS_VER} \\
Original file line number Diff line number Diff line change 1+ # The "version" field in package.json is substituted by
2+ # <NJS_VERSION>-<NJS_TYPES_VER_SUFFIX> during build.
3+ # Increment this number if you need to publish a new version of njs-types on
4+ # npm without bumping njs version. And reset it back to "1" after bumping
5+ # NJS_VERSION.
6+ NJS_TYPES_VER_SUFFIX=1
Original file line number Diff line number Diff line change 1+ /// <reference path="njs_core.d.ts" />
Original file line number Diff line number Diff line change 1+ {
2+ "name" : " njs-types" ,
3+ "version" : " 0.0.0-dev" ,
4+ "description" : " TypeScript definitions for njs scripting language and nginx js modules." ,
5+ "scripts" : {
6+ "test" : " tsc"
7+ },
8+ "types" : " index.d.ts" ,
9+ "repository" : {
10+ "type" : " git" ,
11+ "url" : " https://github.com/nginx/njs.git"
12+ },
13+ "keywords" : [
14+ " nginx" ,
15+ " njs" ,
16+ " types"
17+ ],
18+ "author" : " NGINX, Inc." ,
19+ "license" : " BSD-2-Clause" ,
20+ "bugs" : {
21+ "url" : " https://github.com/nginx/njs/issues"
22+ },
23+ "homepage" : " https://nginx.org/en/docs/njs/" ,
24+ "dependencies" : {
25+ "typescript" : " ^4.0.3"
26+ }
27+ }
You can’t perform that action at this time.
0 commit comments