(d)
| 78 | }); |
| 79 | |
| 80 | function syncPartialBundlePkg(d) { |
| 81 | var pkgPath = path.join(constants.pathToBuild, d.name); |
| 82 | |
| 83 | var initDirectory = _initDirectory(d, pkgPath); |
| 84 | |
| 85 | function writePackageJSON(cb) { |
| 86 | var cnt = { |
| 87 | name: d.name, |
| 88 | version: pkg.version, |
| 89 | description: d.desc, |
| 90 | license: pkg.license, |
| 91 | main: d.main, |
| 92 | repository: pkg.repository, |
| 93 | bugs: pkg.bugs, |
| 94 | author: pkg.author, |
| 95 | keywords: pkg.keywords, |
| 96 | files: [ |
| 97 | 'LICENSE', |
| 98 | 'README.md', |
| 99 | d.main |
| 100 | ] |
| 101 | }; |
| 102 | |
| 103 | fs.writeFile( |
| 104 | path.join(pkgPath, 'package.json'), |
| 105 | JSON.stringify(cnt, null, 2) + '\n', |
| 106 | cb |
| 107 | ); |
| 108 | } |
| 109 | |
| 110 | |
| 111 | function writeREADME(cb) { |
| 112 | var cnt = [ |
| 113 | '# ' + d.name, |
| 114 | '', |
| 115 | d.desc, |
| 116 | '', |
| 117 | 'Contains trace modules ' + common.formatEnumeration(d.traceList) + '.', |
| 118 | '', |
| 119 | 'For more info on plotly.js, go to https://github.com/plotly/plotly.js#readme', |
| 120 | '', |
| 121 | '## Installation', |
| 122 | '', |
| 123 | '```', |
| 124 | 'npm install ' + d.name, |
| 125 | '```', |
| 126 | '## Usage', |
| 127 | '', |
| 128 | '```js', |
| 129 | '// ES6 module', |
| 130 | 'import Plotly from \'' + d.name + '\'', |
| 131 | '', |
| 132 | '// CommonJS', |
| 133 | 'var Plotly = require(\'' + d.name + '\')', |
| 134 | '```', |
| 135 | '', |
| 136 | copyrightAndLicense, |
| 137 | 'Please visit [complete list of dependencies](https://www.npmjs.com/package/plotly.js/v/' + pkg.version + '?activeTab=dependencies).' |
nothing calls this directly
no test coverage detected
searching dependent graphs…