Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Configure correct npm publishing
It's common to publish build results and typings, instead of the source files to npm
  • Loading branch information
DevWurm committed Nov 15, 2017
1 parent 9cc8dec commit 8559a67
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 12 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -31,6 +31,7 @@ bower_components

# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release
dist

# Dependency directories
node_modules/
Expand Down
3 changes: 1 addition & 2 deletions .npmignore
@@ -1,5 +1,5 @@
# Tests
src/tests
src

# Dependency directories
node_modules/
Expand All @@ -9,7 +9,6 @@ node_modules/
.idea

# Etc
dist
coverage
.gitignore

Expand Down
2 changes: 0 additions & 2 deletions index.ts

This file was deleted.

6 changes: 4 additions & 2 deletions package.json
Expand Up @@ -2,10 +2,12 @@
"name": "typescript-immutable-helper",
"version": "0.1.5",
"description": "Helpers for handling immutable objects with typescript",
"main": "index.ts",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"scripts": {
"build": "tsc",
"test": "mocha -r ts-node/register src/tests/*spec.ts"
"test": "mocha -r ts-node/register src/tests/*spec.ts",
"prepublishOnly": "npm install && npm run build"
},
"repository": {
"type": "git",
Expand Down
2 changes: 2 additions & 0 deletions src/index.ts
@@ -0,0 +1,2 @@
export {ReplicationBuilder} from './replicator'
export {deepFreeze, isDeepFrozen} from './deepFreeze'
4 changes: 2 additions & 2 deletions src/replicator.ts
Expand Up @@ -55,7 +55,7 @@ export class ReplicationBuilder<T> {
/**
* Operator for nodes of the replica
*/
class ReplicaChildOperator<RT, T> {
export class ReplicaChildOperator<RT, T> {
private buildFunction: ()=>RT
private node: T
private replica: RT;
Expand Down Expand Up @@ -90,7 +90,7 @@ class ReplicaChildOperator<RT, T> {
}
}

class PropertyModifier<PT, VT> {
export class PropertyModifier<PT, VT> {
private replica: any
private parent: PT
private relativePathToRoot: string
Expand Down
8 changes: 4 additions & 4 deletions tsconfig.json
@@ -1,22 +1,22 @@
{
"compileOnSave": false,
"compilerOptions": {
"outDir": "./dist/out-tsc",
"outDir": "./dist/",
"baseUrl": "src",
"sourceMap": true,
"declaration": false,
"declaration": true,
"moduleResolution": "node",
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"target": "es5",
"typeRoots": [
"node_modules/@types"
],
//"types": ["jasmine"],
"lib": [
"es2016",
"dom"
]
},
"exclude": ["node_modules"]
"include": ["src"],
"exclude": ["node_modules", "src/tests"]
}

0 comments on commit 8559a67

Please sign in to comment.