Skip to content

Commit 3a7ecdf

Browse files
author
Bill Barnes
committed
npm stuff
1 parent 3745fbd commit 3a7ecdf

10 files changed

Lines changed: 68 additions & 40 deletions

‎.npmignore‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
bin
2+
built/*.js.map
3+
node_modules
4+
src
5+
test
6+
tsconfig.json
7+
webpacked/*.js.map
8+
.gitattributes
9+
.gitignore
10+
.npmignore
11+
.vscode
File renamed without changes.
File renamed without changes.

‎npm/package.json‎

Lines changed: 0 additions & 22 deletions
This file was deleted.

‎package.json‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
{
2-
"name": "msbotchat",
3-
"version": "0.2.0",
4-
"description": "sample web chat app for MS bot framework ",
2+
"name": "test-webchat",
3+
"version": "0.3.4",
4+
"description": "Embeddable web chat control for the Microsoft Bot Framework",
55
"main": "built/BotChat.js",
6-
"types": "public/botchat.d.ts",
6+
"types": "botchat.d.ts",
77
"scripts": {
88
"build": "tsc && webpack",
99
"watch": "npm-run-all -p -r -l tsc-watch webpack-watch",
1010
"tsc-watch": "tsc -w",
1111
"webpack-watch": "webpack -w",
1212
"clean": "rm -rf built",
13+
"publish": "tsc && webpack --config webpack.production.config.js",
1314
"minify": "webpack --optimize-minimize --optimize-dedupe",
1415
"start": "http-server -p 8000",
15-
"publish": "node ./bin/publish.js",
1616
"test": "mocha test"
1717
},
1818
"repository": {
@@ -30,7 +30,7 @@
3030
"react-redux": "^5.0.1",
3131
"redux": "^3.6.0",
3232
"redux-observable": "^0.12.2",
33-
"rxjs": "5.0.2"
33+
"rxjs": "^5.0.3"
3434
},
3535
"devDependencies": {
3636
"@types/chai": "^3.4.34",

‎requirements.md‎

Lines changed: 0 additions & 6 deletions
This file was deleted.

‎samples/index.html‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
overflow: hidden;
2727
}
2828
</style>
29-
<link href="../static/botchat.css" rel="stylesheet" />
29+
<link href="../botchat.css" rel="stylesheet" />
3030
</head>
3131
<body>
3232
<div id="BotChatGoesHere"></div>

‎tsconfig.json‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
{
22
"compilerOptions": {
3-
"module": "commonjs",
4-
"target": "es5",
5-
"outDir": "./built/",
63
"jsx": "react",
74
"lib": [
85
"dom",
96
"es2017"
107
],
11-
"sourceMap": true,
12-
"noImplicitAny": false
8+
"module": "commonjs",
9+
"noImplicitAny": false,
10+
"outDir": "./built/",
11+
"target": "es5",
12+
"sourceMap": true
1313
},
1414
"files": [
1515
"src/BotChat.ts"

‎webpack.config.js‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
var webpack = require('webpack');
2+
13
module.exports = {
24
entry: {
35
app: ["./built/BotChat.js"],

‎webpack.production.config.js‎

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
var webpack = require('webpack');
2+
3+
module.exports = {
4+
entry: {
5+
app: ["./built/BotChat.js"],
6+
},
7+
output: {
8+
libraryTarget: "umd",
9+
library: "BotChat",
10+
filename: "./webpacked/botchat.js",
11+
},
12+
13+
plugins: [
14+
new webpack.DefinePlugin({
15+
'process.env': {
16+
'NODE_ENV': JSON.stringify('production')
17+
}
18+
}),
19+
new webpack.optimize.UglifyJsPlugin({
20+
compressor: {
21+
warnings: false
22+
}
23+
})
24+
],
25+
26+
resolve: {
27+
extensions: ["", ".webpack.js", ".web.js", ".js"]
28+
},
29+
30+
module: {
31+
preLoaders: [
32+
// All output '.js' files will have any sourcemaps re-processed by 'source-map-loader'.
33+
{ test: /\.js$/, loader: "source-map-loader" }
34+
]
35+
},
36+
37+
// When importing a module whose path matches one of the following, just
38+
// assume a corresponding global variable exists and use that instead.
39+
// This is important because it allows us to avoid bundling all of our
40+
// dependencies, which allows browsers to cache those libraries between builds.
41+
externals: {
42+
},
43+
};

0 commit comments

Comments
 (0)