Questions tagged «jspm»

7
如何使用Typescript导入moment.js?
我正在尝试学习打字稿。虽然我认为这无关紧要,但我正在使用VSCode进行此演示。 我有一个package.json包含这些部分的内容: { "devDependencies": { "gulp": "^3.9.1", "jspm": "^0.16.33", "typescript": "^1.8.10" }, "jspm": { "moment": "npm:moment@^2.12.0" } } 然后我有一个main.js像这样的Typescript类: import moment from 'moment'; export class Main { } 我的gulpfile.js样子是这样的: var gulp = require('gulp'); var typescript = require('gulp-tsb'); var compilerOptions = { "rootDir": "src/", "sourceMap": true, "target": "es5", "module": "amd", "declaration": …

By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.