Skip to content
This repository has been archived by the owner on Aug 15, 2018. It is now read-only.

spm init 不会生成 .gitignore 了? #832

Closed
airyland opened this issue Jun 13, 2014 · 4 comments
Closed

spm init 不会生成 .gitignore 了? #832

airyland opened this issue Jun 13, 2014 · 4 comments
Assignees

Comments

@airyland
Copy link

No description provided.

@sorrycc
Copy link
Member

sorrycc commented Jun 13, 2014

会生成的。

@sorrycc sorrycc closed this as completed Jun 14, 2014
@airyland
Copy link
Author

奇怪,多次测试 [email protected] 并不会自动生成.gitignore

@hotoo
Copy link
Member

hotoo commented Jun 14, 2014

确实不会,只会生成 .spmignore 和 .npmignore

$ spm -V
3.0.0-rc20
$ mkdir spminit
$ cd spminit
$ spm init
$ ll -a
total 0
drwxr-xr-x   2 hotoo  staff    68B  6 14 21:29 .
drwxr-xr-x  13 hotoo  staff   442B  6 14 21:29 ..
$ spm init
Running "init:/usr/local/lib/node_modules/spm/lib/init-template/" (init) task
This task will create one or more files in the current directory, based on the
environment and the answers to a few questions. Note that answering "?" to any
question will show question-specific help and answering "none" to most questions
will leave its value blank.

Please answer the following:
[?] Package name (spminit) 
[?] author 
[?] Version (1.0.0) 
[?] Description 
[?] Project git repository (git://github.com/hotoo/spminit.git) 
[?] Project issues tracker (https://github.com/hotoo/spminit/issues) 
[?] Project homepage (https://github.com/hotoo/spminit) 
[?] Licenses (MIT) 
[?] Do you need to make any changes to the above before continuing? (y/N) n

Writing .npmignore...OK
Writing .spmignore...OK
Writing HISTORY.md...OK
Writing README.md...OK
Writing examples/index.md...OK
Writing index.js...OK
Writing package.json...OK
Writing tests/spminit-spec.js...OK

Initialized from template "init-template".

Done, without errors.

$ ll -a
total 48
drwxr-xr-x  10 hotoo  staff   340B  6 14 21:29 .
drwxr-xr-x  13 hotoo  staff   442B  6 14 21:29 ..
-rw-r--r--   1 hotoo  staff   161B  6 14 21:29 .npmignore
-rw-r--r--   1 hotoo  staff    61B  6 14 21:29 .spmignore
-rw-r--r--   1 hotoo  staff    68B  6 14 21:29 HISTORY.md
-rw-r--r--   1 hotoo  staff   279B  6 14 21:29 README.md
drwxr-xr-x   3 hotoo  staff   102B  6 14 21:29 examples
-rw-r--r--   1 hotoo  staff    40B  6 14 21:29 index.js
-rw-r--r--   1 hotoo  staff   564B  6 14 21:29 package.json
drwxr-xr-x   3 hotoo  staff   102B  6 14 21:29 tests

@hotoo hotoo reopened this Jun 14, 2014
@sorrycc
Copy link
Member

sorrycc commented Jun 15, 2014

npm/npm#1862
npm 的 magic feature 引起的,发布的时候如果没有 .npmignore,会自动把 .gitignore 重命名为 .npmignore

@afc163 afc163 mentioned this issue Jun 18, 2014
10 tasks
@sorrycc sorrycc reopened this Aug 19, 2014
afc163 added a commit to afc163/spm that referenced this issue Aug 19, 2014
@afc163 afc163 closed this as completed Aug 19, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants