systemjs

How to disable CSS imports in JSPM / SystemJS

浪子不回头ぞ 提交于 2019-12-08 08:54:32
问题 My issue is JSPM / SystemJS manually inserting CSS dependencies (namely Angular Material's CSS) when I have a different pipeline for those (Gulp + SASS). How can I tell JSPM to not import CSS files or interpret CSS dependencies in any way? I found only this discussion - https://github.com/jspm/jspm-cli/issues/791 - but it did not help me at all. 回答1: Seems that JSPM prefers local package overrides rather than turning off CSS features completely. The culprit of my original issue is Angular

localhost:3000/traceur SystemJS with AngularFire

依然范特西╮ 提交于 2019-12-08 05:47:20
问题 I picked the getting started with Angular2 tutorial format and only added in the angularfire2 part. I installed firebase and angularfire2 using the steps on the angularfire2 docs page Below is my systemjs.config.js /** * System configuration for Angular 2 samples * Adjust as necessary for your application needs. */ (function (global) { System.config({ paths: { // paths serve as alias 'npm:': 'node_modules/' }, // map tells the System loader where to look for things map: { // our app is within

How to integrate angular2-material (alpha 8.2) with angular2-Quickstart app

醉酒当歌 提交于 2019-12-08 05:11:24
问题 NOTE: I don't use Angular-CLI This plunker is working with Alpha-8.1 : https://plnkr.co/edit/qoZ3YCwSz0mQ5o974Dt0?p=preview I have my quick-start app running without any issue. Step 1 : I updated package.json to include angular2-material and angular2-button packages. package.json { "name": "angular2-quickstart", "version": "1.0.0", "scripts": { "start": "tsc && concurrently \"npm run tsc:w\" \"npm run lite\" ", "lite": "lite-server", ... }, "license": "ISC", "dependencies": { "@angular/common

Replace 'require' on Typescript bundle

我的梦境 提交于 2019-12-08 04:51:12
问题 I have a main TypeScript file with an import to another file like so: import './app.run'; I use tsproject to compile my ts files into a single bundle and then use System JS in my html page like so: System.import('app/app.module'); But in my bundle, all the file imports are replaced with commonjs require statements, like so: require('./app.run'); While there is no longer a app.run file present, because everything is bundled. How do I properly bundle ts without external file imports? 回答1: In

How to require('electron') when script is loaded by system.js

拈花ヽ惹草 提交于 2019-12-07 22:25:12
问题 I'm trying to use Aurelia and SystemJs within an electron app; I have a fairly basic app-window.js : const remote = require('electron').remote; document.getElementById("close-btn").addEventListener("click", function (e) { var window = remote.getCurrentWindow(); window.close(); }); ... if I consume it as normal html script ( <script src="app-window.js"></script> ) it works perfectly fine. However, if I have systemJS import it: <script> System.import('app-window.js'); </script> I get the error:

How to globally import Javascript library in Angular2 Typescript project?

孤人 提交于 2019-12-07 22:20:38
问题 I'm trying to figure out how to propertly import an external library in my Angular2 projects. As you can see reading other answers about this matter, there is a bit of confusion about it, and even Angular2 documentation have no info about it. In addition, any search on Google leads to old results related to alpha or beta version of Angular2. I'm trying to import Foundation and jQuery libraries. I need the first to use some Foundation code, and i need the second to make Foundation JS code to

404s after updating to systemjs-angular-loader.js

给你一囗甜甜゛ 提交于 2019-12-07 18:14:43
问题 I am updating my Angular project and decided to remove all instances of moduleId: module.id , as the docs have instructed me to here: https://angular.io/docs/ts/latest/guide/change-log.html All mention of moduleId removed. "Component relative paths" cookbook deleted (2017-03-13) We added a new SystemJS plugin (systemjs-angular-loader.js) to our recommended SystemJS configuration. This plugin dynamically converts "component-relative" paths in templateUrl and styleUrls to "absolute paths" for

Can I replace systemJS by webpack with angular2

南楼画角 提交于 2019-12-07 16:48:18
问题 I understood that systemJS and webpack are doing the same. So I would like to replace systemJS by webpack but when I'm removing the system.js script reference in my html page I get the following error: angular2.js:2 Uncaught ReferenceError: System is not defined Does it means that angular2 is using SystemJS as module loader without the possibility to replace it by another one? 回答1: Yes, you can. There are few examples & tutorials. For example: https://github.com/preboot/angular2-webpack https

Integrate MathJax into SystemJS build

梦想的初衷 提交于 2019-12-07 15:42:54
问题 I use SystemJS to build an Angular 2 application and I'd like to start using MathJax in a component. I installed with: npm install --save-dev mathjax npm install --save @types/mathjax MathJax is now installed in /node_modules/mathjax . When my component does import "mathjax" , the file /node_modules/mathjax/MathJax.js is loaded. So far so good. Problem is that this file then tries to load other files using paths relative to the project root instead of the MathJax install directory. For

How to import system js SFX library

我的未来我决定 提交于 2019-12-07 14:32:34
问题 I've compiled several js files into one SFX as described in https://github.com/systemjs/builder#example---common-bundles (although using '+' instead of '&', but this part seems to be working): gulp.task('systemjs', ['copy-assets'], function(done){ return new Builder({ baseURL: '.', // opt in to Babel for transpiling over Traceur transpiler: 'traceur' // etc. any SystemJS config }).buildSFX('src/elements/my-test.js + src/elements/my-test2.js + src/elements/model/user.js', 'dist/elements.js')