40_package_json.md 2.27 KB
Newer Older
Sebastian Wilzbach's avatar
Sebastian Wilzbach committed
1
2
3
4
---
title: 'Package.json'
layout: series_item
series: 'details'
5
permalink: details/package_json/
Sebastian Wilzbach's avatar
Sebastian Wilzbach committed
6
7
8
9
10
11
12
13
14
15
16
17
estimated-time: 10
---

{% hlblock info %}
All the following parameters can be added or changed in your `package.json`
{% endhlblock %}

### Biojs specific parameters

* `logo`: alternative project logo (default: github avatar)
* `registryHeight`: height of the registry iFrame for your first example (default: 400)
* `publication`: PMID (Pubmed Id) to the most recent citation (can also be an array)
18
* `testing_service`: testing service used (`travis`, `drone.io`, `circleci`, `snapci`, ...)
Sebastian Wilzbach's avatar
Sebastian Wilzbach committed
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92

~~~
"biojs": {
  "logo": "",
  "registryHeight": "400",
}
~~~

### [Parcelify params](https://github.com/rotundasoftware/parcelify)

Specify css files for browserify (behaves like main for js)

~~~
style: "main.css"
~~~

### [BioJS2Galaxy params](https://github.com/biojs/biojs2galaxy)

~~~
"galaxy": {
  "datatypes": []
}
~~~


### [General npm params](https://www.npmjs.org/doc/files/package.json.html)

* name
* version
* description
* keywords (use "biojs")
* homepage
* license
* contributors
* main
* repository

### Optional params

* author
* bugs
* bin
* scripts
* dependencies
* devDependencies

### Contributors

~~~
[{ "name" : "Barney Rubble"
, "email" : "b@rubble.com"
, "url" : "http://barnyrubble.tumblr.com/"
},{ "name" : "Barney Rubble 2"
, "email" : "b2@rubble.com"
, "url" : "http://barnyrubble2.tumblr.com/"
}]
~~~

### [Snippets](https://github.com/biojs/biojs-sniper)

~~~
 "sniper": {
    "js": ["/build/msa.js"],
    "css": ["/css/msa.css"],
    "snippets": ["examples"],
    "first": "msa_show_menu"
  }
~~~

optional attributes:

* `buildCSS` (will replace `css`)
* `buildJS` (will replace `js`)

Seb's avatar
Seb committed
93
94
95
96
97
98
99
100
101
102
103
104
The `build` attributes can be used to specify alternative locations - e.g. for `js` the registry will ignore `js` in favor of `buildJS` while the local sniper will still read the `js` attribute.
This is useful if you want to work with an unminified, local library version and ship a CDN version at biojs.io.
Consider this short example:

~~~
  "js": [
     "external/soundjs.js"
  ]
  "buildJS": [
      "https://cdnjs.cloudflare.com/ajax/libs/SoundJS/0.6.0/soundjs.min.js"
  ],
~~~
Sebastian Wilzbach's avatar
Sebastian Wilzbach committed
105
106
107
108

{% hlblock info %}
Do you want to [learn more](https://github.com/biojs/biojs-sniper) about the `sniper`?
{% endhlblock %}