We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2b98fc3 commit 6bf3f65Copy full SHA for 6bf3f65
svelte-cloudinary/scripts/copy-package.js
@@ -1,13 +1,11 @@
1
import fs from 'fs';
2
+import path from 'path'
3
+const root = process.cwd()
4
+const filesToCopy = ['./package.json', './README.md', "./LICENSE"];
5
+filesToCopy.forEach(file => {
6
+ const __dirname = path.dirname(root);
7
+ fs.copyFileSync(path.resolve(__dirname,file), `./dist/${file}`);
8
+})
9
-// read file into JSON
-const pkg = JSON.parse(fs.readFileSync('package.json', 'utf-8'));
10
+console.log('files written to /dist');
11
-// adjust pkg json however you like ..
-
-// write it to your output directory
-fs.writeFileSync(
- './dist/package.json', // path to your output directory may vary
- JSON.stringify(pkg, null, 2)
12
-);
13
-console.log('package.json written to /dist')
0 commit comments