Socket
Socket
Sign inDemoInstall

@angularclass/hmr

Package Overview
Dependencies
0
Maintainers
4
Versions
11
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.2.1 to 1.2.2

13

package.json
{
"name": "@angularclass/hmr",
"version": "1.2.1",
"version": "1.2.2",
"description": "angular2-hmr: Hot Module Replacement for Webpack and Angular 2",

@@ -29,14 +29,11 @@ "main": "dist/index.js",

"devDependencies": {
"@angular/core": "2.0.0-rc.3",
"rxjs": "5.0.0-beta.6",
"zone.js": "0.6.12",
"typescript": "^1.8.9",
"@angular/core": "2.1.2",
"rxjs": "5.0.0-rc.1",
"zone.js": "0.6.26",
"typescript": "2.0.3",
"webpack": "^1.13.0",
"typings": "^0.7.9"
},
"peerDependencies": {
"webpack": "*"
},
"dependencies": {
}
}

@@ -86,3 +86,3 @@ <p align="center">

```
`bootloader` is only needed to detech that the dom is ready before bootstraping otherwise bootstrap. This is needed because that dom is already ready during reloading
`bootloader` is only needed to detect that the dom is ready before bootstraping otherwise bootstrap. This is needed because that dom is already ready during reloading.

@@ -96,3 +96,3 @@ ## Important Helpers

## Production
In production you only need bootloader which just does this
In production you only need bootloader which just does this:
```typescript

@@ -107,3 +107,3 @@ export function bootloader(main) {

```
you would bootstrap your app the normal way, in production, afer dom is ready. Also, in production, you should remove the loader
You would bootstrap your app the normal way, in production, afer dom is ready. Also, in production, you should remove the loader:
```es6

@@ -110,0 +110,0 @@ {

// Hot Module Replacement
export function bootloader(main) {
export function bootloader(main: any) {
if (document.readyState === 'complete') {

@@ -12,4 +12,4 @@ main()

// create new elements
export function createNewHosts(cmps) {
const components = cmps.map(componentNode => {
export function createNewHosts(cmps: any) {
const components = cmps.map((componentNode: any) => {
const newNode = document.createElement(componentNode.tagName);

@@ -24,3 +24,3 @@ // display none

return () => {
components.forEach(cmp => {
components.forEach((cmp:any) => {
cmp.newNode.style.display = cmp.currentDisplay;

@@ -37,4 +37,4 @@ cmp.newNode = null;

Array.prototype.slice.call(document.head.querySelectorAll('style'), 0)
.filter((style) => style.innerText.indexOf('_ng') !== -1)
.map(el => el.remove());
.filter((style:any) => style.innerText.indexOf('_ng') !== -1)
.map((el:any) => el.remove());
}

@@ -45,10 +45,10 @@

const inputs = document.querySelectorAll('input');
return Array.prototype.slice.call(inputs).map(input => input.value);
return Array.prototype.slice.call(inputs).map((input: any) => input.value);
}
// set input values
export function setInputValues($inputs) {
export function setInputValues($inputs: any) {
const inputs = document.querySelectorAll('input');
if ($inputs && inputs.length === $inputs.length) {
$inputs.forEach((value, i) => {
$inputs.forEach((value: any, i: number) => {
const el: any = inputs[i];

@@ -55,0 +55,0 @@ el.value = value;

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc