MCPcopy Create free account
hub / github.com/plotly/plotly.js / syncPartialBundlePkg

Function syncPartialBundlePkg

tasks/sync_packages.js:80–165  ·  view source on GitHub ↗
(d)

Source from the content-addressed store, hash-verified

78});
79
80function 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).'

Callers

nothing calls this directly

Calls 3

_initDirectoryFunction · 0.85
_copyLicenseFunction · 0.85
_publishToNPMFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…