jspm

Importing ElasticSearch into Aurelia

有些话、适合烂在心里 提交于 2019-12-06 16:07:27
I'm trying to use elasticsearch-js within my Aurelia app but running into some trouble. After executing npm install elasticsearch , elasticsearch is installed under: app/node_modules/elasticsearch . In my app.js , I try to pull it in with import {elasticsearch} from 'elasticsearch'; and in the javascript console, I get the following error: system.src.js:4840 GET http://localhost:9000/dist/elasticsearch.js 404 (Not Found)D @ system.src.js:4840(anonymous function) @ system.src.js:4840Promise @ shim.min.js:1847(anonymous function) @ system.src.js:4840(anonymous function) @ system.src.js:4840

riotts (riot-ts) and jspm - anyone got it working together?

孤人 提交于 2019-12-06 13:09:56
I have been looking at this ambitious project https://github.com/nippur72/RiotTS that has moved riotjs over to riot-ts. The author has used bower, and I am trying to get it working using jspm. riot-ts doesn't exist in the jspm repo list, so I imported using jspm install npm:riot-ts package.json: { "jspm": { "directories": { "baseURL": "public/assets" }, "dependencies": { "riot-ts": "npm:riot-ts@^1.0.14" }, "devDependencies": { "babel": "npm:babel-core@^5.8.24", "babel-runtime": "npm:babel-runtime@^5.8.24", "core-js": "npm:core-js@^1.1.4" } }, "devDependencies": { "elixir-jasmine": "0.0.4",

Component rendered as comment in VueJS + JSPM

不想你离开。 提交于 2019-12-06 05:54:12
问题 I tried to build simple app using jspm with vue.js. This is my html file: <html> <head> <script src="bundle.js"></script> <!--script src="jspm_packages/npm/vue@2.1.10/dist/vue.min.js"></script--> </head> <body> <div id="app"> {{ message }} </div> </body> </html> My main.js file: import Vue from "vue" const app = new Vue({ el: '#app', data: { message: 'Hello Vue!' } }); I'm building self-executing bundle like this: jspm bundle-sfx main.js bundle.js When I open browser I can see that node div

How to import external NPM module with Typescript declarations using JSPM

一笑奈何 提交于 2019-12-06 02:57:47
'test-module' is external module written in Typescript with index.d.ts definition file. it has properties for tsd/tsc in package.json: "typings": "dist/index.d.ts", "typescript": { "definition": "dist/index.d.ts" } 'test-module' is installed with JSPM in jspm_packages/npm/test-module for dynamic loading using SystemJS 'app' is Typescript application that imports 'test-module' like this: import {Component} from 'test-module'; The problem is that 'test-module' module HAS TO BE in both locations: in node_modules for Typescript compiler (otherwise it does not find 'test-module' and errors it

Typescript Compiler error TS2307: Cannot find module 'jquery'

爷,独闯天下 提交于 2019-12-06 01:31:36
问题 I was following JSPM getting started guide and I want to install jquery package so I execute below command. jspm install jquery But when I try to import it in typescript like below import $ from 'jquery' I'm getting a error from typescript compiler saying error TS2307: Cannot find module 'jquery'. Not only for this library for other libraries I'm getting the same error. 回答1: You need to include type definitions for jquery in the compilation context, you can grab them from https://github.com

Karma proxies are not working

风格不统一 提交于 2019-12-05 18:48:56
I am using Karma (v0.12.37) as test runner along with JSPM (v0.16.2) . I have added following proxy config in karma so as to allow proper loading of JSPM files: proxies: { '/base/jspm_packages/': '/base/app/jspm_packages/' } Bu this doesn't work out and fails on following: PhantomJS 2.0.0 (Windows 8 0.0.0) ERROR: 'Potentially unhandled rejection [10] Error: XHR error loading http://localhost:9876/base/jspm_packages/npm/babel-core@5.8.22.js Error loading http://localhost:9876/base/jspm_packages/npm/babel-core@5.8.22.js Error loading http://localhost:9876/base/app/pages/examples/todo-example

jspm does not transpile code from ES6 to ES5

北战南征 提交于 2019-12-05 15:52:14
Running jspm bundle-sfx some/input some/output.js does not transpile my code from ES6 to ES5. This makes the output file unusable. Example contents of input file: [1,2,3,4].map((i)=>i*i); As explained by jspm author here : ES6 transpilation only happens for ES6 modules, not ES6 files written in CommonJS. It means that transpilation happens only for files using module syntax ( import , export ). It can be forced though by adding "format es6"; at the top of the source file as so: "format es6"; [1,2,3,4].map((i)=>i*i); 来源: https://stackoverflow.com/questions/30720963/jspm-does-not-transpile-code

jspm: Error when importing a jQuery plugin

佐手、 提交于 2019-12-05 01:46:35
问题 I'm trying to import a jQuery plugin (namely https://github.com/Mottie/Keyboard) using jspm/SystemJS. At first, I installed the module by simply typing the following command: jspm install github:mottie/keyboard I then added the line to import the library in my code, just after importing jQuery: import keyboard from 'mottie/keyboard'; However, when running the code, I encountered the following error: Uncaught TypeError: Multiple defines for anonymous module Googling the error didn't provide me

change jspm_packages location

我怕爱的太早我们不能终老 提交于 2019-12-04 19:35:09
问题 Is there a .bowerrc equivalent in jspm ? When I run jspm install , I'd like jspm to install the packages to client/jspm_packages folder. How can I configure jspm to change location of jspm_packages folder? Thanks 回答1: I found it. In your package.json , add the path into packages inside directories . "jspm": { "directories": { "packages": "new/path/to/jspm_packages" } } 来源: https://stackoverflow.com/questions/29902646/change-jspm-packages-location

Using SASS with Aurelia's Skeleton Navigation project

谁都会走 提交于 2019-12-04 12:36:52
问题 var gulp = require('gulp'); var sass = require('gulp-sass'); var runSequence = require('run-sequence'); var changed = require('gulp-changed'); var plumber = require('gulp-plumber'); var to5 = require('gulp-babel'); var sourcemaps = require('gulp-sourcemaps'); var paths = require('../paths'); var compilerOptions = require('../babel-options'); var assign = Object.assign || require('object.assign'); // transpiles changed es6 files to SystemJS format // the plumber() call prevents 'pipe breaking'