Some improvements for the `blog-utils` npm package (#10356)
This commit is contained in:
Родитель
378d14748c
Коммит
166efaaa6f
|
@ -22,6 +22,12 @@ const packageJsonForBlogUtils = `{
|
|||
"dependencies": {
|
||||
"jsdom": "${mainPackageJson.dependencies.jsdom}",
|
||||
"node-fetch": "${isomorphicFetchPackageJson.dependencies['node-fetch']}"
|
||||
},
|
||||
"license": "${mainPackageJson.license}",
|
||||
"author": "${mainPackageJson.author}",
|
||||
"homepage": "${mainPackageJson.homepage}",
|
||||
"bugs": {
|
||||
"url": "${mainPackageJson.bugs.url}"
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
|
|
@ -0,0 +1,25 @@
|
|||
#!/usr/bin/env node
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
|
||||
const rootDir = path.join(__dirname, '..');
|
||||
const distDir = path.join(rootDir, 'dist');
|
||||
|
||||
const content = `# addons-frontend-blog-utils
|
||||
|
||||
Please see: https://github.com/mozilla/addons-frontend#addons-frontend-blog-utils
|
||||
`;
|
||||
|
||||
fs.writeFile(
|
||||
path.join(distDir, 'README.md'),
|
||||
content,
|
||||
'utf-8',
|
||||
(err) => {
|
||||
if (err) {
|
||||
console.error(err);
|
||||
return;
|
||||
}
|
||||
|
||||
console.log('done');
|
||||
},
|
||||
);
|
|
@ -9,7 +9,7 @@
|
|||
},
|
||||
"scripts": {
|
||||
"build": "npm run clean && better-npm-run build",
|
||||
"build:blog-utils": "npm run clean && bin/create-package-json-for-blog-utils && better-npm-run build:blog-utils",
|
||||
"build:blog-utils": "npm run clean && bin/create-package-json-for-blog-utils && bin/create-readme-for-blog-utils && better-npm-run build:blog-utils",
|
||||
"build:blog-utils-dev": "NODE_ENV=development concurrently 'npm run build:blog-utils -- --watch' 'bin/serve-blog-utils'",
|
||||
"build:blog-utils-prod": "NODE_ENV=production npm run build:blog-utils",
|
||||
"build-check": "bin/build-checks.js",
|
||||
|
|
Загрузка…
Ссылка в новой задаче