Include LICENSE.md in built package
Copy LICENSE.md as well as README.md to build when preparing package. These files are useful for tools that inspect node_modules for dependency details.
This commit is contained in:
@@ -19,7 +19,7 @@
|
|||||||
"start": "npm run serve-examples",
|
"start": "npm run serve-examples",
|
||||||
"serve-examples": "webpack serve --config examples/webpack/config.js --mode development --watch",
|
"serve-examples": "webpack serve --config examples/webpack/config.js --mode development --watch",
|
||||||
"build-examples": "webpack --config examples/webpack/config.js --mode production",
|
"build-examples": "webpack --config examples/webpack/config.js --mode production",
|
||||||
"build-package": "npm run transpile && npm run copy-css && node tasks/prepare-package && shx cp README.md build/ol",
|
"build-package": "npm run transpile && npm run copy-css && node tasks/prepare-package",
|
||||||
"build-index": "npm run build-package && node tasks/generate-index",
|
"build-index": "npm run build-package && node tasks/generate-index",
|
||||||
"build-legacy": "shx rm -rf build && npm run build-index && webpack --config config/webpack-config-legacy-build.js && cleancss --source-map src/ol/ol.css -o build/legacy/ol.css",
|
"build-legacy": "shx rm -rf build && npm run build-index && webpack --config config/webpack-config-legacy-build.js && cleancss --source-map src/ol/ol.css -o build/legacy/ol.css",
|
||||||
"build-site": "npm run build-examples && npm run apidoc && mkdir -p build/site && cp site/index.html build/site && mv build/apidoc build/site/apidoc && mv build/examples build/site/examples",
|
"build-site": "npm run build-examples && npm run apidoc && mkdir -p build/site && cp site/index.html build/site && mv build/apidoc build/site/apidoc && mv build/examples build/site/examples",
|
||||||
|
|||||||
@@ -23,3 +23,13 @@ fs.writeFileSync(
|
|||||||
JSON.stringify(pkg, null, 2),
|
JSON.stringify(pkg, null, 2),
|
||||||
'utf-8'
|
'utf-8'
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// copy in readme and license files
|
||||||
|
fs.copyFileSync(
|
||||||
|
path.resolve(__dirname, '../README.md'),
|
||||||
|
path.join(buildDir, 'README.md')
|
||||||
|
);
|
||||||
|
fs.copyFileSync(
|
||||||
|
path.resolve(__dirname, '../LICENSE.md'),
|
||||||
|
path.join(buildDir, 'LICENSE.md')
|
||||||
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user