-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: browserslist config, build:vendor
- Loading branch information
1 parent
562f26e
commit 32acf6b
Showing
3 changed files
with
21 additions
and
18 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,17 @@ | ||
import pkg from '../package.json'; | ||
import {resolve} from 'path'; | ||
import concat from 'concat-files'; | ||
import { ensureDirSync } from 'fs-extra' | ||
import pkg from '../package.json' | ||
import { resolve } from 'path' | ||
import concat from 'concat-files' | ||
|
||
const vendor = Object.keys(pkg.dependencies).map(module => require.resolve(module)); | ||
const targetDir = resolve(__dirname, '../demo/assets/js') | ||
|
||
ensureDirSync(targetDir) | ||
const vendor = Object.keys(pkg.dependencies).map(require.resolve) | ||
|
||
/** | ||
* Concatenates the vendor files into a single vendor file for the demo | ||
* @return {Function} concat | ||
*/ | ||
async function concatVendorFiles() { | ||
return concat(vendor, resolve(__dirname, '../demo/assets/js/vendor.js'), function(err) { | ||
if (err) throw err; | ||
}); | ||
} | ||
|
||
export default concatVendorFiles; | ||
concat(vendor, `${targetDir}/vendor.js`, function(err, data) { | ||
if (err) throw err | ||
}) |
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