-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: copy non-icon dependencies to dist folder
- Loading branch information
Showing
6 changed files
with
74 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
'use strict' | ||
|
||
const path = require('path') | ||
|
||
const Paths = Object.freeze({ | ||
Dist: path.resolve('dist'), | ||
Root: path.resolve('./') | ||
}) | ||
|
||
module.exports = { | ||
Paths | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
'use strict' | ||
|
||
const fsp = require('fs').promises | ||
const path = require('path') | ||
const makeDir = require('make-dir') | ||
const Paths = require('./consts').Paths | ||
|
||
|
||
async function copyDependencies() { | ||
await makeDir(Paths.Dist) | ||
|
||
return Promise.all([ | ||
'CHANGELOG.md', | ||
'LICENSE', | ||
'MDI-LICENSE', | ||
'package.json', | ||
'README.md' | ||
].map((fileName) => { | ||
const sourcePath = path.resolve(Paths.Root, fileName) | ||
const targetPath = path.resolve(Paths.Dist, fileName) | ||
|
||
console.log(`copying ${fileName} to ${targetPath}`) | ||
return fsp.copyFile(sourcePath, targetPath) | ||
})) | ||
} | ||
|
||
copyDependencies() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
'use static' | ||
|
||
module.exports = (name, path) => ` | ||
<template> | ||
<span class="mdi mdi-${name}"> | ||
|