Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace angular-cli patch with something less risky #742

Merged
merged 6 commits into from
Jun 28, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 0 additions & 15 deletions client/angular-cli-patch.js

This file was deleted.

7 changes: 6 additions & 1 deletion client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"webpack": "webpack",
"tslint": "tslint",
"ng": "ng",
"postinstall": "npm rebuild node-sass && test -f angular-cli-patch.js && node angular-cli-patch.js || true",
"postinstall": "npm rebuild node-sass",
"webpack-bundle-analyzer": "webpack-bundle-analyzer",
"webdriver-manager": "webdriver-manager",
"ngx-extractor": "ngx-extractor"
Expand Down Expand Up @@ -61,6 +61,7 @@
"angular2-notifications": "^1.0.2",
"awesome-typescript-loader": "5.0.0",
"bootstrap-sass": "^3.3.7",
"buffer": "^5.1.0",
"cache-chunk-store": "^2.0.0",
"codelyzer": "^4.0.2",
"core-js": "^2.4.1",
Expand All @@ -69,6 +70,7 @@
"extract-text-webpack-plugin": "4.0.0-beta.0",
"file-loader": "^1.1.5",
"html-webpack-plugin": "^3.2.0",
"https-browserify": "^1.0.0",
"jasmine-core": "^3.1.0",
"jasmine-spec-reporter": "^4.2.1",
"karma": "^2.0.2",
Expand All @@ -85,7 +87,9 @@
"ngx-pipes": "^2.1.7",
"node-sass": "^4.1.1",
"npm-font-source-sans-pro": "^1.0.2",
"path-browserify": "^1.0.0",
"primeng": "^6.0.0-rc.1",
"process": "^0.11.10",
"protractor": "^5.3.2",
"purify-css": "^1.2.5",
"purifycss-webpack": "^0.7.0",
Expand All @@ -95,6 +99,7 @@
"sanitize-html": "^1.16.3",
"sass-loader": "^7.0.1",
"sass-resources-loader": "^1.2.1",
"stream-http": "^2.8.3",
"tslint": "^5.7.0",
"tslint-config-standard": "^7.0.0",
"typescript": "2.7",
Expand Down
6 changes: 6 additions & 0 deletions client/src/polyfills.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,3 +80,9 @@ import 'zone.js/dist/zone' // Included with Angular CLI.
/***************************************************************************************************
* APPLICATION IMPORTS
*/

// global/process polyfills

;(window as any).global = window;
;(window as any).process = require('process/');
;(window as any).Buffer = require('buffer/').Buffer;
1 change: 1 addition & 0 deletions client/src/shims/http.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = require('stream-http');
1 change: 1 addition & 0 deletions client/src/shims/https.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = require('https-browserify');
3 changes: 3 additions & 0 deletions client/src/shims/noop.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// Does nothing. Used to shim out node.js modules
// which are no-ops in the browser.
export const NOOP = 0;
1 change: 1 addition & 0 deletions client/src/shims/path.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = require('path-browserify');
8 changes: 7 additions & 1 deletion client/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,13 @@
"baseUrl": "src",
"paths": {
"@app/*": [ "app/*" ],
"video.js": [ "../node_modules/video.js/dist/alt/video.core.js" ]
"video.js": [ "../node_modules/video.js/dist/alt/video.core.js" ],
"fs": [ "./shims/noop" ],
"http": [ "./shims/http" ],
"https": [ "./shims/https" ],
"path": [ "./shims/path" ],
"stream": [ "./shims/noop" ],
"crypto": [ "./shims/noop" ]
}
}
}