-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* docs action (#2660) * fix popper * fix npm packages (again)
- Loading branch information
Showing
44 changed files
with
9,809 additions
and
6,041 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 |
---|---|---|
|
@@ -79,4 +79,4 @@ async function main(args) { | |
} | ||
} | ||
|
||
main(process.argv.slice(2)) | ||
main(process.argv.slice(2)).then() |
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,55 +1,55 @@ | ||
const rollup = require('rollup') | ||
const genericRollup = require('./rollup-plugin.config') | ||
const fs = require('fs') | ||
const util = require('util') | ||
const path = require('path') | ||
const rollup = require('rollup'); | ||
const genericRollup = require('./rollup-plugin.config'); | ||
const fs = require('fs'); | ||
const util = require('util'); | ||
const path = require('path'); | ||
|
||
const { promisify } = util | ||
const { promisify } = util; | ||
|
||
const promisifyReadDir = promisify(fs.readdir) | ||
const formatName = n => n.replace(/\.ts/, '').replace(/-/g, '_') | ||
const promisifyReadDir = promisify(fs.readdir); | ||
const formatName = n => n.replace(/\.ts/, '').replace(/-/g, '_'); | ||
|
||
const localePath = path.join(__dirname, '../src/locales') | ||
const localePath = path.join(__dirname, '../src/locales'); | ||
|
||
async function build(option) { | ||
const bundle = await rollup.rollup(option.input) | ||
await bundle.write(option.output) | ||
const bundle = await rollup.rollup(option.input); | ||
await bundle.write(option.output); | ||
} | ||
|
||
(async () => { | ||
try { | ||
/* eslint-disable no-restricted-syntax, no-await-in-loop */ | ||
// We use await-in-loop to make rollup run sequentially to save on RAM | ||
const locales = await promisifyReadDir(localePath) | ||
const locales = await promisifyReadDir(localePath); | ||
for (const l of locales) { | ||
// run builds sequentially to limit RAM usage | ||
await build(genericRollup({ | ||
input: `./src/locales/${l}`, | ||
fileName: `./dist/locales/${l.replace('.ts', '.js')}`, | ||
name: `tempusDominus.locales.${formatName(l)}` | ||
})) | ||
})); | ||
} | ||
|
||
const plugins = await promisifyReadDir(path.join(__dirname, '../src/plugins')) | ||
const plugins = await promisifyReadDir(path.join(__dirname, '../src/plugins')); | ||
for (const plugin of plugins.filter(x => x !== 'examples')) { | ||
// run builds sequentially to limit RAM usage | ||
await build(genericRollup({ | ||
input: `./src/plugins/${plugin}/index.ts`, | ||
fileName: `./dist/plugins/${plugin}.js`, | ||
name: `tempusDominus.plugins.${formatName(plugin)}` | ||
})) | ||
})); | ||
} | ||
|
||
const examplePlugins = await promisifyReadDir(path.join(__dirname, '../src/plugins/examples')) | ||
const examplePlugins = await promisifyReadDir(path.join(__dirname, '../src/plugins/examples')); | ||
for (const plugin of examplePlugins.map(x => x.replace('.ts', ''))) { | ||
// run builds sequentially to limit RAM usage | ||
await build(genericRollup({ | ||
input: `./src/plugins/examples/${plugin}.ts`, | ||
fileName: `./dist/plugins/examples/${plugin}.js`, | ||
name: `tempusDominus.plugins.${formatName(plugin)}` | ||
})) | ||
})); | ||
} | ||
} catch (e) { | ||
console.error(e) // eslint-disable-line no-console | ||
console.error(e); // eslint-disable-line no-console | ||
} | ||
})() | ||
})(); |
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
Large diffs are not rendered by default.
Oops, something went wrong.
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.