Skip to content

Commit

Permalink
Merge pull request #24 from jkcfg/2019-04-29-misc-fixes
Browse files Browse the repository at this point in the history
Assorted fixes
  • Loading branch information
dlespiau authored Apr 29, 2019
2 parents 81875ca + 765802d commit eb3bcde
Show file tree
Hide file tree
Showing 14 changed files with 19 additions and 23 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
node_modules
/dist
/@jkcfg
/lib
/src/api.ts
/src/shapes.ts
Expand Down
1 change: 0 additions & 1 deletion .npmrc

This file was deleted.

3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,6 @@ jobs:
script:
# build and publish
- make dist
- cd dist && npm publish
- echo '//registry.npmjs.org/:_authToken=${NPM_TOKEN}' > @jkcfg/kubernetes/.npmrc
- npm publish @jkcfg/kubernetes
if: tag IS present
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
.PHONY: dist clean-dist gen test
.PHONY: dist clean gen test

all: gen

gen:
go run ./cmd/apigen/ cmd/apigen/specs/swagger-v1.13.0.json cmd/apigen/templates ./src/
GO111MODULE=on go run ./cmd/apigen/ cmd/apigen/specs/swagger-v1.13.0.json cmd/apigen/templates ./src/

src/api.ts: gen
src/shapes.ts: gen

dist: src/api.ts src/shapes.ts
npx tsc
npx tsc -d --emitDeclarationOnly --allowJs false
cp README.md LICENSE package.json .npmrc $@
cp README.md LICENSE package.json .npmrc @jkcfg/kubernetes

clean:
rm -rf dist
rm -rf @jkcfg
rm -f src/api.ts src/shapes.ts

test: gen
Expand Down
3 changes: 0 additions & 3 deletions examples/chart/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@ keeping track of which charts have been released to the cluster.
(in this directory)

```js
npm install '@jkcfg/kubernetes'
# or: make -C ../.. dist && npm install ../../dist

# run the chart with defaults
jk run ./index.js # or ./index2.js

Expand Down
1 change: 1 addition & 0 deletions examples/chart/node_modules/@jkcfg

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

6 changes: 3 additions & 3 deletions examples/guestbook-ts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@

To run this example:

```
# Install the required dependencies: `typecript`, `@jkcfg/kubernetes`, ...
```console
# Install the required dependencies: `typescript`, `@jkcfg/kubernetes`, ...
$ npm install

# Transpile typescript to javascript
$ npx tsc

# Run jk on the resulting javascript
$ jk run -v guestbook.ts
$ jk run -v guestbook.ts
wrote redis-master-deployment.yaml
```

Expand Down
5 changes: 1 addition & 4 deletions examples/guestbook-ts/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@
"noImplicitReturns": true,
"forceConsistentCasingInFileNames": true,
"strictNullChecks": true,
"baseUrl": ".",
"paths": {
"std": ["node_modules/@jkcfg/std"]
}
"baseUrl": "../.."
}
}
2 changes: 1 addition & 1 deletion examples/overlay/index1.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import overlay from '@jkcfg/kubernetes/overlay';
import { writeResources } from '../../dist/write';
import { writeResources } from '../../@jkcfg/kubernetes/write';
import std from '@jkcfg/std';

async function generate() {
Expand Down
2 changes: 1 addition & 1 deletion examples/overlay/index2.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import overlay from '@jkcfg/kubernetes/overlay';
import { writeResources } from '../../dist/write';
import { writeResources } from '../../@jkcfg/kubernetes/write';
import std from '@jkcfg/std';

async function generate() {
Expand Down
2 changes: 1 addition & 1 deletion examples/overlay/index3.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import overlay from '@jkcfg/kubernetes/overlay';
import { writeResources } from '../../dist/write';
import { writeResources } from '../../@jkcfg/kubernetes/write';
import std from '@jkcfg/std';
import { core } from '@jkcfg/kubernetes/api';

Expand Down
1 change: 1 addition & 0 deletions examples/overlay/node_modules/@jkcfg

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

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@
"<rootDir>/tests/*.test.js"
],
"transformIgnorePatterns": [
"<rootDir>/dist/"
"<rootDir>/@jkcfg/"
],
"modulePathIgnorePatterns": [
"<rootDir>/dist/"
"<rootDir>/@jkcfg/"
],
"moduleDirectories": [
"<rootDir>/node_modules"
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"compilerOptions": {
"outDir": "dist",
"outDir": "@jkcfg/kubernetes",
"allowJs": true,
"target": "es2017",
"module": "es6",
Expand Down

0 comments on commit eb3bcde

Please sign in to comment.