Skip to content

Updating to [email protected] #45

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

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
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
10 changes: 5 additions & 5 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,14 @@
<script src="jspm.config.js"></script>
<script src="temp/vendor.dev.js"></script>
<script>
SystemJS.trace = true;
// hot-reload config
SystemJS.import('systemjs-hot-reloader').then(function(HotReloader) {
SystemJS.import('systemjs-hot-reloader').then(function(connect) {
// if you're running server on custom port please remember to update below
new HotReloader.default('http://localhost:3000');
connect({host:'http://localhost:3000'});
// load main module of your app with SystemJS
SystemJS.import('src/app');
});
// load main module of your app with SystemJS
SystemJS.trace = true;
SystemJS.import('src/app');
</script>
<!-- loading-app:end -->
</body>
Expand Down
153 changes: 63 additions & 90 deletions jspm.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,37 +9,26 @@ SystemJS.config({
},
devConfig: {
"map": {
"plugin-typescript": "github:frankwallis/plugin-typescript@5.3.3",
"plugin-typescript": "github:frankwallis/plugin-typescript@7.0.5",
"css": "github:systemjs/[email protected]",
"systemjs-hot-reloader": "github:capaj/[email protected]"
"systemjs-hot-reloader": "npm:[email protected]",
"typescript": "npm:[email protected]"
},
"packages": {
"github:frankwallis/[email protected]": {
"npm:[email protected]": {
"map": {
"typescript": "npm:typescript@2.1.4"
"systemjs-hmr": "npm:systemjs-hmr@2.0.8"
}
},
"npm:typescript@2.1.4": {
"npm:typescript@2.2.1": {
"map": {
"source-map-support": "npm:[email protected].8"
"source-map-support": "npm:[email protected].11"
}
},
"npm:[email protected].8": {
"npm:[email protected].11": {
"map": {
"source-map": "npm:[email protected]"
}
},
"github:capaj/[email protected]": {
"map": {
"debug": "npm:[email protected]",
"weakee": "npm:[email protected]",
"socket.io-client": "github:socketio/[email protected]"
}
},
"npm:[email protected]": {
"map": {
"ms": "npm:[email protected]"
}
}
}
},
Expand Down Expand Up @@ -90,7 +79,7 @@ SystemJS.config({
"classnames": "npm:[email protected]",
"constants": "npm:[email protected]",
"crypto": "npm:[email protected]",
"csjs": "npm:csjs@1.0.6",
"csjs": "npm:csjs@1.1.0",
"domain": "npm:[email protected]",
"events": "npm:[email protected]",
"fs": "npm:[email protected]",
Expand All @@ -102,19 +91,19 @@ SystemJS.config({
"os": "npm:[email protected]",
"path": "npm:[email protected]",
"process": "npm:[email protected]",
"react": "npm:[email protected].1",
"react-dom": "npm:[email protected].1",
"react-redux": "npm:[email protected].1",
"react": "npm:[email protected].2",
"react-dom": "npm:[email protected].2",
"react-redux": "npm:[email protected].3",
"react-redux-typescript": "npm:[email protected]",
"react-router": "npm:[email protected]",
"react-router-redux": "npm:[email protected].7",
"react-router-redux": "npm:[email protected].8",
"redux": "npm:[email protected]",
"redux-observable": "npm:[email protected]",
"reselect": "npm:[email protected]",
"rxjs": "npm:[email protected]",
"stream": "npm:[email protected]",
"string_decoder": "npm:[email protected]",
"tslib": "npm:tslib@1.5.0",
"tslib": "npm:tslib@1.6.0",
"url": "npm:[email protected]",
"util": "npm:[email protected]",
"vm": "npm:[email protected]",
Expand Down Expand Up @@ -264,7 +253,7 @@ SystemJS.config({
},
"npm:[email protected]": {
"map": {
"readable-stream": "npm:[email protected].2",
"readable-stream": "npm:[email protected].3",
"pako": "npm:[email protected]"
}
},
Expand All @@ -278,12 +267,12 @@ SystemJS.config({
},
"npm:[email protected]": {
"map": {
"loose-envify": "npm:[email protected].0"
"loose-envify": "npm:[email protected].1"
}
},
"npm:[email protected]": {
"map": {
"loose-envify": "npm:[email protected].0"
"loose-envify": "npm:[email protected].1"
}
},
"npm:[email protected]": {
Expand All @@ -294,7 +283,7 @@ SystemJS.config({
"npm:[email protected]": {
"map": {
"invariant": "npm:[email protected]",
"loose-envify": "npm:[email protected].0",
"loose-envify": "npm:[email protected].1",
"warning": "npm:[email protected]",
"hoist-non-react-statics": "npm:[email protected]",
"history": "npm:[email protected]"
Expand Down Expand Up @@ -322,7 +311,7 @@ SystemJS.config({
},
"npm:[email protected]": {
"map": {
"http-browserify": "npm:stream-http@2.5.0"
"http-browserify": "npm:stream-http@2.6.3"
}
},
"npm:[email protected]": {
Expand All @@ -345,34 +334,9 @@ SystemJS.config({
"string_decoder-browserify": "npm:[email protected]"
}
},
"npm:[email protected]": {
"map": {
"js-tokens": "npm:[email protected]"
}
},
"npm:[email protected]": {
"map": {
"loose-envify": "npm:[email protected]"
}
},
"npm:[email protected]": {
"map": {
"builtin-status-codes": "npm:[email protected]",
"inherits": "npm:[email protected]",
"to-arraybuffer": "npm:[email protected]",
"readable-stream": "npm:[email protected]",
"xtend": "npm:[email protected]"
}
},
"npm:[email protected]": {
"map": {
"inherits": "npm:[email protected]",
"string_decoder": "npm:[email protected]",
"isarray": "npm:[email protected]",
"buffer-shims": "npm:[email protected]",
"core-util-is": "npm:[email protected]",
"process-nextick-args": "npm:[email protected]",
"util-deprecate": "npm:[email protected]"
"loose-envify": "npm:[email protected]"
}
},
"npm:[email protected]": {
Expand Down Expand Up @@ -405,40 +369,6 @@ SystemJS.config({
"lodash": "npm:[email protected]"
}
},
"npm:[email protected]": {
"map": {
"lodash-es": "npm:[email protected]",
"loose-envify": "npm:[email protected]",
"lodash": "npm:[email protected]",
"invariant": "npm:[email protected]",
"hoist-non-react-statics": "npm:[email protected]"
}
},
"npm:[email protected]": {
"map": {
"loose-envify": "npm:[email protected]",
"object-assign": "npm:[email protected]",
"fbjs": "npm:[email protected]"
}
},
"npm:[email protected]": {
"map": {
"loose-envify": "npm:[email protected]",
"object-assign": "npm:[email protected]",
"fbjs": "npm:[email protected]"
}
},
"npm:[email protected]": {
"map": {
"loose-envify": "npm:[email protected]",
"object-assign": "npm:[email protected]",
"promise": "npm:[email protected]",
"setimmediate": "npm:[email protected]",
"isomorphic-fetch": "npm:[email protected]",
"ua-parser-js": "npm:[email protected]",
"core-js": "npm:[email protected]"
}
},
"npm:[email protected]": {
"map": {
"asap": "npm:[email protected]"
Expand Down Expand Up @@ -499,6 +429,49 @@ SystemJS.config({
"minimalistic-assert": "npm:[email protected]",
"minimalistic-crypto-utils": "npm:[email protected]"
}
},
"npm:[email protected]": {
"map": {
"hoist-non-react-statics": "npm:[email protected]",
"invariant": "npm:[email protected]",
"lodash-es": "npm:[email protected]",
"loose-envify": "npm:[email protected]",
"lodash": "npm:[email protected]"
}
},
"npm:[email protected]": {
"map": {
"loose-envify": "npm:[email protected]",
"object-assign": "npm:[email protected]",
"fbjs": "npm:[email protected]"
}
},
"npm:[email protected]": {
"map": {
"loose-envify": "npm:[email protected]",
"object-assign": "npm:[email protected]",
"fbjs": "npm:[email protected]"
}
},
"npm:[email protected]": {
"map": {
"object-assign": "npm:[email protected]",
"loose-envify": "npm:[email protected]",
"promise": "npm:[email protected]",
"setimmediate": "npm:[email protected]",
"isomorphic-fetch": "npm:[email protected]",
"ua-parser-js": "npm:[email protected]",
"core-js": "npm:[email protected]"
}
},
"npm:[email protected]": {
"map": {
"builtin-status-codes": "npm:[email protected]",
"inherits": "npm:[email protected]",
"to-arraybuffer": "npm:[email protected]",
"readable-stream": "npm:[email protected]",
"xtend": "npm:[email protected]"
}
}
}
});
35 changes: 10 additions & 25 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"main": "server.js",
"scripts": {
"clean": "shx rm -rf dist node_modules jspm_packages",
"init": "jspm install && npm run build:dev",
"init": "jspm install && npm run dev:bundle",
"dev": "jspm-hmr -FO",
"dev:bundle": "node scripts/build.js dev",
"dev:unbundle": "shx rm temp/vendor.dev.js",
Expand All @@ -30,7 +30,9 @@
"precommit": "npm run lint && npm run tsc",
"prepush": "npm run precommit && npm test",
"deploy:init": "node scripts/deploy.js init",
"deploy": "cd dist && git checkout gh-pages && git add --all && git commit -m \"New Release\" && git push"
"deploy": "cd dist && git checkout gh-pages && git add --all && git commit -m \"New Release\" && git push",
"jspm:version": "jspm --version",
"jspm:update": "jspm update"
},
"dependencies": {},
"devDependencies": {
Expand All @@ -45,7 +47,7 @@
"@types/systemjs": "^0.19.33",
"husky": "^0.13.0",
"jest": "^19.0.2",
"jspm": "0.17.0-beta.32",
"jspm": "0.17.0-beta.40",
"jspm-hmr": "^1.0.0-rc4",
"react-redux-typescript": "^2.0.0",
"redux-observable": "^0.13.0",
Expand Down Expand Up @@ -80,8 +82,9 @@
},
"devDependencies": {
"css": "github:systemjs/plugin-css@^0.1.32",
"plugin-typescript": "github:frankwallis/plugin-typescript@^5.3.3",
"systemjs-hot-reloader": "github:alexisvincent/systemjs-hot-reloader@^0.6.0"
"plugin-typescript": "github:frankwallis/plugin-typescript@^7.0.5",
"systemjs-hot-reloader": "npm:systemjs-hot-reloader@^1.1.0",
"typescript": "npm:typescript@^2.0.0"
},
"peerDependencies": {
"assert": "npm:jspm-nodelibs-assert@^0.2.0",
Expand All @@ -99,7 +102,7 @@
"os": "npm:jspm-nodelibs-os@^0.2.0",
"path": "npm:jspm-nodelibs-path@^0.2.0",
"process": "npm:jspm-nodelibs-process@^0.2.0",
"react": "npm:react@^15.4.1",
"react": "npm:react@^15.4.2",
"redux": "npm:redux@^3.6.0",
"rxjs": "npm:rxjs@^5.2.0",
"stream": "npm:jspm-nodelibs-stream@^0.2.0",
Expand All @@ -110,9 +113,6 @@
"zlib": "npm:jspm-nodelibs-zlib@^0.2.0"
},
"overrides": {
"github:socketio/[email protected]": {
"main": "dist/socket.io.js"
},
"npm:[email protected]": {
"dependencies": {
"readable-stream": "^2.0.2",
Expand All @@ -122,17 +122,6 @@
"_stream_transform": "readable-stream/transform"
}
},
"npm:[email protected]": {
"main": "src/browser.js",
"jspmNodeConversion": false,
"format": "cjs",
"map": {
"fs": "@empty",
"net": "@empty",
"tty": "@empty",
"util": "@empty"
}
},
"npm:[email protected]": {
"ignore": [
"test.js"
Expand All @@ -144,11 +133,7 @@
"process": "@empty"
}
},
"npm:[email protected]": {
"jspmNodeConversion": false,
"format": "cjs"
},
"npm:[email protected]": {
"npm:[email protected]": {
"browser": {},
"map": {
"buffer": "@empty",
Expand Down
3 changes: 2 additions & 1 deletion scripts/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ require('shelljs/global');

const package = require('../package.json');
const prodDependencies = Object.keys(package.jspm.dependencies);
const devDependencies = Object.keys(package.jspm.devDependencies);
const devDependencies = Object.keys(package.jspm.devDependencies)
.filter((package) => package !== "systemjs-hot-reloader");
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is unnecessary, as you need this in dev hot reloading

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this was a workaround for an issue i found with bundling systemjs-hot-reloader.
alexisvincent/systemjs-hot-reloader#138

I'll see if i can get a reply on what needs to be configured.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah I see, good to know, I gonna try as well if it works for me

const allDependencies = prodDependencies.concat(devDependencies);

const command = process.argv[2];
Expand Down
4 changes: 2 additions & 2 deletions src/app.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// lib imports
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import React from 'react';
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

import statements should be changed back to namespace, as we want to import namespace and not default export

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hrmm. I had a lot of problems with this. I updated systemjs/builder#775 to see if i can get some help to get the namespace import working again.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@wongwill86 I think that if React is not supporting ES Module flag we should probably stick to default import, this is really annoying because we will not be able to use named import as well, but unfortunately I couldn't find any good workaround ;/

import ReactDOM from 'react-dom';
import { Provider } from 'react-redux';
import { Router, Route } from 'react-router';
import { syncHistoryWithStore } from 'react-router-redux';
Expand Down
2 changes: 1 addition & 1 deletion src/components/page-header.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as React from 'react';
import React from 'react';
import classNames from 'classnames';

// const inlineStyles = {};
Expand Down
2 changes: 1 addition & 1 deletion src/components/page-hero.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as React from 'react';
import React from 'react';
import classNames from 'classnames';

// const inlineStyles = {};
Expand Down
2 changes: 1 addition & 1 deletion src/components/page-section.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as React from 'react';
import React from 'react';
import classNames from 'classnames';

// const inlineStyles = {};
Expand Down
Loading