Giter Site home page Giter Site logo

docs's Issues

运行 spm test 报错

'c:\Users\chenlai_0011\AppData\Roaming\npm\node_modules\spm\node_modules\mocha-phantomjs\bin\mocha-phantomjs' �����ڲ����ⲿ���Ҳ���ǿ����еij���
�������ļ�
{ code: 1,
stderr: ''c:\Users\chenlai_0011\AppData\Roaming\npm\node_modules\spm\node_modules\mocha-phantomjs\bin\mocha-phantomjs' �����ڲ����ⲿ���Ҳ���ǿ����еij���\r\n���������ļ���\r\n' }

server启动后html一改动就异常

如题,没法玩
"output": [
"./app//."
],

html文件在app目录下,server启动后,只要html有改动,立即异常:
changed: app\test1.html
path.js:200
throw new TypeError('Arguments to path.join must be strings');
^
TypeError: Arguments to path.join must be strings
at f (path.js:200:13)
at Object.filter (native)
at win32.join (path.js:205:38)
at copyFile (C:\Program Files\nodejs\node_modules\spm\node_modules\spm-webpa
ck\lib\SPMPlugins.js:110:16)
at copyFiles (C:\Program Files\nodejs\node_modules\spm\node_modules\spm-webp
ack\lib\SPMPlugins.js:99:5)
at copy (C:\Program Files\nodejs\node_modules\spm\node_modules\spm-webpack\l
ib\SPMPlugins.js:43:7)
at EventEmitter. (C:\Program Files\nodejs\node_modules\spm\node_m
odules\spm-webpack\lib\SPMPlugins.js:37:11)
at EventEmitter.emit (events.js:110:17)
at EventEmitter. (C:\Program Files\nodejs\node_modules\spm\node_m
odules\chokidar\index.js:136:15)
at EventEmitter.FSWatcher._emit (C:\Program Files\nodejs\node_modules\spm\no
de_modules\chokidar\index.js:152:5)

Commands

spm init, spm test等都不能用
spm版本:3.9.0-beta3
node版本:v0.10.30

require 未定义

按照说的步骤走,打开浏览器一运行,就报require 未定义,require不是全局函数吗?

为什么要关闭spmjs.io呢?

spmjs和seajs的文档中多次链接到spmjs.io的网站,对于学习seajs和spmjs造成了一定的困扰, 十分好奇为什么要把这个网站关闭呢?

spm build --watch 速度疑问

先赞一个这个文档项目,更简单易懂了。


{
  "spm": {
    "output": [
      "*.js"
    ],
    "dependencies": {
      "jquery": "~2.1.3"
    }
  }
}
$ spm build --watch

修改 a.js 会出现如下消息

 generated: a.js 83.17kB
          build: done
          build: compile
      generated: b.js 83.17kB
      generated: index.js 83.17kB
      generated: a.js 83.17kB
          build: done
          build: compile
      generated: b.js 83.17kB
      generated: index.js 83.17kB
      generated: a.js 83.17kB
          build: done

我如何控制修改时只build当前 a.js 文件。

spm build --watch 的调试速度比 spm server 慢很多。可以通过某种方式提速么?

再请教一个问题:

$ spm build index.js index.html

我能用 gulp 调用 spm build index.js index.html 命令么?

我可能需要 build 完了会接着做一些其他操作。

spm 提供一些对外的接口,利用这些接口与其他模块结合。构建一整套的前端工作流程。

var spm = require('spm')
spm.build('index.js').on('done',function(){
// .. somecode
})

有没有多页面构建的demo啊

比如我有下面这样的工程,要怎么构建啊

view
  |--page1
    |--index.html
  |--page2
    |--index.html
static
  |--page1
    |--index.js
    |--index.css
  |--page2
    |--index.js
    |--index.css
    |--index.png
package.json

之前没用过spm,对spm不是很了解,spm是不是只用来构建js的?用spm来构建项目时,对项目目录,各资源的排放有要求吗?

ReferenceError: Promise is not defined

可能是个低级问题,但真的是很令人头疼
D:\spm\test>spm install seajs

C:\Users\PC\AppData\Roaming\npm\node_modules\spm\node_modules\co\index.js:50
return new Promise(function(resolve, reject) {
^
ReferenceError: Promise is not defined
at co (C:\Users\PC\AppData\Roaming\npm\node_modules\spm\node_modules\co\index.js:50:14)
at createPromise (C:\Users\PC\AppData\Roaming\npm\node_modules\spm\node_modules\co\index.js:30:15)
at Object. (C:\Users\PC\AppData\Roaming\npm\node_modules\spm\bin\spm-install:43:1)
at Module.compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)
at startup (node.js:119:16)
at node.js:929:3
我在执行 spm install seajs 时一直报这个错误,不知道怎么回事。我用npm cnpm都试过重新安装 spm,但还是不成,求教@@

spm v3.6.0 unknown option `--with-deps'

spmjs/spm#1227 (comment)

afc163 commented on 16 Mar

使用此方式我需要将每个所需模块都执行一次 spm build -O ../../../spm 是否有快捷方法可以一次性将 spm_modules/ 所有文件全部 build ?
目前可以使用 spm build --with-deps 来打包依赖模块,同样会输出到 dist 目录中。

spm install dzoom
cd spm_modules/dzoom/0.0.1/
spm build --with-deps
    error: unknown option `--with-deps'

关于 hash

配置输出文件名是否带 hash 后缀。

我开启了 hash 最终生成了 index-2b7f66baa43cdf4d6016.js 文件。

但是没有生成类似 map.json 的文件

// map.json
{
    "file":{
      "index.js": "index-2b7f66baa43cdf4d6016.js"
    }
}

get started

根据get-started的步骤来,发现在执行 spm doc 后,浏览访问,静态文件是没有的,还需要执行什么?

static 文件不存在

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.