Skip to content

Commit f218421

Browse files
committed
update
1 parent a34b5e9 commit f218421

File tree

6 files changed

+2438
-11
lines changed

6 files changed

+2438
-11
lines changed

package-lock.json

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

package.json

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"name": "typescript-json-object-mapper",
3-
"version": "1.0.0",
3+
"version": "1.0.1",
44
"description": "Json Object mapper writing in TypeScript",
5-
"main": "dist/bundle.js",
5+
"main": "dist/TypescriptJsonObjectMapper.js",
66
"scripts": {},
77
"repository": "git+https://github.com/olaferlandsen/Typescript-Json-Object-Mapper.git",
88
"author": "Olaf Erlandsen <[email protected]>",
@@ -13,10 +13,13 @@
1313
"homepage": "https://github.com/olaferlandsen/Typescript-Json-Object-Mapper#readme",
1414
"devDependencies": {
1515
"@types/mocha": "^5.2.5",
16-
"@types/node": "^10.9.0",
16+
"@types/node": "10.9.2",
17+
"clean-webpack-plugin": "^0.1.19",
18+
"copy-webpack-plugin": "^4.5.2",
1719
"mocha": "^5.2.0",
1820
"ts-loader": "^4.5.0",
1921
"typescript": "^3.0.1",
22+
"uglifyjs-webpack-plugin": "^1.3.0",
2023
"webpack": "^4.17.1",
2124
"webpack-node-externals": "^1.7.2"
2225
},
@@ -38,5 +41,6 @@
3841
"tom",
3942
"tsom",
4043
"jsom"
41-
]
44+
],
45+
"typings": "dist/index.d.ts"
4246
}

src/core/metadata/JsonProperty.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ interface IJsonPropertyStored {
1111
format?: string;
1212
required?: boolean;
1313
}
14+
1415
export interface IJsonProperty {
1516
name?: string;
1617
view?: [typeof JsonView]|typeof JsonView;

tsconfig.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
"target": "es6",
99
"lib": ["es6"],
1010
"moduleResolution": "node",
11-
"sourceMap": false,
12-
"declaration": false
11+
"sourceMap": true,
12+
"declaration": true
1313
},
1414
"include": [ "src/**/*.ts" ],
1515
"exclude": [ "node_modules" ]

webpack.config.js

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,19 @@
11
const nodeExternals = require('webpack-node-externals');
22
const UglifyJsPlugin = require('uglifyjs-webpack-plugin');
3+
const CopyWebpackPlugin = require('copy-webpack-plugin');
4+
const CleanWebpackPlugin = require('clean-webpack-plugin');
35

46
module.exports = {
5-
devtool: false,
7+
target: "node",
68
mode: "production",
79
entry: __dirname + '/src/index.ts',
810
externals: [nodeExternals()],
11+
devtool: 'source-map',
12+
913
module: {
1014
rules: [
1115
{
12-
test: /\.tsx?$/,
16+
test: /\.ts(x?)$/,
1317
loader: 'ts-loader',
1418
exclude: [
1519
/node_modules/,
@@ -20,10 +24,10 @@ module.exports = {
2024
]
2125
},
2226
resolve: {
23-
extensions: ['.tsx', '.ts', '.js']
27+
extensions: ['.ts', '.tsx','.webpack.js', '.web.js', '.js']
2428
},
2529
output: {
26-
filename: 'bundle.js',
30+
filename: 'index.js',
2731
path: __dirname + '/dist',
2832
libraryTarget: 'umd',
2933
library: 'TypescriptJsonObjectMapper',
@@ -51,5 +55,8 @@ module.exports = {
5155
keep_classnames: false
5256
}
5357
})]
54-
}
58+
},
59+
plugins: [
60+
new CleanWebpackPlugin(["./dist"], {verbose: false})
61+
]
5562
};

0 commit comments

Comments
 (0)