FAQ Database Discussion Community


How to run SystemJS/React demo locally with JSX?

javascript,reactjs,react-jsx,systemjs
I'm following this video tutorial at the moment and I'm stuck with the simple HelloWorld App. At the time position 12m:31s is where I'm stuck it should show HelloWorld but it doesn't. The App is using SystemJs, React and JSX. To create the app do these steps in your terminal...

Typescript file exporting interfaces comes up 404 using JSPM

typescript,typescript1.5,jspm,systemjs
I'm using Typescript 1.5. I started using jspm. I have a few files that just consist of interface exports. In my tsconfig the module is set to 'system'. It seems to not like files that are just exporting interfaces. It's giving me 404 errors, looking for them in the dist/app...

Can anyone explain what es7 reflect-metadata is all about?

npm,ecmascript-6,jspm,systemjs,es7
Been studying ES6, JSPM & angular2 for a week now and I found this repo ES6-loader if we look at the index.html at the bottom script you'll see System.import('reflect-metadata') .then(function() { return System.import('app/index'); }) .catch(console.log.bind(console)); This is using JSPM's systemjs polyfill to get ES6's import. Question: What is the reflect-metadata...

Angularjs typescript migration

angularjs,typescript,systemjs,typescript1.5
I have a fairly sizeable angularjs application that I will eventually migrate to Angular 2. I want to to take whatever steps I can now to make future migration easier. I am converting my controllers and services to typescript and organising my files in a component-oriented folder structure. What I...

How do I configure my index.html with Systemsj to use an existing bundle?

javascript,aurelia,jspm,systemjs
I have a small TypeScript helloworld application that uses the aurelia.io framework from a bundle file and configured using SystemJS. When I run my app, the compiled typescript version of my helloworld.ts throws an error which reads: TypeError: define is not a function at System.register.execute (http://localhost:9000/src/helloworld.js!eval:31:13) at t ... Seems...

Knockout Components - Custom Component Loaders

knockout.js,knockout-components,systemjs
I'm using Knockout Components and with System.js for module loading. I have a custom component loader: var myComponentLoader = { loadComponent: function(name, componentConfig, callback) { System.import(componentConfig.myLoader) .then(function(loadedComponent) { var result = { template: ko.utils.parseHtmlFragment(loadedComponent.componentTemplate), createViewModel: loadedComponent.MyComponentViewModel } callback(result); }) // .catch(function(myError){ // alert(myError); // callback(null); // }); } }; //...

How to load System.js modules with TypeScript?

javascript,typescript,aurelia,systemjs
I'm trying to get TypeScript working with the default Aurelia skeleton, which is based on System.JS as a loader. I'm having trouble getting TypeScript to accept module imports. I renamed one of the skeleton files, "nav-bar.js" to "nav-bar.ts" to see if I could convert the example into TypeScript. The code...

Generating both browserify output & System.register() modules from ES6 modules?

browserify,ecmascript-6,babeljs,traceur,systemjs
I have coded ES6 modules as per 2ality's final syntax example, without a .js suffix. I have as well organised the modules into a vendor/project directory hierarchy and module naming scheme as System.register() module format effectively places registered modules into the same namespace. The problem is as follows, if I...

Webstorm SystemJS import resolve error

javascript,webstorm,ecmascript-6,systemjs
SystemJS makes it possible to specify what kind of content is rendered from the imported files: CSS System.import('my/file.css!') Image System.import('some/image.png!image') JSON System.import('some/data.json!').then(function(json){}) Text System.import('some/text.txt!text').then(function(text) {}) (Source) Using SystemJS, importing from a file with a type appended, gives an error in Webstorm. So when I do this: import template from './404.template.html!text';...

system.js import from another folder

javascript,systemjs
I have public/index.html and src/app.js. Inside index.html i have the following system.js call to load app.js <script>System.import('../src/app');</script> It fails with the following error: GET https://registry.jspm.io/src/app.js 404 (Not Found) What should be the syntax to load files from another folder?...