Skip to content

Commit

Permalink
fix(build): Back with older versions of webpack and typescript
Browse files Browse the repository at this point in the history
BREAKING CHANGE: imports need to use import Lime from 'lime-js' syntax
  • Loading branch information
samwx committed Sep 30, 2019
1 parent 5959733 commit 69c4225
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 10,712 deletions.
4 changes: 3 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ cache:
notifications:
email: false
node_js:
- 'node' # use latest stable nodejs version
- '4'
before_install:
- npm i -g npm@^2.0.0
before_script:
- npm prune
- npm install
Expand Down
10,678 changes: 0 additions & 10,678 deletions package-lock.json

This file was deleted.

14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,17 @@
"commitizen": "^2.8.2",
"cz-conventional-changelog": "^1.1.6",
"semantic-release": "^4.3.5",
"ts-loader": "5.3.3",
"typescript": "3.2.2",
"ts-loader": "^0.8.2",
"typescript": "^1.8.10",
"tslib": "1.6.0",
"webpack": "4.8.1",
"webpack-cli": "2.1.3",
"uglifyjs-webpack-plugin": "^1.2.2"
"webpack": "^1.12.9"
},
"dependencies": {
"bluebird": "^3.4.0"
},
"config": {
"commitizen": {
"path": "./node_modules/cz-conventional-changelog"
}
},
"dependencies": {}
}
}
1 change: 1 addition & 0 deletions src/Lime/Protocol/Client/Channel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import Command, { CommandListener, CommandMethod, CommandStatus } from "../Comma
import Notification, { NotificationListener, NotificationEvent } from "../Notification";
import Session, { SessionListener, SessionState } from "../Session";
import Transport from "../Network/Transport";
import * as Promise from "bluebird";

export interface MessageChannel extends MessageListener {
sendMessage(message: Message): void;
Expand Down
1 change: 1 addition & 0 deletions src/Lime/Protocol/Client/ClientChannel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import Session, { SessionCompression, SessionEncryption, SessionState } from "..
import Channel from "./Channel";
import Transport from "../Network/Transport";
import Authentication from "../Security/Authentication";
import * as Promise from "bluebird";

export default class ClientChannel extends Channel {

Expand Down
1 change: 1 addition & 0 deletions src/Lime/Protocol/Network/Transport.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import Envelope, { EnvelopeListener } from "../Envelope";
import { SessionCompression, SessionEncryption } from "../Session";
import * as Promise from "bluebird";

interface Transport extends EnvelopeListener {
open(uri: string): Promise<void>;
Expand Down
8 changes: 2 additions & 6 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,12 @@
"compilerOptions": {
"target": "es5",
"declaration": false,
"sourceMap": true,
"lib": [
"esnext",
"dom"
]
"sourceMap": true
},
"exclude": [
"node_modules"
],
"atom": {
"rewriteTsconfig": false
}
}
}
31 changes: 11 additions & 20 deletions webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
var path = require('path');
var webpack = require('webpack');
var UglifyJsPlugin = require('uglifyjs-webpack-plugin');

module.exports = {
entry: {
'lime': './src/Lime/Lime.ts',
'lime.min': './src/Lime/Lime.ts'
},
output: {
path: path.resolve(__dirname, 'dist'),
path: './dist',
filename: '[name].js',
library: 'Lime',
libraryTarget: 'umd',
Expand All @@ -18,25 +16,18 @@ module.exports = {
devtool: 'source-map',

resolve: {
extensions: ['.webpack.js', '.web.js', '.ts', '.tsx', '.js']
extensions: ['', '.webpack.js', '.web.js', '.ts', '.tsx', '.js']
},

module: {
rules: [
{
test: /\.ts$/,
loader: 'ts-loader',
exclude: /node_modules/
}
]
},

optimization: {
minimize: true,
minimizer: [
new UglifyJsPlugin({
include: /\.min\.js$/,
})
]
loaders: [
{ test: /\.ts$/, exclude: /node_modules/, loader: 'ts-loader' }
],
},
plugins: [
new webpack.optimize.UglifyJsPlugin({
include: /\.min\.js$/,
minimize: true
}),
]
};

0 comments on commit 69c4225

Please sign in to comment.